From 804baeb4c7a7ac1996d9498934c94b3c6710c65e Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 15:46:49 +0300 Subject: [PATCH 01/23] Update flutter_rust_bridge to 2.0.0-dev.32 --- libs/sdk-bindings/Cargo.toml | 2 +- libs/sdk-core/Cargo.toml | 2 +- libs/sdk-core/src/binding.rs | 6 +++--- libs/sdk-flutter/README.md | 2 +- libs/sdk-flutter/makefile | 2 +- libs/sdk-flutter/pubspec.yaml | 15 ++++++++++++--- 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index a83d22391..715892559 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -26,7 +26,7 @@ uniffi-kotlin-multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin camino = "1.1.1" log = { workspace = true } once_cell = { workspace = true } -flutter_rust_bridge = "=1.82.6" +flutter_rust_bridge = "2.0.0" tiny-bip39 = "*" tonic = { workspace = true, features = [ "tls", diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index d350adb4b..a2f9d4b86 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -8,7 +8,7 @@ name = "breez_sdk_core" crate-type = ["staticlib", "cdylib", "lib"] [dependencies] -flutter_rust_bridge = "=1.82.6" +flutter_rust_bridge = "2.0.0" aes = { workspace = true } anyhow = { workspace = true } hex = { workspace = true } diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index d4636cce8..4b5a4f666 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -14,7 +14,7 @@ use std::future::Future; use std::sync::Arc; use anyhow::{anyhow, Result}; -use flutter_rust_bridge::StreamSink; +use crate::frb_generated::StreamSink; use log::{Level, LevelFilter, Metadata, Record}; use once_cell::sync::{Lazy, OnceCell}; use sdk_common::invoice; @@ -796,7 +796,7 @@ struct BindingEventListener; impl EventListener for BindingEventListener { fn on_event(&self, e: BreezEvent) { if let Some(stream) = NOTIFICATION_STREAM.get() { - stream.add(e); + let _ = stream.add(e); } } } @@ -820,7 +820,7 @@ impl log::Log for BindingLogger { fn log(&self, record: &Record) { if self.enabled(record.metadata()) { - self.log_stream.add(LogEntry { + let _ = self.log_stream.add(LogEntry { line: record.args().to_string(), level: record.level().as_str().to_string(), }); diff --git a/libs/sdk-flutter/README.md b/libs/sdk-flutter/README.md index c9d9c3f60..40e18c226 100644 --- a/libs/sdk-flutter/README.md +++ b/libs/sdk-flutter/README.md @@ -26,7 +26,7 @@ cargo install cargo-ndk ``` * Install [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge): ``` -cargo install flutter_rust_bridge_codegen --version 1.82.6 +cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 ``` ## Building the plugin diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index da7540270..773f614d6 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,8 +12,8 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 1.82.6 flutter_rust_bridge_codegen --dart-format-line-length 110 -r ../sdk-core/src/binding.rs -d lib/bridge_generated.dart -c ios/Classes/bridge_generated.h + cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 ios: $(SOURCES) flutter_rust_bridge make -C ../sdk-bindings bindings-swift diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index b3e21f989..0cb7b9dcb 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -12,8 +12,7 @@ dependencies: sdk: flutter ### flutter_rust_bridge_codegen dependencies ffi: ^2.1.2 # requires Dart >=3.3.0(Flutter 3.19) - flutter_rust_bridge: ^1.82.6 # breez-sdk requirement - freezed: <2.5.3 + flutter_rust_bridge: ^2.0.0 freezed_annotation: ^2.4.1 ### rxdart: ^0.28.0 @@ -21,11 +20,19 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. flutter_lints: ^4.0.0 + # The following dependencies are required by flutter_rust_bridge_codegen to # be defined under dev_dependencies to generate Dart files build_runner: ^2.4.11 - ffigen: <10.0.0 # flutter_rust_bridge requirement + ffigen: ^11.0.0 + freezed: ^2.5.2 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -41,5 +48,7 @@ flutter: android: package: com.breez.breez_sdk pluginClass: BreezSDKPlugin + ffiPlugin: true ios: pluginClass: BreezSDKPlugin + ffiPlugin: true \ No newline at end of file From f15a697c254276d327351f11eb78c60e8fd646b9 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 15:48:13 +0300 Subject: [PATCH 02/23] Cleanup frb v1 files --- libs/sdk-flutter/analysis_options.yaml | 3 --- libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m | 1 - libs/sdk-flutter/lib/native_toolkit.dart | 1 - 3 files changed, 5 deletions(-) diff --git a/libs/sdk-flutter/analysis_options.yaml b/libs/sdk-flutter/analysis_options.yaml index 9a7e168ac..725adb719 100644 --- a/libs/sdk-flutter/analysis_options.yaml +++ b/libs/sdk-flutter/analysis_options.yaml @@ -24,6 +24,3 @@ linter: analyzer: exclude: - - lib/bridge_generated.dart - - lib/src/breez_server/generated/** - - lib/src/node/node_api/greenlight/generated/** \ No newline at end of file diff --git a/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m index 21a07c509..cbd12c2ae 100644 --- a/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m +++ b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m @@ -1,5 +1,4 @@ #import "BreezSDKPlugin.h" -#import "bridge_generated.h" #if __has_include() #import #else diff --git a/libs/sdk-flutter/lib/native_toolkit.dart b/libs/sdk-flutter/lib/native_toolkit.dart index fcb21c89e..085e7c9f5 100644 --- a/libs/sdk-flutter/lib/native_toolkit.dart +++ b/libs/sdk-flutter/lib/native_toolkit.dart @@ -1,6 +1,5 @@ import 'dart:ffi'; import 'dart:io'; -import 'bridge_generated.dart'; BreezSdkCore? _breezSDK; From 8e0ea91ff12eef40f20ae2fd2c12f11e034f4426 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 15:50:35 +0300 Subject: [PATCH 03/23] Create `flutter_rust_bridge.yaml` configuration file Invoke flutter_rust_bridge_codegen without arguments --- libs/sdk-flutter/flutter_rust_bridge.yaml | 9 +++++++++ libs/sdk-flutter/makefile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 libs/sdk-flutter/flutter_rust_bridge.yaml diff --git a/libs/sdk-flutter/flutter_rust_bridge.yaml b/libs/sdk-flutter/flutter_rust_bridge.yaml new file mode 100644 index 000000000..dd9184d5f --- /dev/null +++ b/libs/sdk-flutter/flutter_rust_bridge.yaml @@ -0,0 +1,9 @@ +rust_input: ../sdk-core/src/binding.rs +dart_output: lib/generated/ +c_output: ios/Classes/frb_generated.h +dart_entrypoint_class_name: BreezSdkBindings +dart_format_line_length: 110 +dart_enums_style: false +add_mod_to_lib: false +full_dep: true +web: false \ No newline at end of file diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 773f614d6..4da4a956e 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,8 +12,8 @@ init: all: ios android flutter_rust_bridge: - flutter_rust_bridge_codegen --dart-format-line-length 110 -r ../sdk-core/src/binding.rs -d lib/bridge_generated.dart -c ios/Classes/bridge_generated.h cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 + flutter_rust_bridge_codegen generate ios: $(SOURCES) flutter_rust_bridge make -C ../sdk-bindings bindings-swift From 8d7400d4d490035b0831a6c8ca28d1145d7e46ee Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 15:55:07 +0300 Subject: [PATCH 04/23] Generate bindings Generate Dart bindings under lib/generated --- libs/sdk-core/src/binding.rs | 2 +- libs/sdk-core/src/frb_generated.io.rs | 5293 ++++++++++++ libs/sdk-core/src/frb_generated.rs | 7333 ++++++++++++++++ libs/sdk-core/src/frb_generated.web.rs | 2838 ++++++ libs/sdk-core/src/lib.rs | 2 +- libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m | 1 + libs/sdk-flutter/ios/Classes/frb_generated.h | 1329 +++ libs/sdk-flutter/lib/generated/binding.dart | 250 + .../lib/generated/breez_services.dart | 205 + .../lib/generated/breez_services.freezed.dart | 1639 ++++ libs/sdk-flutter/lib/generated/chain.dart | 43 + libs/sdk-flutter/lib/generated/fiat.dart | 164 + .../lib/generated/frb_generated.dart | 7614 +++++++++++++++++ .../lib/generated/frb_generated.io.dart | 7182 ++++++++++++++++ .../lib/generated/input_parser.dart | 290 + .../lib/generated/input_parser.freezed.dart | 1492 ++++ libs/sdk-flutter/lib/generated/invoice.dart | 143 + .../lib/generated/lnurl/pay/model.dart | 164 + .../generated/lnurl/pay/model.freezed.dart | 1410 +++ libs/sdk-flutter/lib/generated/lsp.dart | 84 + libs/sdk-flutter/lib/generated/models.dart | 1954 +++++ .../lib/generated/models.freezed.dart | 1660 ++++ libs/sdk-flutter/makefile | 2 + 23 files changed, 41092 insertions(+), 2 deletions(-) create mode 100644 libs/sdk-core/src/frb_generated.io.rs create mode 100644 libs/sdk-core/src/frb_generated.rs create mode 100644 libs/sdk-core/src/frb_generated.web.rs create mode 100644 libs/sdk-flutter/ios/Classes/frb_generated.h create mode 100644 libs/sdk-flutter/lib/generated/binding.dart create mode 100644 libs/sdk-flutter/lib/generated/breez_services.dart create mode 100644 libs/sdk-flutter/lib/generated/breez_services.freezed.dart create mode 100644 libs/sdk-flutter/lib/generated/chain.dart create mode 100644 libs/sdk-flutter/lib/generated/fiat.dart create mode 100644 libs/sdk-flutter/lib/generated/frb_generated.dart create mode 100644 libs/sdk-flutter/lib/generated/frb_generated.io.dart create mode 100644 libs/sdk-flutter/lib/generated/input_parser.dart create mode 100644 libs/sdk-flutter/lib/generated/input_parser.freezed.dart create mode 100644 libs/sdk-flutter/lib/generated/invoice.dart create mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay/model.dart create mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart create mode 100644 libs/sdk-flutter/lib/generated/lsp.dart create mode 100644 libs/sdk-flutter/lib/generated/models.dart create mode 100644 libs/sdk-flutter/lib/generated/models.freezed.dart diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 4b5a4f666..959f0f817 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -13,8 +13,8 @@ use std::future::Future; use std::sync::Arc; -use anyhow::{anyhow, Result}; use crate::frb_generated::StreamSink; +use anyhow::{anyhow, Result}; use log::{Level, LevelFilter, Metadata, Record}; use once_cell::sync::{Lazy, OnceCell}; use sdk_common::invoice; diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs new file mode 100644 index 000000000..461cd8901 --- /dev/null +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -0,0 +1,5293 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// Section: imports + +use super::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate_io!(); + +// Section: dart2rust + +impl CstDecode + for *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< + StreamSink, + > for *mut wire_cst_list_prim_u_8_strict +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink + { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } +} +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, + ) -> StreamSink { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } +} +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_aes_success_action_data_decrypted +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + description: self.description.cst_decode(), + plaintext: self.plaintext.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_aes_success_action_data_result +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Decrypted }; + crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { + reason: ans.reason.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + crate::breez_services::BackupFailedData { + error: self.error.cst_decode(), + } + } +} +impl CstDecode for wire_cst_backup_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BackupStatus { + crate::models::BackupStatus { + backed_up: self.backed_up.cst_decode(), + last_backup_time: self.last_backup_time.cst_decode(), + } + } +} +impl CstDecode for wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { + crate::input_parser::BitcoinAddressData { + address: self.address.cst_decode(), + network: self.network.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + label: self.label.cst_decode(), + message: self.message.cst_decode(), + } + } +} +impl CstDecode + for *mut wire_cst_aes_success_action_data_decrypted +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap) + .into() + } +} +impl CstDecode + for *mut wire_cst_aes_success_action_data_result +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_closed_channel_payment_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut i64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::LNInvoice { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_ln_url_auth_request_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlAuthRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_ln_url_pay_error_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlPayRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlPayRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_ln_url_pay_success_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_ln_url_withdraw_request_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlWithdrawRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_ln_url_withdraw_success_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawSuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_message_success_action_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::MessageSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_prepare_onchain_payment_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_prepare_redeem_onchain_funds_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_redeem_onchain_funds_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_report_payment_failure_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_send_spontaneous_payment_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + 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_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode + for *mut wire_cst_success_action_processed +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::Symbol { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for *mut u32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode for *mut u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } +} +impl CstDecode + for *mut wire_cst_url_success_action_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::UrlSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} +impl CstDecode for wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + match self.tag { + 0 => { + let ans = unsafe { self.kind.NewBlock }; + crate::breez_services::BreezEvent::NewBlock { + block: ans.block.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvoicePaid }; + crate::breez_services::BreezEvent::InvoicePaid { + details: ans.details.cst_decode(), + } + } + 2 => crate::breez_services::BreezEvent::Synced, + 3 => { + let ans = unsafe { self.kind.PaymentSucceed }; + crate::breez_services::BreezEvent::PaymentSucceed { + details: ans.details.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.PaymentFailed }; + crate::breez_services::BreezEvent::PaymentFailed { + details: ans.details.cst_decode(), + } + } + 5 => crate::breez_services::BreezEvent::BackupStarted, + 6 => crate::breez_services::BreezEvent::BackupSucceeded, + 7 => { + let ans = unsafe { self.kind.BackupFailed }; + crate::breez_services::BreezEvent::BackupFailed { + details: ans.details.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.SwapUpdated }; + crate::breez_services::BreezEvent::SwapUpdated { + details: ans.details.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + crate::models::BuyBitcoinRequest { + provider: self.provider.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } +} +impl CstDecode for wire_cst_buy_bitcoin_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinResponse { + crate::models::BuyBitcoinResponse { + url: self.url.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } +} +impl CstDecode for wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + crate::breez_services::CheckMessageRequest { + message: self.message.cst_decode(), + pubkey: self.pubkey.cst_decode(), + signature: self.signature.cst_decode(), + } + } +} +impl CstDecode for wire_cst_check_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageResponse { + crate::breez_services::CheckMessageResponse { + is_valid: self.is_valid.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_closed_channel_payment_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + crate::models::ClosedChannelPaymentDetails { + state: self.state.cst_decode(), + funding_txid: self.funding_txid.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + closing_txid: self.closing_txid.cst_decode(), + } + } +} +impl CstDecode for wire_cst_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Config { + crate::models::Config { + breezserver: self.breezserver.cst_decode(), + chainnotifier_url: self.chainnotifier_url.cst_decode(), + mempoolspace_url: self.mempoolspace_url.cst_decode(), + working_dir: self.working_dir.cst_decode(), + network: self.network.cst_decode(), + payment_timeout_sec: self.payment_timeout_sec.cst_decode(), + default_lsp_id: self.default_lsp_id.cst_decode(), + api_key: self.api_key.cst_decode(), + maxfee_percent: self.maxfee_percent.cst_decode(), + exemptfee_msat: self.exemptfee_msat.cst_decode(), + node_config: self.node_config.cst_decode(), + } + } +} +impl CstDecode for wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + crate::models::ConfigureNodeRequest { + close_to_address: self.close_to_address.cst_decode(), + } + } +} +impl CstDecode for wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + crate::models::ConnectRequest { + config: self.config.cst_decode(), + seed: self.seed.cst_decode(), + restore_only: self.restore_only.cst_decode(), + } + } +} +impl CstDecode for wire_cst_currency_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::CurrencyInfo { + crate::fiat::CurrencyInfo { + name: self.name.cst_decode(), + fraction_size: self.fraction_size.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + uniq_symbol: self.uniq_symbol.cst_decode(), + localized_name: self.localized_name.cst_decode(), + locale_overrides: self.locale_overrides.cst_decode(), + } + } +} +impl CstDecode for wire_cst_fiat_currency { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::FiatCurrency { + crate::fiat::FiatCurrency { + id: self.id.cst_decode(), + info: self.info.cst_decode(), + } + } +} +impl CstDecode for wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + crate::models::GreenlightCredentials { + device_key: self.device_key.cst_decode(), + device_cert: self.device_cert.cst_decode(), + } + } +} +impl CstDecode for wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + crate::models::GreenlightNodeConfig { + partner_credentials: self.partner_credentials.cst_decode(), + invite_code: self.invite_code.cst_decode(), + } + } +} +impl CstDecode for wire_cst_input_type { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::InputType { + match self.tag { + 0 => { + let ans = unsafe { self.kind.BitcoinAddress }; + crate::input_parser::InputType::BitcoinAddress { + address: ans.address.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Bolt11 }; + crate::input_parser::InputType::Bolt11 { + invoice: ans.invoice.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.NodeId }; + crate::input_parser::InputType::NodeId { + node_id: ans.node_id.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Url }; + crate::input_parser::InputType::Url { + url: ans.url.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.LnUrlPay }; + crate::input_parser::InputType::LnUrlPay { + data: ans.data.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.LnUrlWithdraw }; + crate::input_parser::InputType::LnUrlWithdraw { + data: ans.data.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.LnUrlAuth }; + crate::input_parser::InputType::LnUrlAuth { + data: ans.data.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.LnUrlError }; + crate::input_parser::InputType::LnUrlError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + crate::breez_services::InvoicePaidDetails { + payment_hash: self.payment_hash.cst_decode(), + bolt11: self.bolt11.cst_decode(), + payment: self.payment.cst_decode(), + } + } +} +impl CstDecode> for *mut wire_cst_list_String { + // 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_fiat_currency { + // 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_locale_overrides { + // 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_localized_name { + // 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_lsp_information { + // 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_metadata_filter { + // 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_opening_fee_params { + // 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_payment { + // 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_payment_type_filter { + // 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_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + crate::models::ListPaymentsRequest { + filters: self.filters.cst_decode(), + metadata_filters: self.metadata_filters.cst_decode(), + from_timestamp: self.from_timestamp.cst_decode(), + to_timestamp: self.to_timestamp.cst_decode(), + include_failures: self.include_failures.cst_decode(), + offset: self.offset.cst_decode(), + limit: self.limit.cst_decode(), + } + } +} +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_rate { + // 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_reverse_swap_info { + // 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_route_hint { + // 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_route_hint_hop { + // 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_swap_info { + // 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_tlv_entry { + // 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_unspent_transaction_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 wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::LNInvoice { + crate::invoice::LNInvoice { + bolt11: self.bolt11.cst_decode(), + network: self.network.cst_decode(), + payee_pubkey: self.payee_pubkey.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + description: self.description.cst_decode(), + description_hash: self.description_hash.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + timestamp: self.timestamp.cst_decode(), + expiry: self.expiry.cst_decode(), + routing_hints: self.routing_hints.cst_decode(), + payment_secret: self.payment_secret.cst_decode(), + min_final_cltv_expiry_delta: self.min_final_cltv_expiry_delta.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + crate::models::LnPaymentDetails { + payment_hash: self.payment_hash.cst_decode(), + label: self.label.cst_decode(), + destination_pubkey: self.destination_pubkey.cst_decode(), + payment_preimage: self.payment_preimage.cst_decode(), + keysend: self.keysend.cst_decode(), + bolt11: self.bolt11.cst_decode(), + open_channel_bolt11: self.open_channel_bolt11.cst_decode(), + lnurl_success_action: self.lnurl_success_action.cst_decode(), + lnurl_pay_domain: self.lnurl_pay_domain.cst_decode(), + ln_address: self.ln_address.cst_decode(), + lnurl_metadata: self.lnurl_metadata.cst_decode(), + lnurl_withdraw_endpoint: self.lnurl_withdraw_endpoint.cst_decode(), + swap_info: self.swap_info.cst_decode(), + reverse_swap_info: self.reverse_swap_info.cst_decode(), + pending_expiration_block: self.pending_expiration_block.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlAuthRequestData { + crate::input_parser::LnUrlAuthRequestData { + k1: self.k1.cst_decode(), + action: self.action.cst_decode(), + domain: self.domain.cst_decode(), + url: self.url.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_callback_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlCallbackStatus { + match self.tag { + 0 => crate::models::LnUrlCallbackStatus::Ok, + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::models::LnUrlCallbackStatus::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlErrorData { + crate::input_parser::LnUrlErrorData { + reason: self.reason.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { + crate::lnurl::pay::model::LnUrlPayErrorData { + payment_hash: self.payment_hash.cst_decode(), + reason: self.reason.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlPayRequest { + crate::models::LnUrlPayRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + comment: self.comment.cst_decode(), + payment_label: self.payment_label.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlPayRequestData { + crate::input_parser::LnUrlPayRequestData { + callback: self.callback.cst_decode(), + min_sendable: self.min_sendable.cst_decode(), + max_sendable: self.max_sendable.cst_decode(), + metadata_str: self.metadata_str.cst_decode(), + comment_allowed: self.comment_allowed.cst_decode(), + domain: self.domain.cst_decode(), + allows_nostr: self.allows_nostr.cst_decode(), + nostr_pubkey: self.nostr_pubkey.cst_decode(), + ln_address: self.ln_address.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EndpointSuccess }; + crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.EndpointError }; + crate::lnurl::pay::model::LnUrlPayResult::EndpointError { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PayError }; + crate::lnurl::pay::model::LnUrlPayResult::PayError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { + crate::lnurl::pay::model::LnUrlPaySuccessData { + payment: self.payment.cst_decode(), + success_action: self.success_action.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawRequest { + crate::models::LnUrlWithdrawRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_ln_url_withdraw_request_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlWithdrawRequestData { + crate::input_parser::LnUrlWithdrawRequestData { + callback: self.callback.cst_decode(), + k1: self.k1.cst_decode(), + default_description: self.default_description.cst_decode(), + min_withdrawable: self.min_withdrawable.cst_decode(), + max_withdrawable: self.max_withdrawable.cst_decode(), + } + } +} +impl CstDecode for wire_cst_ln_url_withdraw_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ok }; + crate::models::LnUrlWithdrawResult::Ok { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::models::LnUrlWithdrawResult::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_ln_url_withdraw_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawSuccessData { + crate::models::LnUrlWithdrawSuccessData { + invoice: self.invoice.cst_decode(), + } + } +} +impl CstDecode for wire_cst_locale_overrides { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::LocaleOverrides { + crate::fiat::LocaleOverrides { + locale: self.locale.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + } + } +} +impl CstDecode for wire_cst_localized_name { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::LocalizedName { + crate::fiat::LocalizedName { + locale: self.locale.cst_decode(), + name: self.name.cst_decode(), + } + } +} +impl CstDecode for wire_cst_log_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LogEntry { + crate::models::LogEntry { + line: self.line.cst_decode(), + level: self.level.cst_decode(), + } + } +} +impl CstDecode for wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + crate::lsp::LspInformation { + id: self.id.cst_decode(), + name: self.name.cst_decode(), + widget_url: self.widget_url.cst_decode(), + pubkey: self.pubkey.cst_decode(), + host: self.host.cst_decode(), + base_fee_msat: self.base_fee_msat.cst_decode(), + fee_rate: self.fee_rate.cst_decode(), + time_lock_delta: self.time_lock_delta.cst_decode(), + min_htlc_msat: self.min_htlc_msat.cst_decode(), + lsp_pubkey: self.lsp_pubkey.cst_decode(), + opening_fee_params_list: self.opening_fee_params_list.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_max_reverse_swap_amount_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MaxReverseSwapAmountResponse { + crate::models::MaxReverseSwapAmountResponse { + total_sat: self.total_sat.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_message_success_action_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::MessageSuccessActionData { + crate::lnurl::pay::model::MessageSuccessActionData { + message: self.message.cst_decode(), + } + } +} +impl CstDecode for wire_cst_metadata_filter { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MetadataFilter { + crate::models::MetadataFilter { + json_path: self.json_path.cst_decode(), + json_value: self.json_value.cst_decode(), + } + } +} +impl CstDecode for wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeConfig::Greenlight { + config: ans.config.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeCredentials::Greenlight { + credentials: ans.credentials.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_node_state { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeState { + crate::models::NodeState { + id: self.id.cst_decode(), + block_height: self.block_height.cst_decode(), + channels_balance_msat: self.channels_balance_msat.cst_decode(), + onchain_balance_msat: self.onchain_balance_msat.cst_decode(), + pending_onchain_balance_msat: self.pending_onchain_balance_msat.cst_decode(), + utxos: self.utxos.cst_decode(), + max_payable_msat: self.max_payable_msat.cst_decode(), + max_receivable_msat: self.max_receivable_msat.cst_decode(), + max_single_payment_amount_msat: self.max_single_payment_amount_msat.cst_decode(), + max_chan_reserve_msats: self.max_chan_reserve_msats.cst_decode(), + connected_peers: self.connected_peers.cst_decode(), + inbound_liquidity_msats: self.inbound_liquidity_msats.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_onchain_payment_limits_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OnchainPaymentLimitsResponse { + crate::models::OnchainPaymentLimitsResponse { + min_sat: self.min_sat.cst_decode(), + max_sat: self.max_sat.cst_decode(), + } + } +} +impl CstDecode for wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + crate::models::OpenChannelFeeRequest { + amount_msat: self.amount_msat.cst_decode(), + expiry: self.expiry.cst_decode(), + } + } +} +impl CstDecode for wire_cst_open_channel_fee_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeResponse { + crate::models::OpenChannelFeeResponse { + fee_msat: self.fee_msat.cst_decode(), + fee_params: self.fee_params.cst_decode(), + } + } +} +impl CstDecode for wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + crate::models::OpeningFeeParams { + min_msat: self.min_msat.cst_decode(), + proportional: self.proportional.cst_decode(), + valid_until: self.valid_until.cst_decode(), + max_idle_time: self.max_idle_time.cst_decode(), + max_client_to_self_delay: self.max_client_to_self_delay.cst_decode(), + promise: self.promise.cst_decode(), + } + } +} +impl CstDecode for wire_cst_opening_fee_params_menu { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParamsMenu { + crate::models::OpeningFeeParamsMenu { + values: self.values.cst_decode(), + } + } +} +impl CstDecode for wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + crate::models::PayOnchainRequest { + recipient_address: self.recipient_address.cst_decode(), + prepare_res: self.prepare_res.cst_decode(), + } + } +} +impl CstDecode for wire_cst_pay_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainResponse { + crate::models::PayOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } +} +impl CstDecode for wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + crate::models::Payment { + id: self.id.cst_decode(), + payment_type: self.payment_type.cst_decode(), + payment_time: self.payment_time.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + fee_msat: self.fee_msat.cst_decode(), + status: self.status.cst_decode(), + error: self.error.cst_decode(), + description: self.description.cst_decode(), + details: self.details.cst_decode(), + metadata: self.metadata.cst_decode(), + } + } +} +impl CstDecode for wire_cst_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentDetails { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ln }; + crate::models::PaymentDetails::Ln { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ClosedChannel }; + crate::models::PaymentDetails::ClosedChannel { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + crate::breez_services::PaymentFailedData { + error: self.error.cst_decode(), + node_id: self.node_id.cst_decode(), + invoice: self.invoice.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_prepare_onchain_payment_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + crate::models::PrepareOnchainPaymentRequest { + amount_sat: self.amount_sat.cst_decode(), + amount_type: self.amount_type.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_prepare_onchain_payment_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentResponse { + crate::models::PrepareOnchainPaymentResponse { + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + sender_amount_sat: self.sender_amount_sat.cst_decode(), + recipient_amount_sat: self.recipient_amount_sat.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + crate::models::PrepareRedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsResponse { + crate::models::PrepareRedeemOnchainFundsResponse { + tx_weight: self.tx_weight.cst_decode(), + tx_fee_sat: self.tx_fee_sat.cst_decode(), + } + } +} +impl CstDecode for wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + crate::models::PrepareRefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } +} +impl CstDecode for wire_cst_prepare_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundResponse { + crate::models::PrepareRefundResponse { + refund_tx_weight: self.refund_tx_weight.cst_decode(), + refund_tx_fee_sat: self.refund_tx_fee_sat.cst_decode(), + } + } +} +impl CstDecode for wire_cst_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::Rate { + crate::fiat::Rate { + coin: self.coin.cst_decode(), + value: self.value.cst_decode(), + } + } +} +impl CstDecode for wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + crate::models::ReceiveOnchainRequest { + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } +} +impl CstDecode for wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + crate::models::ReceivePaymentRequest { + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + preimage: self.preimage.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + use_description_hash: self.use_description_hash.cst_decode(), + expiry: self.expiry.cst_decode(), + cltv: self.cltv.cst_decode(), + } + } +} +impl CstDecode for wire_cst_receive_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentResponse { + crate::models::ReceivePaymentResponse { + ln_invoice: self.ln_invoice.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + opening_fee_msat: self.opening_fee_msat.cst_decode(), + } + } +} +impl CstDecode for wire_cst_recommended_fees { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::chain::RecommendedFees { + crate::chain::RecommendedFees { + fastest_fee: self.fastest_fee.cst_decode(), + half_hour_fee: self.half_hour_fee.cst_decode(), + hour_fee: self.hour_fee.cst_decode(), + economy_fee: self.economy_fee.cst_decode(), + minimum_fee: self.minimum_fee.cst_decode(), + } + } +} +impl CstDecode for wire_cst_redeem_onchain_funds_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + crate::models::RedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_redeem_onchain_funds_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsResponse { + crate::models::RedeemOnchainFundsResponse { + txid: self.txid.cst_decode(), + } + } +} +impl CstDecode for wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + crate::models::RefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } +} +impl CstDecode for wire_cst_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundResponse { + crate::models::RefundResponse { + refund_tx_id: self.refund_tx_id.cst_decode(), + } + } +} +impl CstDecode for wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PaymentFailure }; + crate::models::ReportIssueRequest::PaymentFailure { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode + for wire_cst_report_payment_failure_details +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + crate::models::ReportPaymentFailureDetails { + payment_hash: self.payment_hash.cst_decode(), + comment: self.comment.cst_decode(), + } + } +} +impl CstDecode for wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + crate::models::ReverseSwapFeesRequest { + send_amount_sat: self.send_amount_sat.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } +} +impl CstDecode for wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + crate::models::ReverseSwapInfo { + id: self.id.cst_decode(), + claim_pubkey: self.claim_pubkey.cst_decode(), + lockup_txid: self.lockup_txid.cst_decode(), + claim_txid: self.claim_txid.cst_decode(), + onchain_amount_sat: self.onchain_amount_sat.cst_decode(), + status: self.status.cst_decode(), + } + } +} +impl CstDecode for wire_cst_reverse_swap_pair_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapPairInfo { + crate::models::ReverseSwapPairInfo { + min: self.min.cst_decode(), + max: self.max.cst_decode(), + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } +} +impl CstDecode for wire_cst_route_hint { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::RouteHint { + crate::invoice::RouteHint { + hops: self.hops.cst_decode(), + } + } +} +impl CstDecode for wire_cst_route_hint_hop { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::RouteHintHop { + crate::invoice::RouteHintHop { + src_node_id: self.src_node_id.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + fees_base_msat: self.fees_base_msat.cst_decode(), + fees_proportional_millionths: self.fees_proportional_millionths.cst_decode(), + cltv_expiry_delta: self.cltv_expiry_delta.cst_decode(), + htlc_minimum_msat: self.htlc_minimum_msat.cst_decode(), + htlc_maximum_msat: self.htlc_maximum_msat.cst_decode(), + } + } +} +impl CstDecode for wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + crate::models::SendOnchainRequest { + amount_sat: self.amount_sat.cst_decode(), + onchain_recipient_address: self.onchain_recipient_address.cst_decode(), + pair_hash: self.pair_hash.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } +} +impl CstDecode for wire_cst_send_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainResponse { + crate::models::SendOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } +} +impl CstDecode for wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + crate::models::SendPaymentRequest { + bolt11: self.bolt11.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + label: self.label.cst_decode(), + } + } +} +impl CstDecode for wire_cst_send_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentResponse { + crate::models::SendPaymentResponse { + payment: self.payment.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_send_spontaneous_payment_request +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + crate::models::SendSpontaneousPaymentRequest { + node_id: self.node_id.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + extra_tlvs: self.extra_tlvs.cst_decode(), + label: self.label.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_service_health_check_response +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ServiceHealthCheckResponse { + crate::models::ServiceHealthCheckResponse { + status: self.status.cst_decode(), + } + } +} +impl CstDecode for wire_cst_sign_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + crate::breez_services::SignMessageRequest { + message: self.message.cst_decode(), + } + } +} +impl CstDecode for wire_cst_sign_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageResponse { + crate::breez_services::SignMessageResponse { + signature: self.signature.cst_decode(), + } + } +} +impl CstDecode for wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + crate::models::StaticBackupRequest { + working_dir: self.working_dir.cst_decode(), + } + } +} +impl CstDecode for wire_cst_static_backup_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupResponse { + crate::models::StaticBackupResponse { + backup: self.backup.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_success_action_processed +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Aes }; + crate::lnurl::pay::model::SuccessActionProcessed::Aes { + result: ans.result.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Message }; + crate::lnurl::pay::model::SuccessActionProcessed::Message { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Url }; + crate::lnurl::pay::model::SuccessActionProcessed::Url { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + crate::models::SwapInfo { + bitcoin_address: self.bitcoin_address.cst_decode(), + created_at: self.created_at.cst_decode(), + lock_height: self.lock_height.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + preimage: self.preimage.cst_decode(), + private_key: self.private_key.cst_decode(), + public_key: self.public_key.cst_decode(), + swapper_public_key: self.swapper_public_key.cst_decode(), + script: self.script.cst_decode(), + bolt11: self.bolt11.cst_decode(), + paid_msat: self.paid_msat.cst_decode(), + total_incoming_txs: self.total_incoming_txs.cst_decode(), + confirmed_sats: self.confirmed_sats.cst_decode(), + unconfirmed_sats: self.unconfirmed_sats.cst_decode(), + status: self.status.cst_decode(), + refund_tx_ids: self.refund_tx_ids.cst_decode(), + unconfirmed_tx_ids: self.unconfirmed_tx_ids.cst_decode(), + confirmed_tx_ids: self.confirmed_tx_ids.cst_decode(), + min_allowed_deposit: self.min_allowed_deposit.cst_decode(), + max_allowed_deposit: self.max_allowed_deposit.cst_decode(), + max_swapper_payable: self.max_swapper_payable.cst_decode(), + last_redeem_error: self.last_redeem_error.cst_decode(), + channel_opening_fees: self.channel_opening_fees.cst_decode(), + confirmed_at: self.confirmed_at.cst_decode(), + } + } +} +impl CstDecode for wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::Symbol { + crate::fiat::Symbol { + grapheme: self.grapheme.cst_decode(), + template: self.template.cst_decode(), + rtl: self.rtl.cst_decode(), + position: self.position.cst_decode(), + } + } +} +impl CstDecode for wire_cst_tlv_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::TlvEntry { + crate::models::TlvEntry { + field_number: self.field_number.cst_decode(), + value: self.value.cst_decode(), + } + } +} +impl CstDecode for wire_cst_unspent_transaction_output { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::UnspentTransactionOutput { + crate::models::UnspentTransactionOutput { + txid: self.txid.cst_decode(), + outnum: self.outnum.cst_decode(), + amount_millisatoshi: self.amount_millisatoshi.cst_decode(), + address: self.address.cst_decode(), + reserved: self.reserved.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_url_success_action_data +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::UrlSuccessActionData { + crate::lnurl::pay::model::UrlSuccessActionData { + description: self.description.cst_decode(), + url: self.url.cst_decode(), + } + } +} +impl NewWithNullPtr for wire_cst_aes_success_action_data_decrypted { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + plaintext: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_aes_success_action_data_decrypted { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_aes_success_action_data_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AesSuccessActionDataResultKind { nil__: () }, + } + } +} +impl Default for wire_cst_aes_success_action_data_result { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_backup_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_backup_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_backup_status { + fn new_with_null_ptr() -> Self { + Self { + backed_up: Default::default(), + last_backup_time: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_backup_status { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_bitcoin_address_data { + fn new_with_null_ptr() -> Self { + Self { + address: core::ptr::null_mut(), + network: Default::default(), + amount_sat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + message: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_bitcoin_address_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_breez_event { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: BreezEventKind { nil__: () }, + } + } +} +impl Default for wire_cst_breez_event { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_buy_bitcoin_request { + fn new_with_null_ptr() -> Self { + Self { + provider: Default::default(), + opening_fee_params: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_buy_bitcoin_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_buy_bitcoin_response { + fn new_with_null_ptr() -> Self { + Self { + url: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_buy_bitcoin_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_check_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + signature: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_check_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_check_message_response { + fn new_with_null_ptr() -> Self { + Self { + is_valid: Default::default(), + } + } +} +impl Default for wire_cst_check_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_closed_channel_payment_details { + fn new_with_null_ptr() -> Self { + Self { + state: Default::default(), + funding_txid: core::ptr::null_mut(), + short_channel_id: core::ptr::null_mut(), + closing_txid: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_closed_channel_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_config { + fn new_with_null_ptr() -> Self { + Self { + breezserver: core::ptr::null_mut(), + chainnotifier_url: core::ptr::null_mut(), + mempoolspace_url: core::ptr::null_mut(), + working_dir: core::ptr::null_mut(), + network: Default::default(), + payment_timeout_sec: Default::default(), + default_lsp_id: core::ptr::null_mut(), + api_key: core::ptr::null_mut(), + maxfee_percent: Default::default(), + exemptfee_msat: Default::default(), + node_config: Default::default(), + } + } +} +impl Default for wire_cst_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_configure_node_request { + fn new_with_null_ptr() -> Self { + Self { + close_to_address: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_configure_node_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_connect_request { + fn new_with_null_ptr() -> Self { + Self { + config: Default::default(), + seed: core::ptr::null_mut(), + restore_only: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_connect_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_currency_info { + fn new_with_null_ptr() -> Self { + Self { + name: core::ptr::null_mut(), + fraction_size: Default::default(), + spacing: core::ptr::null_mut(), + symbol: core::ptr::null_mut(), + uniq_symbol: core::ptr::null_mut(), + localized_name: core::ptr::null_mut(), + locale_overrides: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_currency_info { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_fiat_currency { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + info: Default::default(), + } + } +} +impl Default for wire_cst_fiat_currency { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_greenlight_credentials { + fn new_with_null_ptr() -> Self { + Self { + device_key: core::ptr::null_mut(), + device_cert: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_greenlight_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_greenlight_node_config { + fn new_with_null_ptr() -> Self { + Self { + partner_credentials: core::ptr::null_mut(), + invite_code: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_greenlight_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_input_type { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: InputTypeKind { nil__: () }, + } + } +} +impl Default for wire_cst_input_type { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_invoice_paid_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + payment: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_invoice_paid_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_list_payments_request { + fn new_with_null_ptr() -> Self { + Self { + filters: core::ptr::null_mut(), + metadata_filters: core::ptr::null_mut(), + from_timestamp: core::ptr::null_mut(), + to_timestamp: core::ptr::null_mut(), + include_failures: core::ptr::null_mut(), + offset: core::ptr::null_mut(), + limit: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_list_payments_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_invoice { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + network: Default::default(), + payee_pubkey: core::ptr::null_mut(), + payment_hash: core::ptr::null_mut(), + description: core::ptr::null_mut(), + description_hash: core::ptr::null_mut(), + amount_msat: core::ptr::null_mut(), + timestamp: Default::default(), + expiry: Default::default(), + routing_hints: core::ptr::null_mut(), + payment_secret: core::ptr::null_mut(), + min_final_cltv_expiry_delta: Default::default(), + } + } +} +impl Default for wire_cst_ln_invoice { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_payment_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + label: core::ptr::null_mut(), + destination_pubkey: core::ptr::null_mut(), + payment_preimage: core::ptr::null_mut(), + keysend: Default::default(), + bolt11: core::ptr::null_mut(), + open_channel_bolt11: core::ptr::null_mut(), + lnurl_success_action: core::ptr::null_mut(), + lnurl_pay_domain: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + lnurl_metadata: core::ptr::null_mut(), + lnurl_withdraw_endpoint: core::ptr::null_mut(), + swap_info: core::ptr::null_mut(), + reverse_swap_info: core::ptr::null_mut(), + pending_expiration_block: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_auth_request_data { + fn new_with_null_ptr() -> Self { + Self { + k1: core::ptr::null_mut(), + action: core::ptr::null_mut(), + domain: core::ptr::null_mut(), + url: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_auth_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_callback_status { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlCallbackStatusKind { nil__: () }, + } + } +} +impl Default for wire_cst_ln_url_callback_status { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_error_data { + fn new_with_null_ptr() -> Self { + Self { + reason: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_error_data { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + reason: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + comment: core::ptr::null_mut(), + payment_label: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + min_sendable: Default::default(), + max_sendable: Default::default(), + metadata_str: core::ptr::null_mut(), + comment_allowed: Default::default(), + domain: core::ptr::null_mut(), + allows_nostr: Default::default(), + nostr_pubkey: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayResultKind { nil__: () }, + } + } +} +impl Default for wire_cst_ln_url_pay_result { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + success_action: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_withdraw_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + description: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_withdraw_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_withdraw_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + k1: core::ptr::null_mut(), + default_description: core::ptr::null_mut(), + min_withdrawable: Default::default(), + max_withdrawable: Default::default(), + } + } +} +impl Default for wire_cst_ln_url_withdraw_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_withdraw_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlWithdrawResultKind { nil__: () }, + } + } +} +impl Default for wire_cst_ln_url_withdraw_result { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_withdraw_success_data { + fn new_with_null_ptr() -> Self { + Self { + invoice: Default::default(), + } + } +} +impl Default for wire_cst_ln_url_withdraw_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_locale_overrides { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + spacing: core::ptr::null_mut(), + symbol: Default::default(), + } + } +} +impl Default for wire_cst_locale_overrides { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_localized_name { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + name: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_localized_name { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_log_entry { + fn new_with_null_ptr() -> Self { + Self { + line: core::ptr::null_mut(), + level: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_log_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_lsp_information { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + name: core::ptr::null_mut(), + widget_url: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + host: core::ptr::null_mut(), + base_fee_msat: Default::default(), + fee_rate: Default::default(), + time_lock_delta: Default::default(), + min_htlc_msat: Default::default(), + lsp_pubkey: core::ptr::null_mut(), + opening_fee_params_list: Default::default(), + } + } +} +impl Default for wire_cst_lsp_information { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_max_reverse_swap_amount_response { + fn new_with_null_ptr() -> Self { + Self { + total_sat: Default::default(), + } + } +} +impl Default for wire_cst_max_reverse_swap_amount_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_message_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_message_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_metadata_filter { + fn new_with_null_ptr() -> Self { + Self { + json_path: core::ptr::null_mut(), + json_value: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_metadata_filter { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_node_config { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeConfigKind { nil__: () }, + } + } +} +impl Default for wire_cst_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_node_credentials { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeCredentialsKind { nil__: () }, + } + } +} +impl Default for wire_cst_node_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_node_state { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + block_height: Default::default(), + channels_balance_msat: Default::default(), + onchain_balance_msat: Default::default(), + pending_onchain_balance_msat: Default::default(), + utxos: core::ptr::null_mut(), + max_payable_msat: Default::default(), + max_receivable_msat: Default::default(), + max_single_payment_amount_msat: Default::default(), + max_chan_reserve_msats: Default::default(), + connected_peers: core::ptr::null_mut(), + inbound_liquidity_msats: Default::default(), + } + } +} +impl Default for wire_cst_node_state { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_onchain_payment_limits_response { + fn new_with_null_ptr() -> Self { + Self { + min_sat: Default::default(), + max_sat: Default::default(), + } + } +} +impl Default for wire_cst_onchain_payment_limits_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_open_channel_fee_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_open_channel_fee_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_open_channel_fee_response { + fn new_with_null_ptr() -> Self { + Self { + fee_msat: core::ptr::null_mut(), + fee_params: Default::default(), + } + } +} +impl Default for wire_cst_open_channel_fee_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_opening_fee_params { + fn new_with_null_ptr() -> Self { + Self { + min_msat: Default::default(), + proportional: Default::default(), + valid_until: core::ptr::null_mut(), + max_idle_time: Default::default(), + max_client_to_self_delay: Default::default(), + promise: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_opening_fee_params { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_opening_fee_params_menu { + fn new_with_null_ptr() -> Self { + Self { + values: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_opening_fee_params_menu { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_pay_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + recipient_address: core::ptr::null_mut(), + prepare_res: Default::default(), + } + } +} +impl Default for wire_cst_pay_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_pay_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } +} +impl Default for wire_cst_pay_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_payment { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + payment_type: Default::default(), + payment_time: Default::default(), + amount_msat: Default::default(), + fee_msat: Default::default(), + status: Default::default(), + error: core::ptr::null_mut(), + description: core::ptr::null_mut(), + details: Default::default(), + metadata: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_payment { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_payment_details { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PaymentDetailsKind { nil__: () }, + } + } +} +impl Default for wire_cst_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_payment_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + node_id: core::ptr::null_mut(), + invoice: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_payment_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_onchain_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + amount_type: Default::default(), + claim_tx_feerate: Default::default(), + } + } +} +impl Default for wire_cst_prepare_onchain_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_onchain_payment_response { + fn new_with_null_ptr() -> Self { + Self { + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + sender_amount_sat: Default::default(), + recipient_amount_sat: Default::default(), + total_fees: Default::default(), + } + } +} +impl Default for wire_cst_prepare_onchain_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } +} +impl Default for wire_cst_prepare_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + tx_weight: Default::default(), + tx_fee_sat: Default::default(), + } + } +} +impl Default for wire_cst_prepare_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } +} +impl Default for wire_cst_prepare_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_prepare_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_weight: Default::default(), + refund_tx_fee_sat: Default::default(), + } + } +} +impl Default for wire_cst_prepare_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_rate { + fn new_with_null_ptr() -> Self { + Self { + coin: core::ptr::null_mut(), + value: Default::default(), + } + } +} +impl Default for wire_cst_rate { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_receive_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + opening_fee_params: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_receive_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_receive_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: Default::default(), + description: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + use_description_hash: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + cltv: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_receive_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_receive_payment_response { + fn new_with_null_ptr() -> Self { + Self { + ln_invoice: Default::default(), + opening_fee_params: core::ptr::null_mut(), + opening_fee_msat: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_receive_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_recommended_fees { + fn new_with_null_ptr() -> Self { + Self { + fastest_fee: Default::default(), + half_hour_fee: Default::default(), + hour_fee: Default::default(), + economy_fee: Default::default(), + minimum_fee: Default::default(), + } + } +} +impl Default for wire_cst_recommended_fees { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } +} +impl Default for wire_cst_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } +} +impl Default for wire_cst_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_id: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_report_issue_request { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ReportIssueRequestKind { nil__: () }, + } + } +} +impl Default for wire_cst_report_issue_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_report_payment_failure_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + comment: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_report_payment_failure_details { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_reverse_swap_fees_request { + fn new_with_null_ptr() -> Self { + Self { + send_amount_sat: core::ptr::null_mut(), + claim_tx_feerate: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_reverse_swap_fees_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_reverse_swap_info { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + claim_pubkey: core::ptr::null_mut(), + lockup_txid: core::ptr::null_mut(), + claim_txid: core::ptr::null_mut(), + onchain_amount_sat: Default::default(), + status: Default::default(), + } + } +} +impl Default for wire_cst_reverse_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_reverse_swap_pair_info { + fn new_with_null_ptr() -> Self { + Self { + min: Default::default(), + max: Default::default(), + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + total_fees: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_reverse_swap_pair_info { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_route_hint { + fn new_with_null_ptr() -> Self { + Self { + hops: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_route_hint { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_route_hint_hop { + fn new_with_null_ptr() -> Self { + Self { + src_node_id: core::ptr::null_mut(), + short_channel_id: Default::default(), + fees_base_msat: Default::default(), + fees_proportional_millionths: Default::default(), + cltv_expiry_delta: Default::default(), + htlc_minimum_msat: core::ptr::null_mut(), + htlc_maximum_msat: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_route_hint_hop { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_send_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + onchain_recipient_address: core::ptr::null_mut(), + pair_hash: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } +} +impl Default for wire_cst_send_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_send_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } +} +impl Default for wire_cst_send_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_send_payment_request { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + amount_msat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_send_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_send_payment_response { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + } + } +} +impl Default for wire_cst_send_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_send_spontaneous_payment_request { + fn new_with_null_ptr() -> Self { + Self { + node_id: core::ptr::null_mut(), + amount_msat: Default::default(), + extra_tlvs: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_send_spontaneous_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_service_health_check_response { + fn new_with_null_ptr() -> Self { + Self { + status: Default::default(), + } + } +} +impl Default for wire_cst_service_health_check_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_sign_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_sign_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_sign_message_response { + fn new_with_null_ptr() -> Self { + Self { + signature: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_sign_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_static_backup_request { + fn new_with_null_ptr() -> Self { + Self { + working_dir: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_static_backup_request { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_static_backup_response { + fn new_with_null_ptr() -> Self { + Self { + backup: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_static_backup_response { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_success_action_processed { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SuccessActionProcessedKind { nil__: () }, + } + } +} +impl Default for wire_cst_success_action_processed { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_swap_info { + fn new_with_null_ptr() -> Self { + Self { + bitcoin_address: core::ptr::null_mut(), + created_at: Default::default(), + lock_height: Default::default(), + payment_hash: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + private_key: core::ptr::null_mut(), + public_key: core::ptr::null_mut(), + swapper_public_key: core::ptr::null_mut(), + script: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + paid_msat: Default::default(), + total_incoming_txs: Default::default(), + confirmed_sats: Default::default(), + unconfirmed_sats: Default::default(), + status: Default::default(), + refund_tx_ids: core::ptr::null_mut(), + unconfirmed_tx_ids: core::ptr::null_mut(), + confirmed_tx_ids: core::ptr::null_mut(), + min_allowed_deposit: Default::default(), + max_allowed_deposit: Default::default(), + max_swapper_payable: Default::default(), + last_redeem_error: core::ptr::null_mut(), + channel_opening_fees: core::ptr::null_mut(), + confirmed_at: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_symbol { + fn new_with_null_ptr() -> Self { + Self { + grapheme: core::ptr::null_mut(), + template: core::ptr::null_mut(), + rtl: core::ptr::null_mut(), + position: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_symbol { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_tlv_entry { + fn new_with_null_ptr() -> Self { + Self { + field_number: Default::default(), + value: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_tlv_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_unspent_transaction_output { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + outnum: Default::default(), + amount_millisatoshi: Default::default(), + address: core::ptr::null_mut(), + reserved: Default::default(), + } + } +} +impl Default for wire_cst_unspent_transaction_output { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_url_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + url: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_url_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_backup(port_: i64) { + wire_backup_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_backup_status(port_: i64) { + wire_backup_status_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_breez_events_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire_breez_events_stream_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_breez_log_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire_breez_log_stream_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_buy_bitcoin( + port_: i64, + req: *mut wire_cst_buy_bitcoin_request, +) { + wire_buy_bitcoin_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_check_message( + port_: i64, + req: *mut wire_cst_check_message_request, +) { + wire_check_message_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_close_lsp_channels(port_: i64) { + wire_close_lsp_channels_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_configure_node( + port_: i64, + req: *mut wire_cst_configure_node_request, +) { + wire_configure_node_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_connect(port_: i64, req: *mut wire_cst_connect_request) { + wire_connect_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_connect_lsp( + port_: i64, + lsp_id: *mut wire_cst_list_prim_u_8_strict, +) { + wire_connect_lsp_impl(port_, lsp_id) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_default_config( + port_: i64, + env_type: i32, + api_key: *mut wire_cst_list_prim_u_8_strict, + node_config: *mut wire_cst_node_config, +) { + wire_default_config_impl(port_, env_type, api_key, node_config) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_disconnect(port_: i64) { + wire_disconnect_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_execute_command( + port_: i64, + command: *mut wire_cst_list_prim_u_8_strict, +) { + wire_execute_command_impl(port_, command) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_fetch_fiat_rates(port_: i64) { + wire_fetch_fiat_rates_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_fetch_lsp_info( + port_: i64, + id: *mut wire_cst_list_prim_u_8_strict, +) { + wire_fetch_lsp_info_impl(port_, id) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_fetch_reverse_swap_fees( + port_: i64, + req: *mut wire_cst_reverse_swap_fees_request, +) { + wire_fetch_reverse_swap_fees_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_generate_diagnostic_data(port_: i64) { + wire_generate_diagnostic_data_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_in_progress_onchain_payments(port_: i64) { + wire_in_progress_onchain_payments_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_in_progress_reverse_swaps(port_: i64) { + wire_in_progress_reverse_swaps_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_in_progress_swap(port_: i64) { + wire_in_progress_swap_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_is_initialized(port_: i64) { + wire_is_initialized_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_list_fiat_currencies(port_: i64) { + wire_list_fiat_currencies_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_list_lsps(port_: i64) { + wire_list_lsps_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_list_payments( + port_: i64, + req: *mut wire_cst_list_payments_request, +) { + wire_list_payments_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_list_refundables(port_: i64) { + wire_list_refundables_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_lnurl_auth( + port_: i64, + req_data: *mut wire_cst_ln_url_auth_request_data, +) { + wire_lnurl_auth_impl(port_, req_data) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_lnurl_pay( + port_: i64, + req: *mut wire_cst_ln_url_pay_request, +) { + wire_lnurl_pay_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_lnurl_withdraw( + port_: i64, + req: *mut wire_cst_ln_url_withdraw_request, +) { + wire_lnurl_withdraw_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_lsp_id(port_: i64) { + wire_lsp_id_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_lsp_info(port_: i64) { + wire_lsp_info_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_max_reverse_swap_amount(port_: i64) { + wire_max_reverse_swap_amount_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_mnemonic_to_seed( + port_: i64, + phrase: *mut wire_cst_list_prim_u_8_strict, +) { + wire_mnemonic_to_seed_impl(port_, phrase) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_node_credentials(port_: i64) { + wire_node_credentials_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_node_info(port_: i64) { + wire_node_info_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_onchain_payment_limits(port_: i64) { + wire_onchain_payment_limits_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_open_channel_fee( + port_: i64, + req: *mut wire_cst_open_channel_fee_request, +) { + wire_open_channel_fee_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_parse_input( + port_: i64, + input: *mut wire_cst_list_prim_u_8_strict, +) { + wire_parse_input_impl(port_, input) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_parse_invoice( + port_: i64, + invoice: *mut wire_cst_list_prim_u_8_strict, +) { + wire_parse_invoice_impl(port_, invoice) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_pay_onchain( + port_: i64, + req: *mut wire_cst_pay_onchain_request, +) { + wire_pay_onchain_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_payment_by_hash( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, +) { + wire_payment_by_hash_impl(port_, hash) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_prepare_onchain_payment( + port_: i64, + req: *mut wire_cst_prepare_onchain_payment_request, +) { + wire_prepare_onchain_payment_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_prepare_redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_prepare_redeem_onchain_funds_request, +) { + wire_prepare_redeem_onchain_funds_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_prepare_refund( + port_: i64, + req: *mut wire_cst_prepare_refund_request, +) { + wire_prepare_refund_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_receive_onchain( + port_: i64, + req: *mut wire_cst_receive_onchain_request, +) { + wire_receive_onchain_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_receive_payment( + port_: i64, + req: *mut wire_cst_receive_payment_request, +) { + wire_receive_payment_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_recommended_fees(port_: i64) { + wire_recommended_fees_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_redeem_onchain_funds_request, +) { + wire_redeem_onchain_funds_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_redeem_swap( + port_: i64, + swap_address: *mut wire_cst_list_prim_u_8_strict, +) { + wire_redeem_swap_impl(port_, swap_address) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_refund(port_: i64, req: *mut wire_cst_refund_request) { + wire_refund_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_register_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, +) { + wire_register_webhook_impl(port_, webhook_url) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_report_issue( + port_: i64, + req: *mut wire_cst_report_issue_request, +) { + wire_report_issue_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_rescan_swaps(port_: i64) { + wire_rescan_swaps_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_send_onchain( + port_: i64, + req: *mut wire_cst_send_onchain_request, +) { + wire_send_onchain_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_send_payment( + port_: i64, + req: *mut wire_cst_send_payment_request, +) { + wire_send_payment_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_send_spontaneous_payment( + port_: i64, + req: *mut wire_cst_send_spontaneous_payment_request, +) { + wire_send_spontaneous_payment_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_service_health_check( + port_: i64, + api_key: *mut wire_cst_list_prim_u_8_strict, +) { + wire_service_health_check_impl(port_, api_key) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_set_payment_metadata( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, + metadata: *mut wire_cst_list_prim_u_8_strict, +) { + wire_set_payment_metadata_impl(port_, hash, metadata) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_sign_message( + port_: i64, + req: *mut wire_cst_sign_message_request, +) { + wire_sign_message_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_static_backup( + port_: i64, + req: *mut wire_cst_static_backup_request, +) { + wire_static_backup_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_sync(port_: i64) { + wire_sync_impl(port_) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( +) -> *mut wire_cst_aes_success_action_data_decrypted { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_decrypted::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result( +) -> *mut wire_cst_aes_success_action_data_result { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_result::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data( +) -> *mut wire_cst_backup_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_backup_failed_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data( +) -> *mut wire_cst_bitcoin_address_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bitcoin_address_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bool(value: bool) -> *mut bool { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request( +) -> *mut wire_cst_buy_bitcoin_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_buy_bitcoin_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_check_message_request( +) -> *mut wire_cst_check_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_check_message_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details( +) -> *mut wire_cst_closed_channel_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_closed_channel_payment_details::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request( +) -> *mut wire_cst_configure_node_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_configure_node_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_connect_request( +) -> *mut wire_cst_connect_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_connect_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials( +) -> *mut wire_cst_greenlight_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_credentials::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config( +) -> *mut wire_cst_greenlight_node_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_node_config::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_i_64(value: i64) -> *mut i64 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details( +) -> *mut wire_cst_invoice_paid_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_invoice_paid_details::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request( +) -> *mut wire_cst_list_payments_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_list_payments_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice() -> *mut wire_cst_ln_invoice { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_ln_invoice::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details( +) -> *mut wire_cst_ln_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_payment_details::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data( +) -> *mut wire_cst_ln_url_auth_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_auth_request_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data( +) -> *mut wire_cst_ln_url_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_error_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data( +) -> *mut wire_cst_ln_url_pay_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_error_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request( +) -> *mut wire_cst_ln_url_pay_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data( +) -> *mut wire_cst_ln_url_pay_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data( +) -> *mut wire_cst_ln_url_pay_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_success_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request( +) -> *mut wire_cst_ln_url_withdraw_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data( +) -> *mut wire_cst_ln_url_withdraw_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data( +) -> *mut wire_cst_ln_url_withdraw_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_success_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_lsp_information( +) -> *mut wire_cst_lsp_information { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_lsp_information::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data( +) -> *mut wire_cst_message_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_message_success_action_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_config() -> *mut wire_cst_node_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_node_config::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_credentials( +) -> *mut wire_cst_node_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_node_credentials::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request( +) -> *mut wire_cst_open_channel_fee_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_open_channel_fee_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params( +) -> *mut wire_cst_opening_fee_params { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_opening_fee_params::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request( +) -> *mut wire_cst_pay_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_pay_onchain_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment() -> *mut wire_cst_payment { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_payment::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data( +) -> *mut wire_cst_payment_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_payment_failed_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request( +) -> *mut wire_cst_prepare_onchain_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_onchain_payment_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request( +) -> *mut wire_cst_prepare_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_redeem_onchain_funds_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request( +) -> *mut wire_cst_prepare_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_refund_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request( +) -> *mut wire_cst_receive_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_onchain_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request( +) -> *mut wire_cst_receive_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_payment_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request( +) -> *mut wire_cst_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_redeem_onchain_funds_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_refund_request( +) -> *mut wire_cst_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_refund_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request( +) -> *mut wire_cst_report_issue_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_issue_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details( +) -> *mut wire_cst_report_payment_failure_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_payment_failure_details::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request( +) -> *mut wire_cst_reverse_swap_fees_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_fees_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info( +) -> *mut wire_cst_reverse_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_info::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request( +) -> *mut wire_cst_send_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_onchain_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request( +) -> *mut wire_cst_send_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_payment_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request( +) -> *mut wire_cst_send_spontaneous_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_spontaneous_payment_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request( +) -> *mut wire_cst_sign_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_sign_message_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request( +) -> *mut wire_cst_static_backup_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_static_backup_request::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed( +) -> *mut wire_cst_success_action_processed { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_success_action_processed::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_swap_info() -> *mut wire_cst_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_swap_info::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_symbol() -> *mut wire_cst_symbol { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_symbol::new_with_null_ptr()) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_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_breez_sdk_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_breez_sdk_cst_new_box_autoadd_url_success_action_data( +) -> *mut wire_cst_url_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_url_success_action_data::new_with_null_ptr(), + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_list_String(len: i32) -> *mut wire_cst_list_String { + let wrap = wire_cst_list_String { + 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_breez_sdk_cst_new_list_fiat_currency( + len: i32, +) -> *mut wire_cst_list_fiat_currency { + let wrap = wire_cst_list_fiat_currency { + 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_breez_sdk_cst_new_list_locale_overrides( + len: i32, +) -> *mut wire_cst_list_locale_overrides { + let wrap = wire_cst_list_locale_overrides { + 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_breez_sdk_cst_new_list_localized_name( + len: i32, +) -> *mut wire_cst_list_localized_name { + let wrap = wire_cst_list_localized_name { + 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_breez_sdk_cst_new_list_lsp_information( + len: i32, +) -> *mut wire_cst_list_lsp_information { + let wrap = wire_cst_list_lsp_information { + 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_breez_sdk_cst_new_list_metadata_filter( + len: i32, +) -> *mut wire_cst_list_metadata_filter { + let wrap = wire_cst_list_metadata_filter { + 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_breez_sdk_cst_new_list_opening_fee_params( + len: i32, +) -> *mut wire_cst_list_opening_fee_params { + let wrap = wire_cst_list_opening_fee_params { + 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_breez_sdk_cst_new_list_payment(len: i32) -> *mut wire_cst_list_payment { + let wrap = wire_cst_list_payment { + 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_breez_sdk_cst_new_list_payment_type_filter( + len: i32, +) -> *mut wire_cst_list_payment_type_filter { + let wrap = wire_cst_list_payment_type_filter { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_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_breez_sdk_cst_new_list_rate(len: i32) -> *mut wire_cst_list_rate { + let wrap = wire_cst_list_rate { + 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_breez_sdk_cst_new_list_reverse_swap_info( + len: i32, +) -> *mut wire_cst_list_reverse_swap_info { + let wrap = wire_cst_list_reverse_swap_info { + 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_breez_sdk_cst_new_list_route_hint( + len: i32, +) -> *mut wire_cst_list_route_hint { + let wrap = wire_cst_list_route_hint { + 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_breez_sdk_cst_new_list_route_hint_hop( + len: i32, +) -> *mut wire_cst_list_route_hint_hop { + let wrap = wire_cst_list_route_hint_hop { + 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_breez_sdk_cst_new_list_swap_info( + len: i32, +) -> *mut wire_cst_list_swap_info { + let wrap = wire_cst_list_swap_info { + 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_breez_sdk_cst_new_list_tlv_entry( + len: i32, +) -> *mut wire_cst_list_tlv_entry { + let wrap = wire_cst_list_tlv_entry { + 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_breez_sdk_cst_new_list_unspent_transaction_output( + len: i32, +) -> *mut wire_cst_list_unspent_transaction_output { + let wrap = wire_cst_list_unspent_transaction_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) +} + +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_aes_success_action_data_decrypted { + description: *mut wire_cst_list_prim_u_8_strict, + plaintext: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_aes_success_action_data_result { + tag: i32, + kind: AesSuccessActionDataResultKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union AesSuccessActionDataResultKind { + Decrypted: wire_cst_AesSuccessActionDataResult_Decrypted, + ErrorStatus: wire_cst_AesSuccessActionDataResult_ErrorStatus, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AesSuccessActionDataResult_Decrypted { + data: *mut wire_cst_aes_success_action_data_decrypted, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_AesSuccessActionDataResult_ErrorStatus { + reason: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_backup_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_backup_status { + backed_up: bool, + last_backup_time: *mut u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_bitcoin_address_data { + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, + amount_sat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, + message: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_breez_event { + tag: i32, + kind: BreezEventKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union BreezEventKind { + NewBlock: wire_cst_BreezEvent_NewBlock, + InvoicePaid: wire_cst_BreezEvent_InvoicePaid, + PaymentSucceed: wire_cst_BreezEvent_PaymentSucceed, + PaymentFailed: wire_cst_BreezEvent_PaymentFailed, + BackupFailed: wire_cst_BreezEvent_BackupFailed, + SwapUpdated: wire_cst_BreezEvent_SwapUpdated, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_NewBlock { + block: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_InvoicePaid { + details: *mut wire_cst_invoice_paid_details, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_PaymentSucceed { + details: *mut wire_cst_payment, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_PaymentFailed { + details: *mut wire_cst_payment_failed_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_BackupFailed { + details: *mut wire_cst_backup_failed_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_BreezEvent_SwapUpdated { + details: *mut wire_cst_swap_info, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_buy_bitcoin_request { + provider: i32, + opening_fee_params: *mut wire_cst_opening_fee_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_buy_bitcoin_response { + url: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_check_message_request { + message: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + signature: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_check_message_response { + is_valid: bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_closed_channel_payment_details { + state: i32, + funding_txid: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: *mut wire_cst_list_prim_u_8_strict, + closing_txid: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_config { + breezserver: *mut wire_cst_list_prim_u_8_strict, + chainnotifier_url: *mut wire_cst_list_prim_u_8_strict, + mempoolspace_url: *mut wire_cst_list_prim_u_8_strict, + working_dir: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payment_timeout_sec: u32, + default_lsp_id: *mut wire_cst_list_prim_u_8_strict, + api_key: *mut wire_cst_list_prim_u_8_strict, + maxfee_percent: f64, + exemptfee_msat: u64, + node_config: wire_cst_node_config, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_configure_node_request { + close_to_address: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_connect_request { + config: wire_cst_config, + seed: *mut wire_cst_list_prim_u_8_strict, + restore_only: *mut bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_currency_info { + name: *mut wire_cst_list_prim_u_8_strict, + fraction_size: u32, + spacing: *mut u32, + symbol: *mut wire_cst_symbol, + uniq_symbol: *mut wire_cst_symbol, + localized_name: *mut wire_cst_list_localized_name, + locale_overrides: *mut wire_cst_list_locale_overrides, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_fiat_currency { + id: *mut wire_cst_list_prim_u_8_strict, + info: wire_cst_currency_info, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_greenlight_credentials { + device_key: *mut wire_cst_list_prim_u_8_strict, + device_cert: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_greenlight_node_config { + partner_credentials: *mut wire_cst_greenlight_credentials, + invite_code: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_input_type { + tag: i32, + kind: InputTypeKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union InputTypeKind { + BitcoinAddress: wire_cst_InputType_BitcoinAddress, + Bolt11: wire_cst_InputType_Bolt11, + NodeId: wire_cst_InputType_NodeId, + Url: wire_cst_InputType_Url, + LnUrlPay: wire_cst_InputType_LnUrlPay, + LnUrlWithdraw: wire_cst_InputType_LnUrlWithdraw, + LnUrlAuth: wire_cst_InputType_LnUrlAuth, + LnUrlError: wire_cst_InputType_LnUrlError, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_BitcoinAddress { + address: *mut wire_cst_bitcoin_address_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_Bolt11 { + invoice: *mut wire_cst_ln_invoice, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_NodeId { + node_id: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_Url { + url: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_LnUrlPay { + data: *mut wire_cst_ln_url_pay_request_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_LnUrlWithdraw { + data: *mut wire_cst_ln_url_withdraw_request_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_LnUrlAuth { + data: *mut wire_cst_ln_url_auth_request_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_InputType_LnUrlError { + data: *mut wire_cst_ln_url_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_invoice_paid_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + payment: *mut wire_cst_payment, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_String { + ptr: *mut *mut wire_cst_list_prim_u_8_strict, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_fiat_currency { + ptr: *mut wire_cst_fiat_currency, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_locale_overrides { + ptr: *mut wire_cst_locale_overrides, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_localized_name { + ptr: *mut wire_cst_localized_name, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_lsp_information { + ptr: *mut wire_cst_lsp_information, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_metadata_filter { + ptr: *mut wire_cst_metadata_filter, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_opening_fee_params { + ptr: *mut wire_cst_opening_fee_params, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_payment { + ptr: *mut wire_cst_payment, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_payment_type_filter { + ptr: *mut i32, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_payments_request { + filters: *mut wire_cst_list_payment_type_filter, + metadata_filters: *mut wire_cst_list_metadata_filter, + from_timestamp: *mut i64, + to_timestamp: *mut i64, + include_failures: *mut bool, + offset: *mut u32, + limit: *mut u32, +} +#[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_rate { + ptr: *mut wire_cst_rate, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_reverse_swap_info { + ptr: *mut wire_cst_reverse_swap_info, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_route_hint { + ptr: *mut wire_cst_route_hint, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_route_hint_hop { + ptr: *mut wire_cst_route_hint_hop, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_swap_info { + ptr: *mut wire_cst_swap_info, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_tlv_entry { + ptr: *mut wire_cst_tlv_entry, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_list_unspent_transaction_output { + ptr: *mut wire_cst_unspent_transaction_output, + len: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_invoice { + bolt11: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payee_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + description_hash: *mut wire_cst_list_prim_u_8_strict, + amount_msat: *mut u64, + timestamp: u64, + expiry: u64, + routing_hints: *mut wire_cst_list_route_hint, + payment_secret: *mut wire_cst_list_prim_u_8_strict, + min_final_cltv_expiry_delta: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_payment_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + label: *mut wire_cst_list_prim_u_8_strict, + destination_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_preimage: *mut wire_cst_list_prim_u_8_strict, + keysend: bool, + bolt11: *mut wire_cst_list_prim_u_8_strict, + open_channel_bolt11: *mut wire_cst_list_prim_u_8_strict, + lnurl_success_action: *mut wire_cst_success_action_processed, + lnurl_pay_domain: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + lnurl_metadata: *mut wire_cst_list_prim_u_8_strict, + lnurl_withdraw_endpoint: *mut wire_cst_list_prim_u_8_strict, + swap_info: *mut wire_cst_swap_info, + reverse_swap_info: *mut wire_cst_reverse_swap_info, + pending_expiration_block: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_auth_request_data { + k1: *mut wire_cst_list_prim_u_8_strict, + action: *mut wire_cst_list_prim_u_8_strict, + domain: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_callback_status { + tag: i32, + kind: LnUrlCallbackStatusKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LnUrlCallbackStatusKind { + ErrorStatus: wire_cst_LnUrlCallbackStatus_ErrorStatus, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlCallbackStatus_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_error_data { + reason: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_error_data { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + reason: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_request { + data: wire_cst_ln_url_pay_request_data, + amount_msat: u64, + comment: *mut wire_cst_list_prim_u_8_strict, + payment_label: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + min_sendable: u64, + max_sendable: u64, + metadata_str: *mut wire_cst_list_prim_u_8_strict, + comment_allowed: u16, + domain: *mut wire_cst_list_prim_u_8_strict, + allows_nostr: bool, + nostr_pubkey: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_result { + tag: i32, + kind: LnUrlPayResultKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LnUrlPayResultKind { + EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, + EndpointError: wire_cst_LnUrlPayResult_EndpointError, + PayError: wire_cst_LnUrlPayResult_PayError, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_EndpointSuccess { + data: *mut wire_cst_ln_url_pay_success_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_EndpointError { + data: *mut wire_cst_ln_url_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_PayError { + data: *mut wire_cst_ln_url_pay_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_success_data { + payment: wire_cst_payment, + success_action: *mut wire_cst_success_action_processed, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_withdraw_request { + data: wire_cst_ln_url_withdraw_request_data, + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_withdraw_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + k1: *mut wire_cst_list_prim_u_8_strict, + default_description: *mut wire_cst_list_prim_u_8_strict, + min_withdrawable: u64, + max_withdrawable: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_withdraw_result { + tag: i32, + kind: LnUrlWithdrawResultKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LnUrlWithdrawResultKind { + Ok: wire_cst_LnUrlWithdrawResult_Ok, + ErrorStatus: wire_cst_LnUrlWithdrawResult_ErrorStatus, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlWithdrawResult_Ok { + data: *mut wire_cst_ln_url_withdraw_success_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlWithdrawResult_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_withdraw_success_data { + invoice: wire_cst_ln_invoice, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_locale_overrides { + locale: *mut wire_cst_list_prim_u_8_strict, + spacing: *mut u32, + symbol: wire_cst_symbol, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_localized_name { + locale: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_log_entry { + line: *mut wire_cst_list_prim_u_8_strict, + level: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_lsp_information { + id: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + widget_url: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + host: *mut wire_cst_list_prim_u_8_strict, + base_fee_msat: i64, + fee_rate: f64, + time_lock_delta: u32, + min_htlc_msat: i64, + lsp_pubkey: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params_list: wire_cst_opening_fee_params_menu, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_max_reverse_swap_amount_response { + total_sat: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_message_success_action_data { + message: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_metadata_filter { + json_path: *mut wire_cst_list_prim_u_8_strict, + json_value: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_node_config { + tag: i32, + kind: NodeConfigKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union NodeConfigKind { + Greenlight: wire_cst_NodeConfig_Greenlight, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_NodeConfig_Greenlight { + config: *mut wire_cst_greenlight_node_config, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_node_credentials { + tag: i32, + kind: NodeCredentialsKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union NodeCredentialsKind { + Greenlight: wire_cst_NodeCredentials_Greenlight, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_NodeCredentials_Greenlight { + credentials: *mut wire_cst_greenlight_credentials, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_node_state { + id: *mut wire_cst_list_prim_u_8_strict, + block_height: u32, + channels_balance_msat: u64, + onchain_balance_msat: u64, + pending_onchain_balance_msat: u64, + utxos: *mut wire_cst_list_unspent_transaction_output, + max_payable_msat: u64, + max_receivable_msat: u64, + max_single_payment_amount_msat: u64, + max_chan_reserve_msats: u64, + connected_peers: *mut wire_cst_list_String, + inbound_liquidity_msats: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_onchain_payment_limits_response { + min_sat: u64, + max_sat: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_open_channel_fee_request { + amount_msat: *mut u64, + expiry: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_open_channel_fee_response { + fee_msat: *mut u64, + fee_params: wire_cst_opening_fee_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_opening_fee_params { + min_msat: u64, + proportional: u32, + valid_until: *mut wire_cst_list_prim_u_8_strict, + max_idle_time: u32, + max_client_to_self_delay: u32, + promise: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_opening_fee_params_menu { + values: *mut wire_cst_list_opening_fee_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_pay_onchain_request { + recipient_address: *mut wire_cst_list_prim_u_8_strict, + prepare_res: wire_cst_prepare_onchain_payment_response, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_pay_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_payment { + id: *mut wire_cst_list_prim_u_8_strict, + payment_type: i32, + payment_time: i64, + amount_msat: u64, + fee_msat: u64, + status: i32, + error: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + details: wire_cst_payment_details, + metadata: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_payment_details { + tag: i32, + kind: PaymentDetailsKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union PaymentDetailsKind { + Ln: wire_cst_PaymentDetails_Ln, + ClosedChannel: wire_cst_PaymentDetails_ClosedChannel, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PaymentDetails_Ln { + data: *mut wire_cst_ln_payment_details, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_PaymentDetails_ClosedChannel { + data: *mut wire_cst_closed_channel_payment_details, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_payment_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, + node_id: *mut wire_cst_list_prim_u_8_strict, + invoice: *mut wire_cst_ln_invoice, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_onchain_payment_request { + amount_sat: u64, + amount_type: i32, + claim_tx_feerate: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_onchain_payment_response { + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + sender_amount_sat: u64, + recipient_amount_sat: u64, + total_fees: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_redeem_onchain_funds_response { + tx_weight: u64, + tx_fee_sat: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_prepare_refund_response { + refund_tx_weight: u32, + refund_tx_fee_sat: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_rate { + coin: *mut wire_cst_list_prim_u_8_strict, + value: f64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_receive_onchain_request { + opening_fee_params: *mut wire_cst_opening_fee_params, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_receive_payment_request { + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, + use_description_hash: *mut bool, + expiry: *mut u32, + cltv: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_receive_payment_response { + ln_invoice: wire_cst_ln_invoice, + opening_fee_params: *mut wire_cst_opening_fee_params, + opening_fee_msat: *mut u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_recommended_fees { + fastest_fee: u64, + half_hour_fee: u64, + hour_fee: u64, + economy_fee: u64, + minimum_fee: u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_redeem_onchain_funds_response { + txid: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_refund_response { + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_report_issue_request { + tag: i32, + kind: ReportIssueRequestKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union ReportIssueRequestKind { + PaymentFailure: wire_cst_ReportIssueRequest_PaymentFailure, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ReportIssueRequest_PaymentFailure { + data: *mut wire_cst_report_payment_failure_details, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_report_payment_failure_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + comment: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_reverse_swap_fees_request { + send_amount_sat: *mut u64, + claim_tx_feerate: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_reverse_swap_info { + id: *mut wire_cst_list_prim_u_8_strict, + claim_pubkey: *mut wire_cst_list_prim_u_8_strict, + lockup_txid: *mut wire_cst_list_prim_u_8_strict, + claim_txid: *mut wire_cst_list_prim_u_8_strict, + onchain_amount_sat: u64, + status: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_reverse_swap_pair_info { + min: u64, + max: u64, + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + total_fees: *mut u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_route_hint { + hops: *mut wire_cst_list_route_hint_hop, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_route_hint_hop { + src_node_id: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: u64, + fees_base_msat: u32, + fees_proportional_millionths: u32, + cltv_expiry_delta: u64, + htlc_minimum_msat: *mut u64, + htlc_maximum_msat: *mut u64, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_send_onchain_request { + amount_sat: u64, + onchain_recipient_address: *mut wire_cst_list_prim_u_8_strict, + pair_hash: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_send_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_send_payment_request { + bolt11: *mut wire_cst_list_prim_u_8_strict, + amount_msat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_send_payment_response { + payment: wire_cst_payment, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_send_spontaneous_payment_request { + node_id: *mut wire_cst_list_prim_u_8_strict, + amount_msat: u64, + extra_tlvs: *mut wire_cst_list_tlv_entry, + label: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_service_health_check_response { + status: i32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sign_message_request { + message: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_sign_message_response { + signature: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_static_backup_request { + working_dir: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_static_backup_response { + backup: *mut wire_cst_list_String, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_success_action_processed { + tag: i32, + kind: SuccessActionProcessedKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union SuccessActionProcessedKind { + Aes: wire_cst_SuccessActionProcessed_Aes, + Message: wire_cst_SuccessActionProcessed_Message, + Url: wire_cst_SuccessActionProcessed_Url, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SuccessActionProcessed_Aes { + result: *mut wire_cst_aes_success_action_data_result, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SuccessActionProcessed_Message { + data: *mut wire_cst_message_success_action_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_SuccessActionProcessed_Url { + data: *mut wire_cst_url_success_action_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_swap_info { + bitcoin_address: *mut wire_cst_list_prim_u_8_strict, + created_at: i64, + lock_height: i64, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + private_key: *mut wire_cst_list_prim_u_8_strict, + public_key: *mut wire_cst_list_prim_u_8_strict, + swapper_public_key: *mut wire_cst_list_prim_u_8_strict, + script: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + paid_msat: u64, + total_incoming_txs: u64, + confirmed_sats: u64, + unconfirmed_sats: u64, + status: i32, + refund_tx_ids: *mut wire_cst_list_String, + unconfirmed_tx_ids: *mut wire_cst_list_String, + confirmed_tx_ids: *mut wire_cst_list_String, + min_allowed_deposit: i64, + max_allowed_deposit: i64, + max_swapper_payable: i64, + last_redeem_error: *mut wire_cst_list_prim_u_8_strict, + channel_opening_fees: *mut wire_cst_opening_fee_params, + confirmed_at: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_symbol { + grapheme: *mut wire_cst_list_prim_u_8_strict, + template: *mut wire_cst_list_prim_u_8_strict, + rtl: *mut bool, + position: *mut u32, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_tlv_entry { + field_number: u64, + value: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_unspent_transaction_output { + txid: *mut wire_cst_list_prim_u_8_strict, + outnum: u32, + amount_millisatoshi: u64, + address: *mut wire_cst_list_prim_u_8_strict, + reserved: bool, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_url_success_action_data { + description: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, +} diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs new file mode 100644 index 000000000..cd2817ab3 --- /dev/null +++ b/libs/sdk-core/src/frb_generated.rs @@ -0,0 +1,7333 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +#![allow( + non_camel_case_types, + unused, + non_snake_case, + clippy::needless_return, + clippy::redundant_closure_call, + clippy::redundant_closure, + clippy::useless_conversion, + clippy::unit_arg, + clippy::unused_unit, + clippy::double_parens, + clippy::let_and_return, + clippy::too_many_arguments, + clippy::match_single_binding +)] + +// Section: imports + +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate!( + default_stream_sink_codec = DcoCodec, + default_rust_opaque = RustOpaqueNom, + default_rust_auto_opaque = RustAutoOpaqueNom, +); +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.32"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -924313952; + +// Section: executor + +flutter_rust_bridge::frb_generated_default_handler!(); + +// Section: wire_funcs + +fn wire_backup_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "backup", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::backup())()), + ) +} +fn wire_backup_status_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "backup_status", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::backup_status())()), + ) +} +fn wire_breez_events_stream_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + s: impl CstDecode< + StreamSink, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "breez_events_stream", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_s = s.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::breez_events_stream(api_s))()) + } + }, + ) +} +fn wire_breez_log_stream_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + s: impl CstDecode>, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "breez_log_stream", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_s = s.cst_decode(); + move |context| transform_result_dco((move || crate::binding::breez_log_stream(api_s))()) + }, + ) +} +fn wire_buy_bitcoin_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "buy_bitcoin", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::buy_bitcoin(api_req))()) + }, + ) +} +fn wire_check_message_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "check_message", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::check_message(api_req))()) + }, + ) +} +fn wire_close_lsp_channels_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "close_lsp_channels", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| transform_result_dco((move || crate::binding::close_lsp_channels())()) + }, + ) +} +fn wire_configure_node_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "configure_node", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::configure_node(api_req))()) + }, + ) +} +fn wire_connect_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "connect", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::connect(api_req))()) + }, + ) +} +fn wire_connect_lsp_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + lsp_id: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "connect_lsp", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_lsp_id = lsp_id.cst_decode(); + move |context| transform_result_dco((move || crate::binding::connect_lsp(api_lsp_id))()) + }, + ) +} +fn wire_default_config_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + env_type: impl CstDecode, + api_key: impl CstDecode, + node_config: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "default_config", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_env_type = env_type.cst_decode(); + let api_api_key = api_key.cst_decode(); + let api_node_config = node_config.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::binding::default_config( + api_env_type, + api_api_key, + api_node_config, + )) + })()) + } + }, + ) +} +fn wire_disconnect_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "disconnect", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::disconnect())()), + ) +} +fn wire_execute_command_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + command: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "execute_command", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_command = command.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::execute_command(api_command))()) + } + }, + ) +} +fn wire_fetch_fiat_rates_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "fetch_fiat_rates", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::fetch_fiat_rates())()), + ) +} +fn wire_fetch_lsp_info_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + id: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "fetch_lsp_info", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_id = id.cst_decode(); + move |context| transform_result_dco((move || crate::binding::fetch_lsp_info(api_id))()) + }, + ) +} +fn wire_fetch_reverse_swap_fees_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "fetch_reverse_swap_fees", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::fetch_reverse_swap_fees(api_req))()) + } + }, + ) +} +fn wire_generate_diagnostic_data_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "generate_diagnostic_data", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || crate::binding::generate_diagnostic_data())()) + } + }, + ) +} +fn wire_in_progress_onchain_payments_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "in_progress_onchain_payments", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || crate::binding::in_progress_onchain_payments())()) + } + }, + ) +} +fn wire_in_progress_reverse_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "in_progress_reverse_swaps", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || crate::binding::in_progress_reverse_swaps())()) + } + }, + ) +} +fn wire_in_progress_swap_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "in_progress_swap", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::in_progress_swap())()), + ) +} +fn wire_is_initialized_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "is_initialized", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::binding::is_initialized()) + })()) + } + }, + ) +} +fn wire_list_fiat_currencies_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "list_fiat_currencies", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| transform_result_dco((move || crate::binding::list_fiat_currencies())()) + }, + ) +} +fn wire_list_lsps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "list_lsps", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::list_lsps())()), + ) +} +fn wire_list_payments_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "list_payments", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::list_payments(api_req))()) + }, + ) +} +fn wire_list_refundables_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "list_refundables", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::list_refundables())()), + ) +} +fn wire_lnurl_auth_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req_data: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "lnurl_auth", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req_data = req_data.cst_decode(); move |context| { + transform_result_dco((move || { + crate::binding::lnurl_auth(api_req_data) + })()) + } }) +} +fn wire_lnurl_pay_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "lnurl_pay", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::lnurl_pay(api_req))()) + }, + ) +} +fn wire_lnurl_withdraw_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "lnurl_withdraw", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::lnurl_withdraw(api_req))()) + }, + ) +} +fn wire_lsp_id_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "lsp_id", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::lsp_id())()), + ) +} +fn wire_lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "lsp_info", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::lsp_info())()), + ) +} +fn wire_max_reverse_swap_amount_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "max_reverse_swap_amount", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco((move || crate::binding::max_reverse_swap_amount())()) + } + }, + ) +} +fn wire_mnemonic_to_seed_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + phrase: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "mnemonic_to_seed", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_phrase = phrase.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::mnemonic_to_seed(api_phrase))()) + } + }, + ) +} +fn wire_node_credentials_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "node_credentials", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::node_credentials())()), + ) +} +fn wire_node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "node_info", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::node_info())()), + ) +} +fn wire_onchain_payment_limits_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { move |context| { + transform_result_dco((move || { + crate::binding::onchain_payment_limits() + })()) + } }) +} +fn wire_open_channel_fee_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "open_channel_fee", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::open_channel_fee(api_req))()) + } + }, + ) +} +fn wire_parse_input_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + input: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "parse_input", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_input = input.cst_decode(); + move |context| transform_result_dco((move || crate::binding::parse_input(api_input))()) + }, + ) +} +fn wire_parse_invoice_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + invoice: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "parse_invoice", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_invoice = invoice.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::parse_invoice(api_invoice))()) + } + }, + ) +} +fn wire_pay_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "pay_onchain", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::pay_onchain(api_req))()) + }, + ) +} +fn wire_payment_by_hash_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + hash: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "payment_by_hash", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_hash = hash.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::payment_by_hash(api_hash))()) + } + }, + ) +} +fn wire_prepare_onchain_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "prepare_onchain_payment", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::prepare_onchain_payment(api_req))()) + } + }, + ) +} +fn wire_prepare_redeem_onchain_funds_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "prepare_redeem_onchain_funds", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::binding::prepare_redeem_onchain_funds(api_req) + })()) + } + }, + ) +} +fn wire_prepare_refund_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "prepare_refund", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::prepare_refund(api_req))()) + }, + ) +} +fn wire_receive_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { + transform_result_dco((move || { + crate::binding::receive_onchain(api_req) + })()) + } }) +} +fn wire_receive_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { + transform_result_dco((move || { + crate::binding::receive_payment(api_req) + })()) + } }) +} +fn wire_recommended_fees_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "recommended_fees", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::recommended_fees())()), + ) +} +fn wire_redeem_onchain_funds_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "redeem_onchain_funds", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::redeem_onchain_funds(api_req))()) + } + }, + ) +} +fn wire_redeem_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + swap_address: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "redeem_swap", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_swap_address = swap_address.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::redeem_swap(api_swap_address))()) + } + }, + ) +} +fn wire_refund_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "refund", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::refund(api_req))()) + }, + ) +} +fn wire_register_webhook_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + webhook_url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "register_webhook", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_webhook_url = webhook_url.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::register_webhook(api_webhook_url))()) + } + }, + ) +} +fn wire_report_issue_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "report_issue", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::report_issue(api_req))()) + }, + ) +} +fn wire_rescan_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "rescan_swaps", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::rescan_swaps())()), + ) +} +fn wire_send_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "send_onchain", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::send_onchain(api_req))()) + }, + ) +} +fn wire_send_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "send_payment", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::send_payment(api_req))()) + }, + ) +} +fn wire_send_spontaneous_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "send_spontaneous_payment", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::send_spontaneous_payment(api_req))()) + } + }, + ) +} +fn wire_service_health_check_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + api_key: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "service_health_check", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_api_key = api_key.cst_decode(); + move |context| { + transform_result_dco((move || crate::binding::service_health_check(api_api_key))()) + } + }, + ) +} +fn wire_set_payment_metadata_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + hash: impl CstDecode, + metadata: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "set_payment_metadata", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_hash = hash.cst_decode(); + let api_metadata = metadata.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::binding::set_payment_metadata(api_hash, api_metadata) + })()) + } + }, + ) +} +fn wire_sign_message_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "sign_message", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::sign_message(api_req))()) + }, + ) +} +fn wire_static_backup_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "static_backup", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| transform_result_dco((move || crate::binding::static_backup(api_req))()) + }, + ) +} +fn wire_sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "sync", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || move |context| transform_result_dco((move || crate::binding::sync())()), + ) +} + +// Section: dart2rust + +impl CstDecode for bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinProvider { + match self { + 0 => crate::models::BuyBitcoinProvider::Moonpay, + _ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ChannelState { + match self { + 0 => crate::models::ChannelState::PendingOpen, + 1 => crate::models::ChannelState::Opened, + 2 => crate::models::ChannelState::PendingClose, + 3 => crate::models::ChannelState::Closed, + _ => unreachable!("Invalid variant for ChannelState: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::EnvironmentType { + match self { + 0 => crate::models::EnvironmentType::Production, + 1 => crate::models::EnvironmentType::Staging, + _ => unreachable!("Invalid variant for EnvironmentType: {}", self), + } + } +} +impl CstDecode for f64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> f64 { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::HealthCheckStatus { + match self { + 0 => crate::models::HealthCheckStatus::Operational, + 1 => crate::models::HealthCheckStatus::Maintenance, + 2 => crate::models::HealthCheckStatus::ServiceDisruption, + _ => unreachable!("Invalid variant for HealthCheckStatus: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i32 { + self + } +} +impl CstDecode for i64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + self + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Network { + match self { + 0 => crate::models::Network::Bitcoin, + 1 => crate::models::Network::Testnet, + 2 => crate::models::Network::Signet, + 3 => crate::models::Network::Regtest, + _ => unreachable!("Invalid variant for Network: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentStatus { + match self { + 0 => crate::models::PaymentStatus::Pending, + 1 => crate::models::PaymentStatus::Complete, + 2 => crate::models::PaymentStatus::Failed, + _ => unreachable!("Invalid variant for PaymentStatus: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentType { + match self { + 0 => crate::models::PaymentType::Sent, + 1 => crate::models::PaymentType::Received, + 2 => crate::models::PaymentType::ClosedChannel, + _ => unreachable!("Invalid variant for PaymentType: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentTypeFilter { + match self { + 0 => crate::models::PaymentTypeFilter::Sent, + 1 => crate::models::PaymentTypeFilter::Received, + 2 => crate::models::PaymentTypeFilter::ClosedChannel, + _ => unreachable!("Invalid variant for PaymentTypeFilter: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapStatus { + match self { + 0 => crate::models::ReverseSwapStatus::Initial, + 1 => crate::models::ReverseSwapStatus::InProgress, + 2 => crate::models::ReverseSwapStatus::Cancelled, + 3 => crate::models::ReverseSwapStatus::CompletedSeen, + 4 => crate::models::ReverseSwapStatus::CompletedConfirmed, + _ => unreachable!("Invalid variant for ReverseSwapStatus: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapAmountType { + match self { + 0 => crate::models::SwapAmountType::Send, + 1 => crate::models::SwapAmountType::Receive, + _ => unreachable!("Invalid variant for SwapAmountType: {}", self), + } + } +} +impl CstDecode for i32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapStatus { + match self { + 0 => crate::models::SwapStatus::Initial, + 1 => crate::models::SwapStatus::WaitingConfirmation, + 2 => crate::models::SwapStatus::Redeemable, + 3 => crate::models::SwapStatus::Redeemed, + 4 => crate::models::SwapStatus::Refundable, + 5 => crate::models::SwapStatus::Completed, + _ => unreachable!("Invalid variant for SwapStatus: {}", 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 { + self + } +} +impl CstDecode for u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + self + } +} +impl CstDecode for u8 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u8 { + self + } +} +impl 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 { + unreachable!(""); + } +} + +impl SseDecode + for StreamSink +{ + // 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 StreamSink::deserialize(inner); + } +} + +impl SseDecode + for StreamSink +{ + // 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 StreamSink::deserialize(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::lnurl::pay::model::AesSuccessActionDataDecrypted { + // 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_description = ::sse_decode(deserializer); + let mut var_plaintext = ::sse_decode(deserializer); + return crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + description: var_description, + plaintext: var_plaintext, + }; + } +} + +impl SseDecode for crate::lnurl::pay::model::AesSuccessActionDataResult { + // 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_data = + ::sse_decode( + deserializer, + ); + return crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { + data: var_data, + }; + } + 1 => { + let mut var_reason = ::sse_decode(deserializer); + return crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { + reason: var_reason, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::breez_services::BackupFailedData { + // 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_error = ::sse_decode(deserializer); + return crate::breez_services::BackupFailedData { error: var_error }; + } +} + +impl SseDecode for crate::models::BackupStatus { + // 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_backedUp = ::sse_decode(deserializer); + let mut var_lastBackupTime = >::sse_decode(deserializer); + return crate::models::BackupStatus { + backed_up: var_backedUp, + last_backup_time: var_lastBackupTime, + }; + } +} + +impl SseDecode for crate::input_parser::BitcoinAddressData { + // 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_address = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); + let mut var_amountSat = >::sse_decode(deserializer); + let mut var_label = >::sse_decode(deserializer); + let mut var_message = >::sse_decode(deserializer); + return crate::input_parser::BitcoinAddressData { + address: var_address, + network: var_network, + amount_sat: var_amountSat, + label: var_label, + message: var_message, + }; + } +} + +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::breez_services::BreezEvent { + // 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_block = ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::NewBlock { block: var_block }; + } + 1 => { + let mut var_details = + ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::InvoicePaid { + details: var_details, + }; + } + 2 => { + return crate::breez_services::BreezEvent::Synced; + } + 3 => { + let mut var_details = ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::PaymentSucceed { + details: var_details, + }; + } + 4 => { + let mut var_details = + ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::PaymentFailed { + details: var_details, + }; + } + 5 => { + return crate::breez_services::BreezEvent::BackupStarted; + } + 6 => { + return crate::breez_services::BreezEvent::BackupSucceeded; + } + 7 => { + let mut var_details = + ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::BackupFailed { + details: var_details, + }; + } + 8 => { + let mut var_details = ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::SwapUpdated { + details: var_details, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::BuyBitcoinProvider { + // 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::models::BuyBitcoinProvider::Moonpay, + _ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", inner), + }; + } +} + +impl SseDecode for crate::models::BuyBitcoinRequest { + // 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_provider = ::sse_decode(deserializer); + let mut var_openingFeeParams = + >::sse_decode(deserializer); + return crate::models::BuyBitcoinRequest { + provider: var_provider, + opening_fee_params: var_openingFeeParams, + }; + } +} + +impl SseDecode for crate::models::BuyBitcoinResponse { + // 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_openingFeeParams = + >::sse_decode(deserializer); + return crate::models::BuyBitcoinResponse { + url: var_url, + opening_fee_params: var_openingFeeParams, + }; + } +} + +impl SseDecode for crate::models::ChannelState { + // 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::models::ChannelState::PendingOpen, + 1 => crate::models::ChannelState::Opened, + 2 => crate::models::ChannelState::PendingClose, + 3 => crate::models::ChannelState::Closed, + _ => unreachable!("Invalid variant for ChannelState: {}", inner), + }; + } +} + +impl SseDecode for crate::breez_services::CheckMessageRequest { + // 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_message = ::sse_decode(deserializer); + let mut var_pubkey = ::sse_decode(deserializer); + let mut var_signature = ::sse_decode(deserializer); + return crate::breez_services::CheckMessageRequest { + message: var_message, + pubkey: var_pubkey, + signature: var_signature, + }; + } +} + +impl SseDecode for crate::breez_services::CheckMessageResponse { + // 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_isValid = ::sse_decode(deserializer); + return crate::breez_services::CheckMessageResponse { + is_valid: var_isValid, + }; + } +} + +impl SseDecode for crate::models::ClosedChannelPaymentDetails { + // 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_state = ::sse_decode(deserializer); + let mut var_fundingTxid = ::sse_decode(deserializer); + let mut var_shortChannelId = >::sse_decode(deserializer); + let mut var_closingTxid = >::sse_decode(deserializer); + return crate::models::ClosedChannelPaymentDetails { + state: var_state, + funding_txid: var_fundingTxid, + short_channel_id: var_shortChannelId, + closing_txid: var_closingTxid, + }; + } +} + +impl SseDecode for crate::models::Config { + // 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_breezserver = ::sse_decode(deserializer); + let mut var_chainnotifierUrl = ::sse_decode(deserializer); + let mut var_mempoolspaceUrl = >::sse_decode(deserializer); + let mut var_workingDir = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); + let mut var_paymentTimeoutSec = ::sse_decode(deserializer); + let mut var_defaultLspId = >::sse_decode(deserializer); + let mut var_apiKey = >::sse_decode(deserializer); + let mut var_maxfeePercent = ::sse_decode(deserializer); + let mut var_exemptfeeMsat = ::sse_decode(deserializer); + let mut var_nodeConfig = ::sse_decode(deserializer); + return crate::models::Config { + breezserver: var_breezserver, + chainnotifier_url: var_chainnotifierUrl, + mempoolspace_url: var_mempoolspaceUrl, + working_dir: var_workingDir, + network: var_network, + payment_timeout_sec: var_paymentTimeoutSec, + default_lsp_id: var_defaultLspId, + api_key: var_apiKey, + maxfee_percent: var_maxfeePercent, + exemptfee_msat: var_exemptfeeMsat, + node_config: var_nodeConfig, + }; + } +} + +impl SseDecode for crate::models::ConfigureNodeRequest { + // 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_closeToAddress = >::sse_decode(deserializer); + return crate::models::ConfigureNodeRequest { + close_to_address: var_closeToAddress, + }; + } +} + +impl SseDecode for crate::models::ConnectRequest { + // 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_config = ::sse_decode(deserializer); + let mut var_seed = >::sse_decode(deserializer); + let mut var_restoreOnly = >::sse_decode(deserializer); + return crate::models::ConnectRequest { + config: var_config, + seed: var_seed, + restore_only: var_restoreOnly, + }; + } +} + +impl SseDecode for crate::fiat::CurrencyInfo { + // 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_name = ::sse_decode(deserializer); + let mut var_fractionSize = ::sse_decode(deserializer); + let mut var_spacing = >::sse_decode(deserializer); + let mut var_symbol = >::sse_decode(deserializer); + let mut var_uniqSymbol = >::sse_decode(deserializer); + let mut var_localizedName = + >>::sse_decode(deserializer); + let mut var_localeOverrides = + >>::sse_decode(deserializer); + return crate::fiat::CurrencyInfo { + name: var_name, + fraction_size: var_fractionSize, + spacing: var_spacing, + symbol: var_symbol, + uniq_symbol: var_uniqSymbol, + localized_name: var_localizedName, + locale_overrides: var_localeOverrides, + }; + } +} + +impl SseDecode for crate::models::EnvironmentType { + // 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::models::EnvironmentType::Production, + 1 => crate::models::EnvironmentType::Staging, + _ => unreachable!("Invalid variant for EnvironmentType: {}", inner), + }; + } +} + +impl SseDecode for f64 { + // 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_f64::().unwrap() + } +} + +impl SseDecode for crate::fiat::FiatCurrency { + // 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_id = ::sse_decode(deserializer); + let mut var_info = ::sse_decode(deserializer); + return crate::fiat::FiatCurrency { + id: var_id, + info: var_info, + }; + } +} + +impl SseDecode for crate::models::GreenlightCredentials { + // 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_deviceKey = >::sse_decode(deserializer); + let mut var_deviceCert = >::sse_decode(deserializer); + return crate::models::GreenlightCredentials { + device_key: var_deviceKey, + device_cert: var_deviceCert, + }; + } +} + +impl SseDecode for crate::models::GreenlightNodeConfig { + // 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_partnerCredentials = + >::sse_decode(deserializer); + let mut var_inviteCode = >::sse_decode(deserializer); + return crate::models::GreenlightNodeConfig { + partner_credentials: var_partnerCredentials, + invite_code: var_inviteCode, + }; + } +} + +impl SseDecode for crate::models::HealthCheckStatus { + // 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::models::HealthCheckStatus::Operational, + 1 => crate::models::HealthCheckStatus::Maintenance, + 2 => crate::models::HealthCheckStatus::ServiceDisruption, + _ => unreachable!("Invalid variant for HealthCheckStatus: {}", inner), + }; + } +} + +impl SseDecode for i32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_i32::().unwrap() + } +} + +impl SseDecode for i64 { + // 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_i64::().unwrap() + } +} + +impl SseDecode for crate::input_parser::InputType { + // 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_address = + ::sse_decode(deserializer); + return crate::input_parser::InputType::BitcoinAddress { + address: var_address, + }; + } + 1 => { + let mut var_invoice = ::sse_decode(deserializer); + return crate::input_parser::InputType::Bolt11 { + invoice: var_invoice, + }; + } + 2 => { + let mut var_nodeId = ::sse_decode(deserializer); + return crate::input_parser::InputType::NodeId { + node_id: var_nodeId, + }; + } + 3 => { + let mut var_url = ::sse_decode(deserializer); + return crate::input_parser::InputType::Url { url: var_url }; + } + 4 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::input_parser::InputType::LnUrlPay { data: var_data }; + } + 5 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::input_parser::InputType::LnUrlWithdraw { data: var_data }; + } + 6 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::input_parser::InputType::LnUrlAuth { data: var_data }; + } + 7 => { + let mut var_data = ::sse_decode(deserializer); + return crate::input_parser::InputType::LnUrlError { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::breez_services::InvoicePaidDetails { + // 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_paymentHash = ::sse_decode(deserializer); + let mut var_bolt11 = ::sse_decode(deserializer); + let mut var_payment = >::sse_decode(deserializer); + return crate::breez_services::InvoicePaidDetails { + payment_hash: var_paymentHash, + bolt11: var_bolt11, + payment: var_payment, + }; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for crate::models::ListPaymentsRequest { + // 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_filters = + >>::sse_decode(deserializer); + let mut var_metadataFilters = + >>::sse_decode(deserializer); + let mut var_fromTimestamp = >::sse_decode(deserializer); + let mut var_toTimestamp = >::sse_decode(deserializer); + let mut var_includeFailures = >::sse_decode(deserializer); + let mut var_offset = >::sse_decode(deserializer); + let mut var_limit = >::sse_decode(deserializer); + return crate::models::ListPaymentsRequest { + filters: var_filters, + metadata_filters: var_metadataFilters, + from_timestamp: var_fromTimestamp, + to_timestamp: var_toTimestamp, + include_failures: var_includeFailures, + offset: var_offset, + limit: var_limit, + }; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode(deserializer)); + } + return ans_; + } +} + +impl SseDecode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut len_ = ::sse_decode(deserializer); + let mut ans_ = vec![]; + for idx_ in 0..len_ { + ans_.push(::sse_decode( + deserializer, + )); + } + return ans_; + } +} + +impl SseDecode for crate::invoice::LNInvoice { + // 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_bolt11 = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); + let mut var_payeePubkey = ::sse_decode(deserializer); + let mut var_paymentHash = ::sse_decode(deserializer); + let mut var_description = >::sse_decode(deserializer); + let mut var_descriptionHash = >::sse_decode(deserializer); + let mut var_amountMsat = >::sse_decode(deserializer); + let mut var_timestamp = ::sse_decode(deserializer); + let mut var_expiry = ::sse_decode(deserializer); + let mut var_routingHints = >::sse_decode(deserializer); + let mut var_paymentSecret = >::sse_decode(deserializer); + let mut var_minFinalCltvExpiryDelta = ::sse_decode(deserializer); + return crate::invoice::LNInvoice { + bolt11: var_bolt11, + network: var_network, + payee_pubkey: var_payeePubkey, + payment_hash: var_paymentHash, + description: var_description, + description_hash: var_descriptionHash, + amount_msat: var_amountMsat, + timestamp: var_timestamp, + expiry: var_expiry, + routing_hints: var_routingHints, + payment_secret: var_paymentSecret, + min_final_cltv_expiry_delta: var_minFinalCltvExpiryDelta, + }; + } +} + +impl SseDecode for crate::models::LnPaymentDetails { + // 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_paymentHash = ::sse_decode(deserializer); + let mut var_label = ::sse_decode(deserializer); + let mut var_destinationPubkey = ::sse_decode(deserializer); + let mut var_paymentPreimage = ::sse_decode(deserializer); + let mut var_keysend = ::sse_decode(deserializer); + let mut var_bolt11 = ::sse_decode(deserializer); + let mut var_openChannelBolt11 = >::sse_decode(deserializer); + let mut var_lnurlSuccessAction = + >::sse_decode(deserializer); + let mut var_lnurlPayDomain = >::sse_decode(deserializer); + let mut var_lnAddress = >::sse_decode(deserializer); + let mut var_lnurlMetadata = >::sse_decode(deserializer); + let mut var_lnurlWithdrawEndpoint = >::sse_decode(deserializer); + let mut var_swapInfo = >::sse_decode(deserializer); + let mut var_reverseSwapInfo = + >::sse_decode(deserializer); + let mut var_pendingExpirationBlock = >::sse_decode(deserializer); + return crate::models::LnPaymentDetails { + payment_hash: var_paymentHash, + label: var_label, + destination_pubkey: var_destinationPubkey, + payment_preimage: var_paymentPreimage, + keysend: var_keysend, + bolt11: var_bolt11, + open_channel_bolt11: var_openChannelBolt11, + lnurl_success_action: var_lnurlSuccessAction, + lnurl_pay_domain: var_lnurlPayDomain, + ln_address: var_lnAddress, + lnurl_metadata: var_lnurlMetadata, + lnurl_withdraw_endpoint: var_lnurlWithdrawEndpoint, + swap_info: var_swapInfo, + reverse_swap_info: var_reverseSwapInfo, + pending_expiration_block: var_pendingExpirationBlock, + }; + } +} + +impl SseDecode for crate::input_parser::LnUrlAuthRequestData { + // 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_k1 = ::sse_decode(deserializer); + let mut var_action = >::sse_decode(deserializer); + let mut var_domain = ::sse_decode(deserializer); + let mut var_url = ::sse_decode(deserializer); + return crate::input_parser::LnUrlAuthRequestData { + k1: var_k1, + action: var_action, + domain: var_domain, + url: var_url, + }; + } +} + +impl SseDecode for crate::models::LnUrlCallbackStatus { + // 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::models::LnUrlCallbackStatus::Ok; + } + 1 => { + let mut var_data = ::sse_decode(deserializer); + return crate::models::LnUrlCallbackStatus::ErrorStatus { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::input_parser::LnUrlErrorData { + // 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_reason = ::sse_decode(deserializer); + return crate::input_parser::LnUrlErrorData { reason: var_reason }; + } +} + +impl SseDecode for crate::lnurl::pay::model::LnUrlPayErrorData { + // 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_paymentHash = ::sse_decode(deserializer); + let mut var_reason = ::sse_decode(deserializer); + return crate::lnurl::pay::model::LnUrlPayErrorData { + payment_hash: var_paymentHash, + reason: var_reason, + }; + } +} + +impl SseDecode for crate::models::LnUrlPayRequest { + // 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_data = ::sse_decode(deserializer); + let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_comment = >::sse_decode(deserializer); + let mut var_paymentLabel = >::sse_decode(deserializer); + return crate::models::LnUrlPayRequest { + data: var_data, + amount_msat: var_amountMsat, + comment: var_comment, + payment_label: var_paymentLabel, + }; + } +} + +impl SseDecode for crate::input_parser::LnUrlPayRequestData { + // 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_callback = ::sse_decode(deserializer); + let mut var_minSendable = ::sse_decode(deserializer); + let mut var_maxSendable = ::sse_decode(deserializer); + let mut var_metadataStr = ::sse_decode(deserializer); + let mut var_commentAllowed = ::sse_decode(deserializer); + let mut var_domain = ::sse_decode(deserializer); + let mut var_allowsNostr = ::sse_decode(deserializer); + let mut var_nostrPubkey = >::sse_decode(deserializer); + let mut var_lnAddress = >::sse_decode(deserializer); + return crate::input_parser::LnUrlPayRequestData { + callback: var_callback, + min_sendable: var_minSendable, + max_sendable: var_maxSendable, + metadata_str: var_metadataStr, + comment_allowed: var_commentAllowed, + domain: var_domain, + allows_nostr: var_allowsNostr, + nostr_pubkey: var_nostrPubkey, + ln_address: var_lnAddress, + }; + } +} + +impl SseDecode for crate::lnurl::pay::model::LnUrlPayResult { + // 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_data = + ::sse_decode(deserializer); + return crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { + data: var_data, + }; + } + 1 => { + let mut var_data = ::sse_decode(deserializer); + return crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data: var_data }; + } + 2 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::lnurl::pay::model::LnUrlPayResult::PayError { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::lnurl::pay::model::LnUrlPaySuccessData { + // 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_payment = ::sse_decode(deserializer); + let mut var_successAction = + >::sse_decode(deserializer); + return crate::lnurl::pay::model::LnUrlPaySuccessData { + payment: var_payment, + success_action: var_successAction, + }; + } +} + +impl SseDecode for crate::models::LnUrlWithdrawRequest { + // 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_data = + ::sse_decode(deserializer); + let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_description = >::sse_decode(deserializer); + return crate::models::LnUrlWithdrawRequest { + data: var_data, + amount_msat: var_amountMsat, + description: var_description, + }; + } +} + +impl SseDecode for crate::input_parser::LnUrlWithdrawRequestData { + // 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_callback = ::sse_decode(deserializer); + let mut var_k1 = ::sse_decode(deserializer); + let mut var_defaultDescription = ::sse_decode(deserializer); + let mut var_minWithdrawable = ::sse_decode(deserializer); + let mut var_maxWithdrawable = ::sse_decode(deserializer); + return crate::input_parser::LnUrlWithdrawRequestData { + callback: var_callback, + k1: var_k1, + default_description: var_defaultDescription, + min_withdrawable: var_minWithdrawable, + max_withdrawable: var_maxWithdrawable, + }; + } +} + +impl SseDecode for crate::models::LnUrlWithdrawResult { + // 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_data = + ::sse_decode(deserializer); + return crate::models::LnUrlWithdrawResult::Ok { data: var_data }; + } + 1 => { + let mut var_data = ::sse_decode(deserializer); + return crate::models::LnUrlWithdrawResult::ErrorStatus { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::LnUrlWithdrawSuccessData { + // 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_invoice = ::sse_decode(deserializer); + return crate::models::LnUrlWithdrawSuccessData { + invoice: var_invoice, + }; + } +} + +impl SseDecode for crate::fiat::LocaleOverrides { + // 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_locale = ::sse_decode(deserializer); + let mut var_spacing = >::sse_decode(deserializer); + let mut var_symbol = ::sse_decode(deserializer); + return crate::fiat::LocaleOverrides { + locale: var_locale, + spacing: var_spacing, + symbol: var_symbol, + }; + } +} + +impl SseDecode for crate::fiat::LocalizedName { + // 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_locale = ::sse_decode(deserializer); + let mut var_name = ::sse_decode(deserializer); + return crate::fiat::LocalizedName { + locale: var_locale, + name: var_name, + }; + } +} + +impl SseDecode for crate::models::LogEntry { + // 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_line = ::sse_decode(deserializer); + let mut var_level = ::sse_decode(deserializer); + return crate::models::LogEntry { + line: var_line, + level: var_level, + }; + } +} + +impl SseDecode for crate::lsp::LspInformation { + // 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_id = ::sse_decode(deserializer); + let mut var_name = ::sse_decode(deserializer); + let mut var_widgetUrl = ::sse_decode(deserializer); + let mut var_pubkey = ::sse_decode(deserializer); + let mut var_host = ::sse_decode(deserializer); + let mut var_baseFeeMsat = ::sse_decode(deserializer); + let mut var_feeRate = ::sse_decode(deserializer); + let mut var_timeLockDelta = ::sse_decode(deserializer); + let mut var_minHtlcMsat = ::sse_decode(deserializer); + let mut var_lspPubkey = >::sse_decode(deserializer); + let mut var_openingFeeParamsList = + ::sse_decode(deserializer); + return crate::lsp::LspInformation { + id: var_id, + name: var_name, + widget_url: var_widgetUrl, + pubkey: var_pubkey, + host: var_host, + base_fee_msat: var_baseFeeMsat, + fee_rate: var_feeRate, + time_lock_delta: var_timeLockDelta, + min_htlc_msat: var_minHtlcMsat, + lsp_pubkey: var_lspPubkey, + opening_fee_params_list: var_openingFeeParamsList, + }; + } +} + +impl SseDecode for crate::models::MaxReverseSwapAmountResponse { + // 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_totalSat = ::sse_decode(deserializer); + return crate::models::MaxReverseSwapAmountResponse { + total_sat: var_totalSat, + }; + } +} + +impl SseDecode for crate::lnurl::pay::model::MessageSuccessActionData { + // 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_message = ::sse_decode(deserializer); + return crate::lnurl::pay::model::MessageSuccessActionData { + message: var_message, + }; + } +} + +impl SseDecode for crate::models::MetadataFilter { + // 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_jsonPath = ::sse_decode(deserializer); + let mut var_jsonValue = ::sse_decode(deserializer); + return crate::models::MetadataFilter { + json_path: var_jsonPath, + json_value: var_jsonValue, + }; + } +} + +impl SseDecode for crate::models::Network { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return match inner { + 0 => crate::models::Network::Bitcoin, + 1 => crate::models::Network::Testnet, + 2 => crate::models::Network::Signet, + 3 => crate::models::Network::Regtest, + _ => unreachable!("Invalid variant for Network: {}", inner), + }; + } +} + +impl SseDecode for crate::models::NodeConfig { + // 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::models::NodeConfig::Greenlight { config: var_config }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::NodeCredentials { + // 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_credentials = + ::sse_decode(deserializer); + return crate::models::NodeCredentials::Greenlight { + credentials: var_credentials, + }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::NodeState { + // 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_id = ::sse_decode(deserializer); + let mut var_blockHeight = ::sse_decode(deserializer); + let mut var_channelsBalanceMsat = ::sse_decode(deserializer); + let mut var_onchainBalanceMsat = ::sse_decode(deserializer); + let mut var_pendingOnchainBalanceMsat = ::sse_decode(deserializer); + let mut var_utxos = + >::sse_decode(deserializer); + let mut var_maxPayableMsat = ::sse_decode(deserializer); + let mut var_maxReceivableMsat = ::sse_decode(deserializer); + let mut var_maxSinglePaymentAmountMsat = ::sse_decode(deserializer); + let mut var_maxChanReserveMsats = ::sse_decode(deserializer); + let mut var_connectedPeers = >::sse_decode(deserializer); + let mut var_inboundLiquidityMsats = ::sse_decode(deserializer); + return crate::models::NodeState { + id: var_id, + block_height: var_blockHeight, + channels_balance_msat: var_channelsBalanceMsat, + onchain_balance_msat: var_onchainBalanceMsat, + pending_onchain_balance_msat: var_pendingOnchainBalanceMsat, + utxos: var_utxos, + max_payable_msat: var_maxPayableMsat, + max_receivable_msat: var_maxReceivableMsat, + max_single_payment_amount_msat: var_maxSinglePaymentAmountMsat, + max_chan_reserve_msats: var_maxChanReserveMsats, + connected_peers: var_connectedPeers, + inbound_liquidity_msats: var_inboundLiquidityMsats, + }; + } +} + +impl SseDecode for crate::models::OnchainPaymentLimitsResponse { + // 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_minSat = ::sse_decode(deserializer); + let mut var_maxSat = ::sse_decode(deserializer); + return crate::models::OnchainPaymentLimitsResponse { + min_sat: var_minSat, + max_sat: var_maxSat, + }; + } +} + +impl SseDecode for crate::models::OpenChannelFeeRequest { + // 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_amountMsat = >::sse_decode(deserializer); + let mut var_expiry = >::sse_decode(deserializer); + return crate::models::OpenChannelFeeRequest { + amount_msat: var_amountMsat, + expiry: var_expiry, + }; + } +} + +impl SseDecode for crate::models::OpenChannelFeeResponse { + // 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_feeMsat = >::sse_decode(deserializer); + let mut var_feeParams = ::sse_decode(deserializer); + return crate::models::OpenChannelFeeResponse { + fee_msat: var_feeMsat, + fee_params: var_feeParams, + }; + } +} + +impl SseDecode for crate::models::OpeningFeeParams { + // 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_minMsat = ::sse_decode(deserializer); + let mut var_proportional = ::sse_decode(deserializer); + let mut var_validUntil = ::sse_decode(deserializer); + let mut var_maxIdleTime = ::sse_decode(deserializer); + let mut var_maxClientToSelfDelay = ::sse_decode(deserializer); + let mut var_promise = ::sse_decode(deserializer); + return crate::models::OpeningFeeParams { + min_msat: var_minMsat, + proportional: var_proportional, + valid_until: var_validUntil, + max_idle_time: var_maxIdleTime, + max_client_to_self_delay: var_maxClientToSelfDelay, + promise: var_promise, + }; + } +} + +impl SseDecode for crate::models::OpeningFeeParamsMenu { + // 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_values = >::sse_decode(deserializer); + return crate::models::OpeningFeeParamsMenu { values: var_values }; + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some( + ::sse_decode(deserializer), + ); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode( + deserializer, + )); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + if (::sse_decode(deserializer)) { + return Some(>::sse_decode(deserializer)); + } else { + return None; + } + } +} + +impl SseDecode for crate::models::PayOnchainRequest { + // 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_recipientAddress = ::sse_decode(deserializer); + let mut var_prepareRes = + ::sse_decode(deserializer); + return crate::models::PayOnchainRequest { + recipient_address: var_recipientAddress, + prepare_res: var_prepareRes, + }; + } +} + +impl SseDecode for crate::models::PayOnchainResponse { + // 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_reverseSwapInfo = ::sse_decode(deserializer); + return crate::models::PayOnchainResponse { + reverse_swap_info: var_reverseSwapInfo, + }; + } +} + +impl SseDecode for crate::models::Payment { + // 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_id = ::sse_decode(deserializer); + let mut var_paymentType = ::sse_decode(deserializer); + let mut var_paymentTime = ::sse_decode(deserializer); + let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_feeMsat = ::sse_decode(deserializer); + let mut var_status = ::sse_decode(deserializer); + let mut var_error = >::sse_decode(deserializer); + let mut var_description = >::sse_decode(deserializer); + let mut var_details = ::sse_decode(deserializer); + let mut var_metadata = >::sse_decode(deserializer); + return crate::models::Payment { + id: var_id, + payment_type: var_paymentType, + payment_time: var_paymentTime, + amount_msat: var_amountMsat, + fee_msat: var_feeMsat, + status: var_status, + error: var_error, + description: var_description, + details: var_details, + metadata: var_metadata, + }; + } +} + +impl SseDecode for crate::models::PaymentDetails { + // 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_data = ::sse_decode(deserializer); + return crate::models::PaymentDetails::Ln { data: var_data }; + } + 1 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::models::PaymentDetails::ClosedChannel { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::breez_services::PaymentFailedData { + // 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_error = ::sse_decode(deserializer); + let mut var_nodeId = ::sse_decode(deserializer); + let mut var_invoice = >::sse_decode(deserializer); + return crate::breez_services::PaymentFailedData { + error: var_error, + node_id: var_nodeId, + invoice: var_invoice, + }; + } +} + +impl SseDecode for crate::models::PaymentStatus { + // 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::models::PaymentStatus::Pending, + 1 => crate::models::PaymentStatus::Complete, + 2 => crate::models::PaymentStatus::Failed, + _ => unreachable!("Invalid variant for PaymentStatus: {}", inner), + }; + } +} + +impl SseDecode for crate::models::PaymentType { + // 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::models::PaymentType::Sent, + 1 => crate::models::PaymentType::Received, + 2 => crate::models::PaymentType::ClosedChannel, + _ => unreachable!("Invalid variant for PaymentType: {}", inner), + }; + } +} + +impl SseDecode for crate::models::PaymentTypeFilter { + // 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::models::PaymentTypeFilter::Sent, + 1 => crate::models::PaymentTypeFilter::Received, + 2 => crate::models::PaymentTypeFilter::ClosedChannel, + _ => unreachable!("Invalid variant for PaymentTypeFilter: {}", inner), + }; + } +} + +impl SseDecode for crate::models::PrepareOnchainPaymentRequest { + // 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_amountSat = ::sse_decode(deserializer); + let mut var_amountType = ::sse_decode(deserializer); + let mut var_claimTxFeerate = ::sse_decode(deserializer); + return crate::models::PrepareOnchainPaymentRequest { + amount_sat: var_amountSat, + amount_type: var_amountType, + claim_tx_feerate: var_claimTxFeerate, + }; + } +} + +impl SseDecode for crate::models::PrepareOnchainPaymentResponse { + // 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_feesHash = ::sse_decode(deserializer); + let mut var_feesPercentage = ::sse_decode(deserializer); + let mut var_feesLockup = ::sse_decode(deserializer); + let mut var_feesClaim = ::sse_decode(deserializer); + let mut var_senderAmountSat = ::sse_decode(deserializer); + let mut var_recipientAmountSat = ::sse_decode(deserializer); + let mut var_totalFees = ::sse_decode(deserializer); + return crate::models::PrepareOnchainPaymentResponse { + fees_hash: var_feesHash, + fees_percentage: var_feesPercentage, + fees_lockup: var_feesLockup, + fees_claim: var_feesClaim, + sender_amount_sat: var_senderAmountSat, + recipient_amount_sat: var_recipientAmountSat, + total_fees: var_totalFees, + }; + } +} + +impl SseDecode for crate::models::PrepareRedeemOnchainFundsRequest { + // 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_toAddress = ::sse_decode(deserializer); + let mut var_satPerVbyte = ::sse_decode(deserializer); + return crate::models::PrepareRedeemOnchainFundsRequest { + to_address: var_toAddress, + sat_per_vbyte: var_satPerVbyte, + }; + } +} + +impl SseDecode for crate::models::PrepareRedeemOnchainFundsResponse { + // 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_txWeight = ::sse_decode(deserializer); + let mut var_txFeeSat = ::sse_decode(deserializer); + return crate::models::PrepareRedeemOnchainFundsResponse { + tx_weight: var_txWeight, + tx_fee_sat: var_txFeeSat, + }; + } +} + +impl SseDecode for crate::models::PrepareRefundRequest { + // 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_swapAddress = ::sse_decode(deserializer); + let mut var_toAddress = ::sse_decode(deserializer); + let mut var_satPerVbyte = ::sse_decode(deserializer); + return crate::models::PrepareRefundRequest { + swap_address: var_swapAddress, + to_address: var_toAddress, + sat_per_vbyte: var_satPerVbyte, + }; + } +} + +impl SseDecode for crate::models::PrepareRefundResponse { + // 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_refundTxWeight = ::sse_decode(deserializer); + let mut var_refundTxFeeSat = ::sse_decode(deserializer); + return crate::models::PrepareRefundResponse { + refund_tx_weight: var_refundTxWeight, + refund_tx_fee_sat: var_refundTxFeeSat, + }; + } +} + +impl SseDecode for crate::fiat::Rate { + // 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_coin = ::sse_decode(deserializer); + let mut var_value = ::sse_decode(deserializer); + return crate::fiat::Rate { + coin: var_coin, + value: var_value, + }; + } +} + +impl SseDecode for crate::models::ReceiveOnchainRequest { + // 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_openingFeeParams = + >::sse_decode(deserializer); + return crate::models::ReceiveOnchainRequest { + opening_fee_params: var_openingFeeParams, + }; + } +} + +impl SseDecode for crate::models::ReceivePaymentRequest { + // 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_amountMsat = ::sse_decode(deserializer); + let mut var_description = ::sse_decode(deserializer); + let mut var_preimage = >>::sse_decode(deserializer); + let mut var_openingFeeParams = + >::sse_decode(deserializer); + let mut var_useDescriptionHash = >::sse_decode(deserializer); + let mut var_expiry = >::sse_decode(deserializer); + let mut var_cltv = >::sse_decode(deserializer); + return crate::models::ReceivePaymentRequest { + amount_msat: var_amountMsat, + description: var_description, + preimage: var_preimage, + opening_fee_params: var_openingFeeParams, + use_description_hash: var_useDescriptionHash, + expiry: var_expiry, + cltv: var_cltv, + }; + } +} + +impl SseDecode for crate::models::ReceivePaymentResponse { + // 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_lnInvoice = ::sse_decode(deserializer); + let mut var_openingFeeParams = + >::sse_decode(deserializer); + let mut var_openingFeeMsat = >::sse_decode(deserializer); + return crate::models::ReceivePaymentResponse { + ln_invoice: var_lnInvoice, + opening_fee_params: var_openingFeeParams, + opening_fee_msat: var_openingFeeMsat, + }; + } +} + +impl SseDecode for crate::chain::RecommendedFees { + // 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_fastestFee = ::sse_decode(deserializer); + let mut var_halfHourFee = ::sse_decode(deserializer); + let mut var_hourFee = ::sse_decode(deserializer); + let mut var_economyFee = ::sse_decode(deserializer); + let mut var_minimumFee = ::sse_decode(deserializer); + return crate::chain::RecommendedFees { + fastest_fee: var_fastestFee, + half_hour_fee: var_halfHourFee, + hour_fee: var_hourFee, + economy_fee: var_economyFee, + minimum_fee: var_minimumFee, + }; + } +} + +impl SseDecode for crate::models::RedeemOnchainFundsRequest { + // 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_toAddress = ::sse_decode(deserializer); + let mut var_satPerVbyte = ::sse_decode(deserializer); + return crate::models::RedeemOnchainFundsRequest { + to_address: var_toAddress, + sat_per_vbyte: var_satPerVbyte, + }; + } +} + +impl SseDecode for crate::models::RedeemOnchainFundsResponse { + // 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); + return crate::models::RedeemOnchainFundsResponse { txid: var_txid }; + } +} + +impl SseDecode for crate::models::RefundRequest { + // 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_swapAddress = ::sse_decode(deserializer); + let mut var_toAddress = ::sse_decode(deserializer); + let mut var_satPerVbyte = ::sse_decode(deserializer); + return crate::models::RefundRequest { + swap_address: var_swapAddress, + to_address: var_toAddress, + sat_per_vbyte: var_satPerVbyte, + }; + } +} + +impl SseDecode for crate::models::RefundResponse { + // 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_refundTxId = ::sse_decode(deserializer); + return crate::models::RefundResponse { + refund_tx_id: var_refundTxId, + }; + } +} + +impl SseDecode for crate::models::ReportIssueRequest { + // 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_data = + ::sse_decode(deserializer); + return crate::models::ReportIssueRequest::PaymentFailure { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::ReportPaymentFailureDetails { + // 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_paymentHash = ::sse_decode(deserializer); + let mut var_comment = >::sse_decode(deserializer); + return crate::models::ReportPaymentFailureDetails { + payment_hash: var_paymentHash, + comment: var_comment, + }; + } +} + +impl SseDecode for crate::models::ReverseSwapFeesRequest { + // 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_sendAmountSat = >::sse_decode(deserializer); + let mut var_claimTxFeerate = >::sse_decode(deserializer); + return crate::models::ReverseSwapFeesRequest { + send_amount_sat: var_sendAmountSat, + claim_tx_feerate: var_claimTxFeerate, + }; + } +} + +impl SseDecode for crate::models::ReverseSwapInfo { + // 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_id = ::sse_decode(deserializer); + let mut var_claimPubkey = ::sse_decode(deserializer); + let mut var_lockupTxid = >::sse_decode(deserializer); + let mut var_claimTxid = >::sse_decode(deserializer); + let mut var_onchainAmountSat = ::sse_decode(deserializer); + let mut var_status = ::sse_decode(deserializer); + return crate::models::ReverseSwapInfo { + id: var_id, + claim_pubkey: var_claimPubkey, + lockup_txid: var_lockupTxid, + claim_txid: var_claimTxid, + onchain_amount_sat: var_onchainAmountSat, + status: var_status, + }; + } +} + +impl SseDecode for crate::models::ReverseSwapPairInfo { + // 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_min = ::sse_decode(deserializer); + let mut var_max = ::sse_decode(deserializer); + let mut var_feesHash = ::sse_decode(deserializer); + let mut var_feesPercentage = ::sse_decode(deserializer); + let mut var_feesLockup = ::sse_decode(deserializer); + let mut var_feesClaim = ::sse_decode(deserializer); + let mut var_totalFees = >::sse_decode(deserializer); + return crate::models::ReverseSwapPairInfo { + min: var_min, + max: var_max, + fees_hash: var_feesHash, + fees_percentage: var_feesPercentage, + fees_lockup: var_feesLockup, + fees_claim: var_feesClaim, + total_fees: var_totalFees, + }; + } +} + +impl SseDecode for crate::models::ReverseSwapStatus { + // 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::models::ReverseSwapStatus::Initial, + 1 => crate::models::ReverseSwapStatus::InProgress, + 2 => crate::models::ReverseSwapStatus::Cancelled, + 3 => crate::models::ReverseSwapStatus::CompletedSeen, + 4 => crate::models::ReverseSwapStatus::CompletedConfirmed, + _ => unreachable!("Invalid variant for ReverseSwapStatus: {}", inner), + }; + } +} + +impl SseDecode for crate::invoice::RouteHint { + // 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_hops = >::sse_decode(deserializer); + return crate::invoice::RouteHint { hops: var_hops }; + } +} + +impl SseDecode for crate::invoice::RouteHintHop { + // 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_srcNodeId = ::sse_decode(deserializer); + let mut var_shortChannelId = ::sse_decode(deserializer); + let mut var_feesBaseMsat = ::sse_decode(deserializer); + let mut var_feesProportionalMillionths = ::sse_decode(deserializer); + let mut var_cltvExpiryDelta = ::sse_decode(deserializer); + let mut var_htlcMinimumMsat = >::sse_decode(deserializer); + let mut var_htlcMaximumMsat = >::sse_decode(deserializer); + return crate::invoice::RouteHintHop { + src_node_id: var_srcNodeId, + short_channel_id: var_shortChannelId, + fees_base_msat: var_feesBaseMsat, + fees_proportional_millionths: var_feesProportionalMillionths, + cltv_expiry_delta: var_cltvExpiryDelta, + htlc_minimum_msat: var_htlcMinimumMsat, + htlc_maximum_msat: var_htlcMaximumMsat, + }; + } +} + +impl SseDecode for crate::models::SendOnchainRequest { + // 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_amountSat = ::sse_decode(deserializer); + let mut var_onchainRecipientAddress = ::sse_decode(deserializer); + let mut var_pairHash = ::sse_decode(deserializer); + let mut var_satPerVbyte = ::sse_decode(deserializer); + return crate::models::SendOnchainRequest { + amount_sat: var_amountSat, + onchain_recipient_address: var_onchainRecipientAddress, + pair_hash: var_pairHash, + sat_per_vbyte: var_satPerVbyte, + }; + } +} + +impl SseDecode for crate::models::SendOnchainResponse { + // 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_reverseSwapInfo = ::sse_decode(deserializer); + return crate::models::SendOnchainResponse { + reverse_swap_info: var_reverseSwapInfo, + }; + } +} + +impl SseDecode for crate::models::SendPaymentRequest { + // 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_bolt11 = ::sse_decode(deserializer); + let mut var_amountMsat = >::sse_decode(deserializer); + let mut var_label = >::sse_decode(deserializer); + return crate::models::SendPaymentRequest { + bolt11: var_bolt11, + amount_msat: var_amountMsat, + label: var_label, + }; + } +} + +impl SseDecode for crate::models::SendPaymentResponse { + // 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_payment = ::sse_decode(deserializer); + return crate::models::SendPaymentResponse { + payment: var_payment, + }; + } +} + +impl SseDecode for crate::models::SendSpontaneousPaymentRequest { + // 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_nodeId = ::sse_decode(deserializer); + let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_extraTlvs = >>::sse_decode(deserializer); + let mut var_label = >::sse_decode(deserializer); + return crate::models::SendSpontaneousPaymentRequest { + node_id: var_nodeId, + amount_msat: var_amountMsat, + extra_tlvs: var_extraTlvs, + label: var_label, + }; + } +} + +impl SseDecode for crate::models::ServiceHealthCheckResponse { + // 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_status = ::sse_decode(deserializer); + return crate::models::ServiceHealthCheckResponse { status: var_status }; + } +} + +impl SseDecode for crate::breez_services::SignMessageRequest { + // 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_message = ::sse_decode(deserializer); + return crate::breez_services::SignMessageRequest { + message: var_message, + }; + } +} + +impl SseDecode for crate::breez_services::SignMessageResponse { + // 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_signature = ::sse_decode(deserializer); + return crate::breez_services::SignMessageResponse { + signature: var_signature, + }; + } +} + +impl SseDecode for crate::models::StaticBackupRequest { + // 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_workingDir = ::sse_decode(deserializer); + return crate::models::StaticBackupRequest { + working_dir: var_workingDir, + }; + } +} + +impl SseDecode for crate::models::StaticBackupResponse { + // 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_backup = >>::sse_decode(deserializer); + return crate::models::StaticBackupResponse { backup: var_backup }; + } +} + +impl SseDecode for crate::lnurl::pay::model::SuccessActionProcessed { + // 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_result = + ::sse_decode( + deserializer, + ); + return crate::lnurl::pay::model::SuccessActionProcessed::Aes { + result: var_result, + }; + } + 1 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::lnurl::pay::model::SuccessActionProcessed::Message { + data: var_data, + }; + } + 2 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::lnurl::pay::model::SuccessActionProcessed::Url { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::models::SwapAmountType { + // 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::models::SwapAmountType::Send, + 1 => crate::models::SwapAmountType::Receive, + _ => unreachable!("Invalid variant for SwapAmountType: {}", inner), + }; + } +} + +impl SseDecode for crate::models::SwapInfo { + // 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_bitcoinAddress = ::sse_decode(deserializer); + let mut var_createdAt = ::sse_decode(deserializer); + let mut var_lockHeight = ::sse_decode(deserializer); + let mut var_paymentHash = >::sse_decode(deserializer); + let mut var_preimage = >::sse_decode(deserializer); + let mut var_privateKey = >::sse_decode(deserializer); + let mut var_publicKey = >::sse_decode(deserializer); + let mut var_swapperPublicKey = >::sse_decode(deserializer); + let mut var_script = >::sse_decode(deserializer); + let mut var_bolt11 = >::sse_decode(deserializer); + let mut var_paidMsat = ::sse_decode(deserializer); + let mut var_totalIncomingTxs = ::sse_decode(deserializer); + let mut var_confirmedSats = ::sse_decode(deserializer); + let mut var_unconfirmedSats = ::sse_decode(deserializer); + let mut var_status = ::sse_decode(deserializer); + let mut var_refundTxIds = >::sse_decode(deserializer); + let mut var_unconfirmedTxIds = >::sse_decode(deserializer); + let mut var_confirmedTxIds = >::sse_decode(deserializer); + let mut var_minAllowedDeposit = ::sse_decode(deserializer); + let mut var_maxAllowedDeposit = ::sse_decode(deserializer); + let mut var_maxSwapperPayable = ::sse_decode(deserializer); + let mut var_lastRedeemError = >::sse_decode(deserializer); + let mut var_channelOpeningFees = + >::sse_decode(deserializer); + let mut var_confirmedAt = >::sse_decode(deserializer); + return crate::models::SwapInfo { + bitcoin_address: var_bitcoinAddress, + created_at: var_createdAt, + lock_height: var_lockHeight, + payment_hash: var_paymentHash, + preimage: var_preimage, + private_key: var_privateKey, + public_key: var_publicKey, + swapper_public_key: var_swapperPublicKey, + script: var_script, + bolt11: var_bolt11, + paid_msat: var_paidMsat, + total_incoming_txs: var_totalIncomingTxs, + confirmed_sats: var_confirmedSats, + unconfirmed_sats: var_unconfirmedSats, + status: var_status, + refund_tx_ids: var_refundTxIds, + unconfirmed_tx_ids: var_unconfirmedTxIds, + confirmed_tx_ids: var_confirmedTxIds, + min_allowed_deposit: var_minAllowedDeposit, + max_allowed_deposit: var_maxAllowedDeposit, + max_swapper_payable: var_maxSwapperPayable, + last_redeem_error: var_lastRedeemError, + channel_opening_fees: var_channelOpeningFees, + confirmed_at: var_confirmedAt, + }; + } +} + +impl SseDecode for crate::models::SwapStatus { + // 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::models::SwapStatus::Initial, + 1 => crate::models::SwapStatus::WaitingConfirmation, + 2 => crate::models::SwapStatus::Redeemable, + 3 => crate::models::SwapStatus::Redeemed, + 4 => crate::models::SwapStatus::Refundable, + 5 => crate::models::SwapStatus::Completed, + _ => unreachable!("Invalid variant for SwapStatus: {}", inner), + }; + } +} + +impl SseDecode for crate::fiat::Symbol { + // 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_grapheme = >::sse_decode(deserializer); + let mut var_template = >::sse_decode(deserializer); + let mut var_rtl = >::sse_decode(deserializer); + let mut var_position = >::sse_decode(deserializer); + return crate::fiat::Symbol { + grapheme: var_grapheme, + template: var_template, + rtl: var_rtl, + position: var_position, + }; + } +} + +impl SseDecode for crate::models::TlvEntry { + // 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_fieldNumber = ::sse_decode(deserializer); + let mut var_value = >::sse_decode(deserializer); + return crate::models::TlvEntry { + field_number: var_fieldNumber, + value: var_value, + }; + } +} + +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() + } +} + +impl SseDecode for u32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u32::().unwrap() + } +} + +impl SseDecode for u64 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u64::().unwrap() + } +} + +impl SseDecode for u8 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u8().unwrap() + } +} + +impl SseDecode for () { + // 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 crate::models::UnspentTransactionOutput { + // 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_outnum = ::sse_decode(deserializer); + let mut var_amountMillisatoshi = ::sse_decode(deserializer); + let mut var_address = ::sse_decode(deserializer); + let mut var_reserved = ::sse_decode(deserializer); + return crate::models::UnspentTransactionOutput { + txid: var_txid, + outnum: var_outnum, + amount_millisatoshi: var_amountMillisatoshi, + address: var_address, + reserved: var_reserved, + }; + } +} + +impl SseDecode for crate::lnurl::pay::model::UrlSuccessActionData { + // 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_description = ::sse_decode(deserializer); + let mut var_url = ::sse_decode(deserializer); + return crate::lnurl::pay::model::UrlSuccessActionData { + description: var_description, + url: var_url, + }; + } +} + +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::lnurl::pay::model::AesSuccessActionDataDecrypted { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.description.into_into_dart().into_dart(), + self.plaintext.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::AesSuccessActionDataDecrypted +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::AesSuccessActionDataDecrypted +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActionDataResult { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { reason } => { + [1.into_dart(), reason.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::AesSuccessActionDataResult +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::AesSuccessActionDataResult +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::BackupFailedData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.error.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::BackupFailedData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::BackupFailedData +{ + fn into_into_dart(self) -> crate::breez_services::BackupFailedData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::BackupStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.backed_up.into_into_dart().into_dart(), + self.last_backup_time.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::BackupStatus {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::BackupStatus +{ + fn into_into_dart(self) -> crate::models::BackupStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::BitcoinAddressData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.address.into_into_dart().into_dart(), + self.network.into_into_dart().into_dart(), + self.amount_sat.into_into_dart().into_dart(), + self.label.into_into_dart().into_dart(), + self.message.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::BitcoinAddressData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::BitcoinAddressData +{ + fn into_into_dart(self) -> crate::input_parser::BitcoinAddressData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::BreezEvent { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::breez_services::BreezEvent::NewBlock { block } => { + [0.into_dart(), block.into_into_dart().into_dart()].into_dart() + } + crate::breez_services::BreezEvent::InvoicePaid { details } => { + [1.into_dart(), details.into_into_dart().into_dart()].into_dart() + } + crate::breez_services::BreezEvent::Synced => [2.into_dart()].into_dart(), + crate::breez_services::BreezEvent::PaymentSucceed { details } => { + [3.into_dart(), details.into_into_dart().into_dart()].into_dart() + } + crate::breez_services::BreezEvent::PaymentFailed { details } => { + [4.into_dart(), details.into_into_dart().into_dart()].into_dart() + } + crate::breez_services::BreezEvent::BackupStarted => [5.into_dart()].into_dart(), + crate::breez_services::BreezEvent::BackupSucceeded => [6.into_dart()].into_dart(), + crate::breez_services::BreezEvent::BackupFailed { details } => { + [7.into_dart(), details.into_into_dart().into_dart()].into_dart() + } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + [8.into_dart(), details.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::BreezEvent +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::BreezEvent +{ + fn into_into_dart(self) -> crate::breez_services::BreezEvent { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinProvider { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Moonpay => 0.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::BuyBitcoinProvider +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::BuyBitcoinProvider +{ + fn into_into_dart(self) -> crate::models::BuyBitcoinProvider { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.provider.into_into_dart().into_dart(), + self.opening_fee_params.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::BuyBitcoinRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::BuyBitcoinRequest +{ + fn into_into_dart(self) -> crate::models::BuyBitcoinRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.url.into_into_dart().into_dart(), + self.opening_fee_params.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::BuyBitcoinResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::BuyBitcoinResponse +{ + fn into_into_dart(self) -> crate::models::BuyBitcoinResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ChannelState { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::PendingOpen => 0.into_dart(), + Self::Opened => 1.into_dart(), + Self::PendingClose => 2.into_dart(), + Self::Closed => 3.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::ChannelState {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ChannelState +{ + fn into_into_dart(self) -> crate::models::ChannelState { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::CheckMessageRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.message.into_into_dart().into_dart(), + self.pubkey.into_into_dart().into_dart(), + self.signature.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::CheckMessageRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::CheckMessageRequest +{ + fn into_into_dart(self) -> crate::breez_services::CheckMessageRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::CheckMessageResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.is_valid.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::CheckMessageResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::CheckMessageResponse +{ + fn into_into_dart(self) -> crate::breez_services::CheckMessageResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ClosedChannelPaymentDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.state.into_into_dart().into_dart(), + self.funding_txid.into_into_dart().into_dart(), + self.short_channel_id.into_into_dart().into_dart(), + self.closing_txid.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ClosedChannelPaymentDetails +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ClosedChannelPaymentDetails +{ + fn into_into_dart(self) -> crate::models::ClosedChannelPaymentDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::Config { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.breezserver.into_into_dart().into_dart(), + self.chainnotifier_url.into_into_dart().into_dart(), + self.mempoolspace_url.into_into_dart().into_dart(), + self.working_dir.into_into_dart().into_dart(), + self.network.into_into_dart().into_dart(), + self.payment_timeout_sec.into_into_dart().into_dart(), + self.default_lsp_id.into_into_dart().into_dart(), + self.api_key.into_into_dart().into_dart(), + self.maxfee_percent.into_into_dart().into_dart(), + self.exemptfee_msat.into_into_dart().into_dart(), + self.node_config.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::Config {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::Config { + fn into_into_dart(self) -> crate::models::Config { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ConfigureNodeRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.close_to_address.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ConfigureNodeRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ConfigureNodeRequest +{ + fn into_into_dart(self) -> crate::models::ConfigureNodeRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ConnectRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.config.into_into_dart().into_dart(), + self.seed.into_into_dart().into_dart(), + self.restore_only.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::ConnectRequest {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ConnectRequest +{ + fn into_into_dart(self) -> crate::models::ConnectRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::CurrencyInfo { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.name.into_into_dart().into_dart(), + self.fraction_size.into_into_dart().into_dart(), + self.spacing.into_into_dart().into_dart(), + self.symbol.into_into_dart().into_dart(), + self.uniq_symbol.into_into_dart().into_dart(), + self.localized_name.into_into_dart().into_dart(), + self.locale_overrides.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::CurrencyInfo {} +impl flutter_rust_bridge::IntoIntoDart for crate::fiat::CurrencyInfo { + fn into_into_dart(self) -> crate::fiat::CurrencyInfo { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::EnvironmentType { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Production => 0.into_dart(), + Self::Staging => 1.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::EnvironmentType +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::EnvironmentType +{ + fn into_into_dart(self) -> crate::models::EnvironmentType { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::FiatCurrency { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.info.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::FiatCurrency {} +impl flutter_rust_bridge::IntoIntoDart for crate::fiat::FiatCurrency { + fn into_into_dart(self) -> crate::fiat::FiatCurrency { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::GreenlightCredentials { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.device_key.into_into_dart().into_dart(), + self.device_cert.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::GreenlightCredentials +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::GreenlightCredentials +{ + fn into_into_dart(self) -> crate::models::GreenlightCredentials { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::GreenlightNodeConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.partner_credentials.into_into_dart().into_dart(), + self.invite_code.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::GreenlightNodeConfig +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::GreenlightNodeConfig +{ + fn into_into_dart(self) -> crate::models::GreenlightNodeConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::HealthCheckStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Operational => 0.into_dart(), + Self::Maintenance => 1.into_dart(), + Self::ServiceDisruption => 2.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::HealthCheckStatus +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::HealthCheckStatus +{ + fn into_into_dart(self) -> crate::models::HealthCheckStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::InputType { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::input_parser::InputType::BitcoinAddress { address } => { + [0.into_dart(), address.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::Bolt11 { invoice } => { + [1.into_dart(), invoice.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::NodeId { node_id } => { + [2.into_dart(), node_id.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::Url { url } => { + [3.into_dart(), url.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::LnUrlPay { data } => { + [4.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::LnUrlWithdraw { data } => { + [5.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::LnUrlAuth { data } => { + [6.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::input_parser::InputType::LnUrlError { data } => { + [7.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::InputType +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::InputType +{ + fn into_into_dart(self) -> crate::input_parser::InputType { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::InvoicePaidDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment_hash.into_into_dart().into_dart(), + self.bolt11.into_into_dart().into_dart(), + self.payment.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::InvoicePaidDetails +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::InvoicePaidDetails +{ + fn into_into_dart(self) -> crate::breez_services::InvoicePaidDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ListPaymentsRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.filters.into_into_dart().into_dart(), + self.metadata_filters.into_into_dart().into_dart(), + self.from_timestamp.into_into_dart().into_dart(), + self.to_timestamp.into_into_dart().into_dart(), + self.include_failures.into_into_dart().into_dart(), + self.offset.into_into_dart().into_dart(), + self.limit.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ListPaymentsRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ListPaymentsRequest +{ + fn into_into_dart(self) -> crate::models::ListPaymentsRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::invoice::LNInvoice { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.bolt11.into_into_dart().into_dart(), + self.network.into_into_dart().into_dart(), + self.payee_pubkey.into_into_dart().into_dart(), + self.payment_hash.into_into_dart().into_dart(), + self.description.into_into_dart().into_dart(), + self.description_hash.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.timestamp.into_into_dart().into_dart(), + self.expiry.into_into_dart().into_dart(), + self.routing_hints.into_into_dart().into_dart(), + self.payment_secret.into_into_dart().into_dart(), + self.min_final_cltv_expiry_delta + .into_into_dart() + .into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::LNInvoice {} +impl flutter_rust_bridge::IntoIntoDart for crate::invoice::LNInvoice { + fn into_into_dart(self) -> crate::invoice::LNInvoice { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnPaymentDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment_hash.into_into_dart().into_dart(), + self.label.into_into_dart().into_dart(), + self.destination_pubkey.into_into_dart().into_dart(), + self.payment_preimage.into_into_dart().into_dart(), + self.keysend.into_into_dart().into_dart(), + self.bolt11.into_into_dart().into_dart(), + self.open_channel_bolt11.into_into_dart().into_dart(), + self.lnurl_success_action.into_into_dart().into_dart(), + self.lnurl_pay_domain.into_into_dart().into_dart(), + self.ln_address.into_into_dart().into_dart(), + self.lnurl_metadata.into_into_dart().into_dart(), + self.lnurl_withdraw_endpoint.into_into_dart().into_dart(), + self.swap_info.into_into_dart().into_dart(), + self.reverse_swap_info.into_into_dart().into_dart(), + self.pending_expiration_block.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnPaymentDetails +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnPaymentDetails +{ + fn into_into_dart(self) -> crate::models::LnPaymentDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlAuthRequestData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.k1.into_into_dart().into_dart(), + self.action.into_into_dart().into_dart(), + self.domain.into_into_dart().into_dart(), + self.url.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::LnUrlAuthRequestData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::LnUrlAuthRequestData +{ + fn into_into_dart(self) -> crate::input_parser::LnUrlAuthRequestData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnUrlCallbackStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::LnUrlCallbackStatus::Ok => [0.into_dart()].into_dart(), + crate::models::LnUrlCallbackStatus::ErrorStatus { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnUrlCallbackStatus +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnUrlCallbackStatus +{ + fn into_into_dart(self) -> crate::models::LnUrlCallbackStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlErrorData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.reason.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::LnUrlErrorData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::LnUrlErrorData +{ + fn into_into_dart(self) -> crate::input_parser::LnUrlErrorData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPayErrorData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment_hash.into_into_dart().into_dart(), + self.reason.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::LnUrlPayErrorData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::LnUrlPayErrorData +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnUrlPayRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.data.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.comment.into_into_dart().into_dart(), + self.payment_label.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnUrlPayRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnUrlPayRequest +{ + fn into_into_dart(self) -> crate::models::LnUrlPayRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlPayRequestData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.callback.into_into_dart().into_dart(), + self.min_sendable.into_into_dart().into_dart(), + self.max_sendable.into_into_dart().into_dart(), + self.metadata_str.into_into_dart().into_dart(), + self.comment_allowed.into_into_dart().into_dart(), + self.domain.into_into_dart().into_dart(), + self.allows_nostr.into_into_dart().into_dart(), + self.nostr_pubkey.into_into_dart().into_dart(), + self.ln_address.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::LnUrlPayRequestData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::LnUrlPayRequestData +{ + fn into_into_dart(self) -> crate::input_parser::LnUrlPayRequestData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPayResult { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::model::LnUrlPayResult::PayError { data } => { + [2.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::LnUrlPayResult +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::LnUrlPayResult +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPayResult { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPaySuccessData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment.into_into_dart().into_dart(), + self.success_action.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::LnUrlPaySuccessData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::LnUrlPaySuccessData +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.data.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.description.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnUrlWithdrawRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnUrlWithdrawRequest +{ + fn into_into_dart(self) -> crate::models::LnUrlWithdrawRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlWithdrawRequestData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.callback.into_into_dart().into_dart(), + self.k1.into_into_dart().into_dart(), + self.default_description.into_into_dart().into_dart(), + self.min_withdrawable.into_into_dart().into_dart(), + self.max_withdrawable.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::input_parser::LnUrlWithdrawRequestData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::input_parser::LnUrlWithdrawRequestData +{ + fn into_into_dart(self) -> crate::input_parser::LnUrlWithdrawRequestData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawResult { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::LnUrlWithdrawResult::Ok { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::models::LnUrlWithdrawResult::ErrorStatus { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnUrlWithdrawResult +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnUrlWithdrawResult +{ + fn into_into_dart(self) -> crate::models::LnUrlWithdrawResult { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawSuccessData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.invoice.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::LnUrlWithdrawSuccessData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::LnUrlWithdrawSuccessData +{ + fn into_into_dart(self) -> crate::models::LnUrlWithdrawSuccessData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::LocaleOverrides { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.locale.into_into_dart().into_dart(), + self.spacing.into_into_dart().into_dart(), + self.symbol.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::LocaleOverrides {} +impl flutter_rust_bridge::IntoIntoDart + for crate::fiat::LocaleOverrides +{ + fn into_into_dart(self) -> crate::fiat::LocaleOverrides { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::LocalizedName { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.locale.into_into_dart().into_dart(), + self.name.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::LocalizedName {} +impl flutter_rust_bridge::IntoIntoDart for crate::fiat::LocalizedName { + fn into_into_dart(self) -> crate::fiat::LocalizedName { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::LogEntry { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.line.into_into_dart().into_dart(), + self.level.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::LogEntry {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::LogEntry { + fn into_into_dart(self) -> crate::models::LogEntry { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lsp::LspInformation { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.name.into_into_dart().into_dart(), + self.widget_url.into_into_dart().into_dart(), + self.pubkey.into_into_dart().into_dart(), + self.host.into_into_dart().into_dart(), + self.base_fee_msat.into_into_dart().into_dart(), + self.fee_rate.into_into_dart().into_dart(), + self.time_lock_delta.into_into_dart().into_dart(), + self.min_htlc_msat.into_into_dart().into_dart(), + self.lsp_pubkey.into_into_dart().into_dart(), + self.opening_fee_params_list.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::lsp::LspInformation {} +impl flutter_rust_bridge::IntoIntoDart for crate::lsp::LspInformation { + fn into_into_dart(self) -> crate::lsp::LspInformation { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::MaxReverseSwapAmountResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.total_sat.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::MaxReverseSwapAmountResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::MaxReverseSwapAmountResponse +{ + fn into_into_dart(self) -> crate::models::MaxReverseSwapAmountResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::MessageSuccessActionData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.message.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::MessageSuccessActionData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::MessageSuccessActionData +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::MessageSuccessActionData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::MetadataFilter { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.json_path.into_into_dart().into_dart(), + self.json_value.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::MetadataFilter {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::MetadataFilter +{ + fn into_into_dart(self) -> crate::models::MetadataFilter { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::Network { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Bitcoin => 0.into_dart(), + Self::Testnet => 1.into_dart(), + Self::Signet => 2.into_dart(), + Self::Regtest => 3.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::Network {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::Network { + fn into_into_dart(self) -> crate::models::Network { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::NodeConfig { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::NodeConfig::Greenlight { config } => { + [0.into_dart(), config.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::NodeConfig {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::NodeConfig { + fn into_into_dart(self) -> crate::models::NodeConfig { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::NodeCredentials { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::NodeCredentials::Greenlight { credentials } => { + [0.into_dart(), credentials.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::NodeCredentials +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::NodeCredentials +{ + fn into_into_dart(self) -> crate::models::NodeCredentials { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::NodeState { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.block_height.into_into_dart().into_dart(), + self.channels_balance_msat.into_into_dart().into_dart(), + self.onchain_balance_msat.into_into_dart().into_dart(), + self.pending_onchain_balance_msat + .into_into_dart() + .into_dart(), + self.utxos.into_into_dart().into_dart(), + self.max_payable_msat.into_into_dart().into_dart(), + self.max_receivable_msat.into_into_dart().into_dart(), + self.max_single_payment_amount_msat + .into_into_dart() + .into_dart(), + self.max_chan_reserve_msats.into_into_dart().into_dart(), + self.connected_peers.into_into_dart().into_dart(), + self.inbound_liquidity_msats.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::NodeState {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::NodeState { + fn into_into_dart(self) -> crate::models::NodeState { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::OnchainPaymentLimitsResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.min_sat.into_into_dart().into_dart(), + self.max_sat.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::OnchainPaymentLimitsResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::OnchainPaymentLimitsResponse +{ + fn into_into_dart(self) -> crate::models::OnchainPaymentLimitsResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::OpenChannelFeeRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.amount_msat.into_into_dart().into_dart(), + self.expiry.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::OpenChannelFeeRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::OpenChannelFeeRequest +{ + fn into_into_dart(self) -> crate::models::OpenChannelFeeRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::OpenChannelFeeResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.fee_msat.into_into_dart().into_dart(), + self.fee_params.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::OpenChannelFeeResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::OpenChannelFeeResponse +{ + fn into_into_dart(self) -> crate::models::OpenChannelFeeResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::OpeningFeeParams { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.min_msat.into_into_dart().into_dart(), + self.proportional.into_into_dart().into_dart(), + self.valid_until.into_into_dart().into_dart(), + self.max_idle_time.into_into_dart().into_dart(), + self.max_client_to_self_delay.into_into_dart().into_dart(), + self.promise.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::OpeningFeeParams +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::OpeningFeeParams +{ + fn into_into_dart(self) -> crate::models::OpeningFeeParams { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::OpeningFeeParamsMenu { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.values.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::OpeningFeeParamsMenu +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::OpeningFeeParamsMenu +{ + fn into_into_dart(self) -> crate::models::OpeningFeeParamsMenu { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PayOnchainRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.recipient_address.into_into_dart().into_dart(), + self.prepare_res.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PayOnchainRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PayOnchainRequest +{ + fn into_into_dart(self) -> crate::models::PayOnchainRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PayOnchainResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.reverse_swap_info.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PayOnchainResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PayOnchainResponse +{ + fn into_into_dart(self) -> crate::models::PayOnchainResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::Payment { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.payment_type.into_into_dart().into_dart(), + self.payment_time.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.fee_msat.into_into_dart().into_dart(), + self.status.into_into_dart().into_dart(), + self.error.into_into_dart().into_dart(), + self.description.into_into_dart().into_dart(), + self.details.into_into_dart().into_dart(), + self.metadata.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::Payment {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::Payment { + fn into_into_dart(self) -> crate::models::Payment { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PaymentDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::PaymentDetails::Ln { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::models::PaymentDetails::ClosedChannel { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::PaymentDetails {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PaymentDetails +{ + fn into_into_dart(self) -> crate::models::PaymentDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::PaymentFailedData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.error.into_into_dart().into_dart(), + self.node_id.into_into_dart().into_dart(), + self.invoice.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::PaymentFailedData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::PaymentFailedData +{ + fn into_into_dart(self) -> crate::breez_services::PaymentFailedData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PaymentStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Pending => 0.into_dart(), + Self::Complete => 1.into_dart(), + Self::Failed => 2.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::PaymentStatus {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PaymentStatus +{ + fn into_into_dart(self) -> crate::models::PaymentStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PaymentType { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Sent => 0.into_dart(), + Self::Received => 1.into_dart(), + Self::ClosedChannel => 2.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::PaymentType {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::PaymentType { + fn into_into_dart(self) -> crate::models::PaymentType { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PaymentTypeFilter { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Sent => 0.into_dart(), + Self::Received => 1.into_dart(), + Self::ClosedChannel => 2.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PaymentTypeFilter +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PaymentTypeFilter +{ + fn into_into_dart(self) -> crate::models::PaymentTypeFilter { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareOnchainPaymentRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.amount_sat.into_into_dart().into_dart(), + self.amount_type.into_into_dart().into_dart(), + self.claim_tx_feerate.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareOnchainPaymentRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareOnchainPaymentRequest +{ + fn into_into_dart(self) -> crate::models::PrepareOnchainPaymentRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareOnchainPaymentResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.fees_hash.into_into_dart().into_dart(), + self.fees_percentage.into_into_dart().into_dart(), + self.fees_lockup.into_into_dart().into_dart(), + self.fees_claim.into_into_dart().into_dart(), + self.sender_amount_sat.into_into_dart().into_dart(), + self.recipient_amount_sat.into_into_dart().into_dart(), + self.total_fees.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareOnchainPaymentResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareOnchainPaymentResponse +{ + fn into_into_dart(self) -> crate::models::PrepareOnchainPaymentResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareRedeemOnchainFundsRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.to_address.into_into_dart().into_dart(), + self.sat_per_vbyte.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareRedeemOnchainFundsRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareRedeemOnchainFundsRequest +{ + fn into_into_dart(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareRedeemOnchainFundsResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.tx_weight.into_into_dart().into_dart(), + self.tx_fee_sat.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareRedeemOnchainFundsResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareRedeemOnchainFundsResponse +{ + fn into_into_dart(self) -> crate::models::PrepareRedeemOnchainFundsResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareRefundRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.swap_address.into_into_dart().into_dart(), + self.to_address.into_into_dart().into_dart(), + self.sat_per_vbyte.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareRefundRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareRefundRequest +{ + fn into_into_dart(self) -> crate::models::PrepareRefundRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::PrepareRefundResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.refund_tx_weight.into_into_dart().into_dart(), + self.refund_tx_fee_sat.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::PrepareRefundResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::PrepareRefundResponse +{ + fn into_into_dart(self) -> crate::models::PrepareRefundResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::Rate { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.coin.into_into_dart().into_dart(), + self.value.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::Rate {} +impl flutter_rust_bridge::IntoIntoDart for crate::fiat::Rate { + fn into_into_dart(self) -> crate::fiat::Rate { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReceiveOnchainRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.opening_fee_params.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReceiveOnchainRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReceiveOnchainRequest +{ + fn into_into_dart(self) -> crate::models::ReceiveOnchainRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReceivePaymentRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.amount_msat.into_into_dart().into_dart(), + self.description.into_into_dart().into_dart(), + self.preimage.into_into_dart().into_dart(), + self.opening_fee_params.into_into_dart().into_dart(), + self.use_description_hash.into_into_dart().into_dart(), + self.expiry.into_into_dart().into_dart(), + self.cltv.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReceivePaymentRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReceivePaymentRequest +{ + fn into_into_dart(self) -> crate::models::ReceivePaymentRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReceivePaymentResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.ln_invoice.into_into_dart().into_dart(), + self.opening_fee_params.into_into_dart().into_dart(), + self.opening_fee_msat.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReceivePaymentResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReceivePaymentResponse +{ + fn into_into_dart(self) -> crate::models::ReceivePaymentResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::chain::RecommendedFees { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.fastest_fee.into_into_dart().into_dart(), + self.half_hour_fee.into_into_dart().into_dart(), + self.hour_fee.into_into_dart().into_dart(), + self.economy_fee.into_into_dart().into_dart(), + self.minimum_fee.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::chain::RecommendedFees {} +impl flutter_rust_bridge::IntoIntoDart + for crate::chain::RecommendedFees +{ + fn into_into_dart(self) -> crate::chain::RecommendedFees { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::RedeemOnchainFundsRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.to_address.into_into_dart().into_dart(), + self.sat_per_vbyte.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::RedeemOnchainFundsRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::RedeemOnchainFundsRequest +{ + fn into_into_dart(self) -> crate::models::RedeemOnchainFundsRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::RedeemOnchainFundsResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.txid.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::RedeemOnchainFundsResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::RedeemOnchainFundsResponse +{ + fn into_into_dart(self) -> crate::models::RedeemOnchainFundsResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::RefundRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.swap_address.into_into_dart().into_dart(), + self.to_address.into_into_dart().into_dart(), + self.sat_per_vbyte.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::RefundRequest {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::RefundRequest +{ + fn into_into_dart(self) -> crate::models::RefundRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::RefundResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.refund_tx_id.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::RefundResponse {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::RefundResponse +{ + fn into_into_dart(self) -> crate::models::RefundResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReportIssueRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::models::ReportIssueRequest::PaymentFailure { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReportIssueRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReportIssueRequest +{ + fn into_into_dart(self) -> crate::models::ReportIssueRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReportPaymentFailureDetails { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment_hash.into_into_dart().into_dart(), + self.comment.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReportPaymentFailureDetails +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReportPaymentFailureDetails +{ + fn into_into_dart(self) -> crate::models::ReportPaymentFailureDetails { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReverseSwapFeesRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.send_amount_sat.into_into_dart().into_dart(), + self.claim_tx_feerate.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReverseSwapFeesRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReverseSwapFeesRequest +{ + fn into_into_dart(self) -> crate::models::ReverseSwapFeesRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReverseSwapInfo { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.id.into_into_dart().into_dart(), + self.claim_pubkey.into_into_dart().into_dart(), + self.lockup_txid.into_into_dart().into_dart(), + self.claim_txid.into_into_dart().into_dart(), + self.onchain_amount_sat.into_into_dart().into_dart(), + self.status.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReverseSwapInfo +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReverseSwapInfo +{ + fn into_into_dart(self) -> crate::models::ReverseSwapInfo { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReverseSwapPairInfo { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.min.into_into_dart().into_dart(), + self.max.into_into_dart().into_dart(), + self.fees_hash.into_into_dart().into_dart(), + self.fees_percentage.into_into_dart().into_dart(), + self.fees_lockup.into_into_dart().into_dart(), + self.fees_claim.into_into_dart().into_dart(), + self.total_fees.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReverseSwapPairInfo +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReverseSwapPairInfo +{ + fn into_into_dart(self) -> crate::models::ReverseSwapPairInfo { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ReverseSwapStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Initial => 0.into_dart(), + Self::InProgress => 1.into_dart(), + Self::Cancelled => 2.into_dart(), + Self::CompletedSeen => 3.into_dart(), + Self::CompletedConfirmed => 4.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ReverseSwapStatus +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ReverseSwapStatus +{ + fn into_into_dart(self) -> crate::models::ReverseSwapStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::invoice::RouteHint { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.hops.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::RouteHint {} +impl flutter_rust_bridge::IntoIntoDart for crate::invoice::RouteHint { + fn into_into_dart(self) -> crate::invoice::RouteHint { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::invoice::RouteHintHop { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.src_node_id.into_into_dart().into_dart(), + self.short_channel_id.into_into_dart().into_dart(), + self.fees_base_msat.into_into_dart().into_dart(), + self.fees_proportional_millionths + .into_into_dart() + .into_dart(), + self.cltv_expiry_delta.into_into_dart().into_dart(), + self.htlc_minimum_msat.into_into_dart().into_dart(), + self.htlc_maximum_msat.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::RouteHintHop {} +impl flutter_rust_bridge::IntoIntoDart + for crate::invoice::RouteHintHop +{ + fn into_into_dart(self) -> crate::invoice::RouteHintHop { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SendOnchainRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.amount_sat.into_into_dart().into_dart(), + self.onchain_recipient_address.into_into_dart().into_dart(), + self.pair_hash.into_into_dart().into_dart(), + self.sat_per_vbyte.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::SendOnchainRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SendOnchainRequest +{ + fn into_into_dart(self) -> crate::models::SendOnchainRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SendOnchainResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.reverse_swap_info.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::SendOnchainResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SendOnchainResponse +{ + fn into_into_dart(self) -> crate::models::SendOnchainResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SendPaymentRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.bolt11.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.label.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::SendPaymentRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SendPaymentRequest +{ + fn into_into_dart(self) -> crate::models::SendPaymentRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SendPaymentResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.payment.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::SendPaymentResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SendPaymentResponse +{ + fn into_into_dart(self) -> crate::models::SendPaymentResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SendSpontaneousPaymentRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.node_id.into_into_dart().into_dart(), + self.amount_msat.into_into_dart().into_dart(), + self.extra_tlvs.into_into_dart().into_dart(), + self.label.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::SendSpontaneousPaymentRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SendSpontaneousPaymentRequest +{ + fn into_into_dart(self) -> crate::models::SendSpontaneousPaymentRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::ServiceHealthCheckResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.status.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::ServiceHealthCheckResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::ServiceHealthCheckResponse +{ + fn into_into_dart(self) -> crate::models::ServiceHealthCheckResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::SignMessageRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.message.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::SignMessageRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::SignMessageRequest +{ + fn into_into_dart(self) -> crate::breez_services::SignMessageRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::breez_services::SignMessageResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.signature.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::breez_services::SignMessageResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::breez_services::SignMessageResponse +{ + fn into_into_dart(self) -> crate::breez_services::SignMessageResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::StaticBackupRequest { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.working_dir.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::StaticBackupRequest +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::StaticBackupRequest +{ + fn into_into_dart(self) -> crate::models::StaticBackupRequest { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::StaticBackupResponse { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.backup.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::StaticBackupResponse +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::StaticBackupResponse +{ + fn into_into_dart(self) -> crate::models::StaticBackupResponse { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::SuccessActionProcessed { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::lnurl::pay::model::SuccessActionProcessed::Aes { result } => { + [0.into_dart(), result.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::model::SuccessActionProcessed::Message { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::model::SuccessActionProcessed::Url { data } => { + [2.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::SuccessActionProcessed +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::SuccessActionProcessed +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SwapAmountType { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Send => 0.into_dart(), + Self::Receive => 1.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::SwapAmountType {} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::SwapAmountType +{ + fn into_into_dart(self) -> crate::models::SwapAmountType { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SwapInfo { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.bitcoin_address.into_into_dart().into_dart(), + self.created_at.into_into_dart().into_dart(), + self.lock_height.into_into_dart().into_dart(), + self.payment_hash.into_into_dart().into_dart(), + self.preimage.into_into_dart().into_dart(), + self.private_key.into_into_dart().into_dart(), + self.public_key.into_into_dart().into_dart(), + self.swapper_public_key.into_into_dart().into_dart(), + self.script.into_into_dart().into_dart(), + self.bolt11.into_into_dart().into_dart(), + self.paid_msat.into_into_dart().into_dart(), + self.total_incoming_txs.into_into_dart().into_dart(), + self.confirmed_sats.into_into_dart().into_dart(), + self.unconfirmed_sats.into_into_dart().into_dart(), + self.status.into_into_dart().into_dart(), + self.refund_tx_ids.into_into_dart().into_dart(), + self.unconfirmed_tx_ids.into_into_dart().into_dart(), + self.confirmed_tx_ids.into_into_dart().into_dart(), + self.min_allowed_deposit.into_into_dart().into_dart(), + self.max_allowed_deposit.into_into_dart().into_dart(), + self.max_swapper_payable.into_into_dart().into_dart(), + self.last_redeem_error.into_into_dart().into_dart(), + self.channel_opening_fees.into_into_dart().into_dart(), + self.confirmed_at.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::SwapInfo {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::SwapInfo { + fn into_into_dart(self) -> crate::models::SwapInfo { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::SwapStatus { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + Self::Initial => 0.into_dart(), + Self::WaitingConfirmation => 1.into_dart(), + Self::Redeemable => 2.into_dart(), + Self::Redeemed => 3.into_dart(), + Self::Refundable => 4.into_dart(), + Self::Completed => 5.into_dart(), + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::SwapStatus {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::SwapStatus { + fn into_into_dart(self) -> crate::models::SwapStatus { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::fiat::Symbol { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.grapheme.into_into_dart().into_dart(), + self.template.into_into_dart().into_dart(), + self.rtl.into_into_dart().into_dart(), + self.position.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::Symbol {} +impl flutter_rust_bridge::IntoIntoDart for crate::fiat::Symbol { + fn into_into_dart(self) -> crate::fiat::Symbol { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::TlvEntry { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.field_number.into_into_dart().into_dart(), + self.value.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::TlvEntry {} +impl flutter_rust_bridge::IntoIntoDart for crate::models::TlvEntry { + fn into_into_dart(self) -> crate::models::TlvEntry { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::UnspentTransactionOutput { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.txid.into_into_dart().into_dart(), + self.outnum.into_into_dart().into_dart(), + self.amount_millisatoshi.into_into_dart().into_dart(), + self.address.into_into_dart().into_dart(), + self.reserved.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::UnspentTransactionOutput +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::UnspentTransactionOutput +{ + fn into_into_dart(self) -> crate::models::UnspentTransactionOutput { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::UrlSuccessActionData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.description.into_into_dart().into_dart(), + self.url.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::model::UrlSuccessActionData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::model::UrlSuccessActionData +{ + fn into_into_dart(self) -> crate::lnurl::pay::model::UrlSuccessActionData { + self + } +} + +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(format!("{:?}", self), serializer); + } +} + +impl SseEncode + for StreamSink +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + unimplemented!("") + } +} + +impl SseEncode + for StreamSink +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + 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 SseEncode for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.description, serializer); + ::sse_encode(self.plaintext, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::AesSuccessActionDataResult { + // 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::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { data } => { + ::sse_encode(0, serializer); + ::sse_encode( + data, serializer, + ); + } + crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { reason } => { + ::sse_encode(1, serializer); + ::sse_encode(reason, serializer); + } + } + } +} + +impl SseEncode for crate::breez_services::BackupFailedData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.error, serializer); + } +} + +impl SseEncode for crate::models::BackupStatus { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.backed_up, serializer); + >::sse_encode(self.last_backup_time, serializer); + } +} + +impl SseEncode for crate::input_parser::BitcoinAddressData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.address, serializer); + ::sse_encode(self.network, serializer); + >::sse_encode(self.amount_sat, serializer); + >::sse_encode(self.label, serializer); + >::sse_encode(self.message, 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::breez_services::BreezEvent { + // 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::breez_services::BreezEvent::NewBlock { block } => { + ::sse_encode(0, serializer); + ::sse_encode(block, serializer); + } + crate::breez_services::BreezEvent::InvoicePaid { details } => { + ::sse_encode(1, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::Synced => { + ::sse_encode(2, serializer); + } + crate::breez_services::BreezEvent::PaymentSucceed { details } => { + ::sse_encode(3, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::PaymentFailed { details } => { + ::sse_encode(4, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::BackupStarted => { + ::sse_encode(5, serializer); + } + crate::breez_services::BreezEvent::BackupSucceeded => { + ::sse_encode(6, serializer); + } + crate::breez_services::BreezEvent::BackupFailed { details } => { + ::sse_encode(7, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + ::sse_encode(8, serializer); + ::sse_encode(details, serializer); + } + } + } +} + +impl SseEncode for crate::models::BuyBitcoinProvider { + // 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::models::BuyBitcoinProvider::Moonpay => 0, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::BuyBitcoinRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.provider, serializer); + >::sse_encode(self.opening_fee_params, serializer); + } +} + +impl SseEncode for crate::models::BuyBitcoinResponse { + // Codec=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.opening_fee_params, serializer); + } +} + +impl SseEncode for crate::models::ChannelState { + // 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::models::ChannelState::PendingOpen => 0, + crate::models::ChannelState::Opened => 1, + crate::models::ChannelState::PendingClose => 2, + crate::models::ChannelState::Closed => 3, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::breez_services::CheckMessageRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.message, serializer); + ::sse_encode(self.pubkey, serializer); + ::sse_encode(self.signature, serializer); + } +} + +impl SseEncode for crate::breez_services::CheckMessageResponse { + // Codec=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_valid, serializer); + } +} + +impl SseEncode for crate::models::ClosedChannelPaymentDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.state, serializer); + ::sse_encode(self.funding_txid, serializer); + >::sse_encode(self.short_channel_id, serializer); + >::sse_encode(self.closing_txid, serializer); + } +} + +impl SseEncode for crate::models::Config { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.breezserver, serializer); + ::sse_encode(self.chainnotifier_url, serializer); + >::sse_encode(self.mempoolspace_url, serializer); + ::sse_encode(self.working_dir, serializer); + ::sse_encode(self.network, serializer); + ::sse_encode(self.payment_timeout_sec, serializer); + >::sse_encode(self.default_lsp_id, serializer); + >::sse_encode(self.api_key, serializer); + ::sse_encode(self.maxfee_percent, serializer); + ::sse_encode(self.exemptfee_msat, serializer); + ::sse_encode(self.node_config, serializer); + } +} + +impl SseEncode for crate::models::ConfigureNodeRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.close_to_address, serializer); + } +} + +impl SseEncode for crate::models::ConnectRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.config, serializer); + >::sse_encode(self.seed, serializer); + >::sse_encode(self.restore_only, serializer); + } +} + +impl SseEncode for crate::fiat::CurrencyInfo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.name, serializer); + ::sse_encode(self.fraction_size, serializer); + >::sse_encode(self.spacing, serializer); + >::sse_encode(self.symbol, serializer); + >::sse_encode(self.uniq_symbol, serializer); + >>::sse_encode(self.localized_name, serializer); + >>::sse_encode(self.locale_overrides, serializer); + } +} + +impl SseEncode for crate::models::EnvironmentType { + // 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::models::EnvironmentType::Production => 0, + crate::models::EnvironmentType::Staging => 1, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for f64 { + // 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_f64::(self).unwrap(); + } +} + +impl SseEncode for crate::fiat::FiatCurrency { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + ::sse_encode(self.info, serializer); + } +} + +impl SseEncode for crate::models::GreenlightCredentials { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.device_key, serializer); + >::sse_encode(self.device_cert, serializer); + } +} + +impl SseEncode for crate::models::GreenlightNodeConfig { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode( + self.partner_credentials, + serializer, + ); + >::sse_encode(self.invite_code, serializer); + } +} + +impl SseEncode for crate::models::HealthCheckStatus { + // 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::models::HealthCheckStatus::Operational => 0, + crate::models::HealthCheckStatus::Maintenance => 1, + crate::models::HealthCheckStatus::ServiceDisruption => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for i32 { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer.cursor.write_i32::(self).unwrap(); + } +} + +impl SseEncode for i64 { + // 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).unwrap(); + } +} + +impl SseEncode for crate::input_parser::InputType { + // 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::input_parser::InputType::BitcoinAddress { address } => { + ::sse_encode(0, serializer); + ::sse_encode(address, serializer); + } + crate::input_parser::InputType::Bolt11 { invoice } => { + ::sse_encode(1, serializer); + ::sse_encode(invoice, serializer); + } + crate::input_parser::InputType::NodeId { node_id } => { + ::sse_encode(2, serializer); + ::sse_encode(node_id, serializer); + } + crate::input_parser::InputType::Url { url } => { + ::sse_encode(3, serializer); + ::sse_encode(url, serializer); + } + crate::input_parser::InputType::LnUrlPay { data } => { + ::sse_encode(4, serializer); + ::sse_encode(data, serializer); + } + crate::input_parser::InputType::LnUrlWithdraw { data } => { + ::sse_encode(5, serializer); + ::sse_encode(data, serializer); + } + crate::input_parser::InputType::LnUrlAuth { data } => { + ::sse_encode(6, serializer); + ::sse_encode(data, serializer); + } + crate::input_parser::InputType::LnUrlError { data } => { + ::sse_encode(7, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::breez_services::InvoicePaidDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment_hash, serializer); + ::sse_encode(self.bolt11, serializer); + >::sse_encode(self.payment, serializer); + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for crate::models::ListPaymentsRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(self.filters, serializer); + >>::sse_encode(self.metadata_filters, serializer); + >::sse_encode(self.from_timestamp, serializer); + >::sse_encode(self.to_timestamp, serializer); + >::sse_encode(self.include_failures, serializer); + >::sse_encode(self.offset, serializer); + >::sse_encode(self.limit, serializer); + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for Vec { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.len() as _, serializer); + for item in self { + ::sse_encode(item, serializer); + } + } +} + +impl SseEncode for crate::invoice::LNInvoice { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.bolt11, serializer); + ::sse_encode(self.network, serializer); + ::sse_encode(self.payee_pubkey, serializer); + ::sse_encode(self.payment_hash, serializer); + >::sse_encode(self.description, serializer); + >::sse_encode(self.description_hash, serializer); + >::sse_encode(self.amount_msat, serializer); + ::sse_encode(self.timestamp, serializer); + ::sse_encode(self.expiry, serializer); + >::sse_encode(self.routing_hints, serializer); + >::sse_encode(self.payment_secret, serializer); + ::sse_encode(self.min_final_cltv_expiry_delta, serializer); + } +} + +impl SseEncode for crate::models::LnPaymentDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment_hash, serializer); + ::sse_encode(self.label, serializer); + ::sse_encode(self.destination_pubkey, serializer); + ::sse_encode(self.payment_preimage, serializer); + ::sse_encode(self.keysend, serializer); + ::sse_encode(self.bolt11, serializer); + >::sse_encode(self.open_channel_bolt11, serializer); + >::sse_encode( + self.lnurl_success_action, + serializer, + ); + >::sse_encode(self.lnurl_pay_domain, serializer); + >::sse_encode(self.ln_address, serializer); + >::sse_encode(self.lnurl_metadata, serializer); + >::sse_encode(self.lnurl_withdraw_endpoint, serializer); + >::sse_encode(self.swap_info, serializer); + >::sse_encode(self.reverse_swap_info, serializer); + >::sse_encode(self.pending_expiration_block, serializer); + } +} + +impl SseEncode for crate::input_parser::LnUrlAuthRequestData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.k1, serializer); + >::sse_encode(self.action, serializer); + ::sse_encode(self.domain, serializer); + ::sse_encode(self.url, serializer); + } +} + +impl SseEncode for crate::models::LnUrlCallbackStatus { + // 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::models::LnUrlCallbackStatus::Ok => { + ::sse_encode(0, serializer); + } + crate::models::LnUrlCallbackStatus::ErrorStatus { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::input_parser::LnUrlErrorData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.reason, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::LnUrlPayErrorData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment_hash, serializer); + ::sse_encode(self.reason, serializer); + } +} + +impl SseEncode for crate::models::LnUrlPayRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.data, serializer); + ::sse_encode(self.amount_msat, serializer); + >::sse_encode(self.comment, serializer); + >::sse_encode(self.payment_label, serializer); + } +} + +impl SseEncode for crate::input_parser::LnUrlPayRequestData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.callback, serializer); + ::sse_encode(self.min_sendable, serializer); + ::sse_encode(self.max_sendable, serializer); + ::sse_encode(self.metadata_str, serializer); + ::sse_encode(self.comment_allowed, serializer); + ::sse_encode(self.domain, serializer); + ::sse_encode(self.allows_nostr, serializer); + >::sse_encode(self.nostr_pubkey, serializer); + >::sse_encode(self.ln_address, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::LnUrlPayResult { + // 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::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { data } => { + ::sse_encode(0, serializer); + ::sse_encode(data, serializer); + } + crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + crate::lnurl::pay::model::LnUrlPayResult::PayError { data } => { + ::sse_encode(2, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::lnurl::pay::model::LnUrlPaySuccessData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment, serializer); + >::sse_encode( + self.success_action, + serializer, + ); + } +} + +impl SseEncode for crate::models::LnUrlWithdrawRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.data, serializer); + ::sse_encode(self.amount_msat, serializer); + >::sse_encode(self.description, serializer); + } +} + +impl SseEncode for crate::input_parser::LnUrlWithdrawRequestData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.callback, serializer); + ::sse_encode(self.k1, serializer); + ::sse_encode(self.default_description, serializer); + ::sse_encode(self.min_withdrawable, serializer); + ::sse_encode(self.max_withdrawable, serializer); + } +} + +impl SseEncode for crate::models::LnUrlWithdrawResult { + // 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::models::LnUrlWithdrawResult::Ok { data } => { + ::sse_encode(0, serializer); + ::sse_encode(data, serializer); + } + crate::models::LnUrlWithdrawResult::ErrorStatus { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::models::LnUrlWithdrawSuccessData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.invoice, serializer); + } +} + +impl SseEncode for crate::fiat::LocaleOverrides { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.locale, serializer); + >::sse_encode(self.spacing, serializer); + ::sse_encode(self.symbol, serializer); + } +} + +impl SseEncode for crate::fiat::LocalizedName { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.locale, serializer); + ::sse_encode(self.name, serializer); + } +} + +impl SseEncode for crate::models::LogEntry { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.line, serializer); + ::sse_encode(self.level, serializer); + } +} + +impl SseEncode for crate::lsp::LspInformation { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + ::sse_encode(self.name, serializer); + ::sse_encode(self.widget_url, serializer); + ::sse_encode(self.pubkey, serializer); + ::sse_encode(self.host, serializer); + ::sse_encode(self.base_fee_msat, serializer); + ::sse_encode(self.fee_rate, serializer); + ::sse_encode(self.time_lock_delta, serializer); + ::sse_encode(self.min_htlc_msat, serializer); + >::sse_encode(self.lsp_pubkey, serializer); + ::sse_encode(self.opening_fee_params_list, serializer); + } +} + +impl SseEncode for crate::models::MaxReverseSwapAmountResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.total_sat, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::MessageSuccessActionData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.message, serializer); + } +} + +impl SseEncode for crate::models::MetadataFilter { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.json_path, serializer); + ::sse_encode(self.json_value, serializer); + } +} + +impl SseEncode for crate::models::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::models::Network::Bitcoin => 0, + crate::models::Network::Testnet => 1, + crate::models::Network::Signet => 2, + crate::models::Network::Regtest => 3, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::NodeConfig { + // 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::models::NodeConfig::Greenlight { config } => { + ::sse_encode(0, serializer); + ::sse_encode(config, serializer); + } + } + } +} + +impl SseEncode for crate::models::NodeCredentials { + // 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::models::NodeCredentials::Greenlight { credentials } => { + ::sse_encode(0, serializer); + ::sse_encode(credentials, serializer); + } + } + } +} + +impl SseEncode for crate::models::NodeState { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + ::sse_encode(self.block_height, serializer); + ::sse_encode(self.channels_balance_msat, serializer); + ::sse_encode(self.onchain_balance_msat, serializer); + ::sse_encode(self.pending_onchain_balance_msat, serializer); + >::sse_encode(self.utxos, serializer); + ::sse_encode(self.max_payable_msat, serializer); + ::sse_encode(self.max_receivable_msat, serializer); + ::sse_encode(self.max_single_payment_amount_msat, serializer); + ::sse_encode(self.max_chan_reserve_msats, serializer); + >::sse_encode(self.connected_peers, serializer); + ::sse_encode(self.inbound_liquidity_msats, serializer); + } +} + +impl SseEncode for crate::models::OnchainPaymentLimitsResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.min_sat, serializer); + ::sse_encode(self.max_sat, serializer); + } +} + +impl SseEncode for crate::models::OpenChannelFeeRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.amount_msat, serializer); + >::sse_encode(self.expiry, serializer); + } +} + +impl SseEncode for crate::models::OpenChannelFeeResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.fee_msat, serializer); + ::sse_encode(self.fee_params, serializer); + } +} + +impl SseEncode for crate::models::OpeningFeeParams { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.min_msat, serializer); + ::sse_encode(self.proportional, serializer); + ::sse_encode(self.valid_until, serializer); + ::sse_encode(self.max_idle_time, serializer); + ::sse_encode(self.max_client_to_self_delay, serializer); + ::sse_encode(self.promise, serializer); + } +} + +impl SseEncode for crate::models::OpeningFeeParamsMenu { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.values, serializer); + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + ::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for Option> { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.is_some(), serializer); + if let Some(value) = self { + >::sse_encode(value, serializer); + } + } +} + +impl SseEncode for crate::models::PayOnchainRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.recipient_address, serializer); + ::sse_encode(self.prepare_res, serializer); + } +} + +impl SseEncode for crate::models::PayOnchainResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.reverse_swap_info, serializer); + } +} + +impl SseEncode for crate::models::Payment { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + ::sse_encode(self.payment_type, serializer); + ::sse_encode(self.payment_time, serializer); + ::sse_encode(self.amount_msat, serializer); + ::sse_encode(self.fee_msat, serializer); + ::sse_encode(self.status, serializer); + >::sse_encode(self.error, serializer); + >::sse_encode(self.description, serializer); + ::sse_encode(self.details, serializer); + >::sse_encode(self.metadata, serializer); + } +} + +impl SseEncode for crate::models::PaymentDetails { + // 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::models::PaymentDetails::Ln { data } => { + ::sse_encode(0, serializer); + ::sse_encode(data, serializer); + } + crate::models::PaymentDetails::ClosedChannel { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::breez_services::PaymentFailedData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.error, serializer); + ::sse_encode(self.node_id, serializer); + >::sse_encode(self.invoice, serializer); + } +} + +impl SseEncode for crate::models::PaymentStatus { + // 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::models::PaymentStatus::Pending => 0, + crate::models::PaymentStatus::Complete => 1, + crate::models::PaymentStatus::Failed => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::PaymentType { + // 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::models::PaymentType::Sent => 0, + crate::models::PaymentType::Received => 1, + crate::models::PaymentType::ClosedChannel => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::PaymentTypeFilter { + // 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::models::PaymentTypeFilter::Sent => 0, + crate::models::PaymentTypeFilter::Received => 1, + crate::models::PaymentTypeFilter::ClosedChannel => 2, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::PrepareOnchainPaymentRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.amount_sat, serializer); + ::sse_encode(self.amount_type, serializer); + ::sse_encode(self.claim_tx_feerate, serializer); + } +} + +impl SseEncode for crate::models::PrepareOnchainPaymentResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.fees_hash, serializer); + ::sse_encode(self.fees_percentage, serializer); + ::sse_encode(self.fees_lockup, serializer); + ::sse_encode(self.fees_claim, serializer); + ::sse_encode(self.sender_amount_sat, serializer); + ::sse_encode(self.recipient_amount_sat, serializer); + ::sse_encode(self.total_fees, serializer); + } +} + +impl SseEncode for crate::models::PrepareRedeemOnchainFundsRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.to_address, serializer); + ::sse_encode(self.sat_per_vbyte, serializer); + } +} + +impl SseEncode for crate::models::PrepareRedeemOnchainFundsResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.tx_weight, serializer); + ::sse_encode(self.tx_fee_sat, serializer); + } +} + +impl SseEncode for crate::models::PrepareRefundRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.swap_address, serializer); + ::sse_encode(self.to_address, serializer); + ::sse_encode(self.sat_per_vbyte, serializer); + } +} + +impl SseEncode for crate::models::PrepareRefundResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.refund_tx_weight, serializer); + ::sse_encode(self.refund_tx_fee_sat, serializer); + } +} + +impl SseEncode for crate::fiat::Rate { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.coin, serializer); + ::sse_encode(self.value, serializer); + } +} + +impl SseEncode for crate::models::ReceiveOnchainRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.opening_fee_params, serializer); + } +} + +impl SseEncode for crate::models::ReceivePaymentRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.amount_msat, serializer); + ::sse_encode(self.description, serializer); + >>::sse_encode(self.preimage, serializer); + >::sse_encode(self.opening_fee_params, serializer); + >::sse_encode(self.use_description_hash, serializer); + >::sse_encode(self.expiry, serializer); + >::sse_encode(self.cltv, serializer); + } +} + +impl SseEncode for crate::models::ReceivePaymentResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.ln_invoice, serializer); + >::sse_encode(self.opening_fee_params, serializer); + >::sse_encode(self.opening_fee_msat, serializer); + } +} + +impl SseEncode for crate::chain::RecommendedFees { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.fastest_fee, serializer); + ::sse_encode(self.half_hour_fee, serializer); + ::sse_encode(self.hour_fee, serializer); + ::sse_encode(self.economy_fee, serializer); + ::sse_encode(self.minimum_fee, serializer); + } +} + +impl SseEncode for crate::models::RedeemOnchainFundsRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.to_address, serializer); + ::sse_encode(self.sat_per_vbyte, serializer); + } +} + +impl SseEncode for crate::models::RedeemOnchainFundsResponse { + // Codec=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); + } +} + +impl SseEncode for crate::models::RefundRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.swap_address, serializer); + ::sse_encode(self.to_address, serializer); + ::sse_encode(self.sat_per_vbyte, serializer); + } +} + +impl SseEncode for crate::models::RefundResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.refund_tx_id, serializer); + } +} + +impl SseEncode for crate::models::ReportIssueRequest { + // 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::models::ReportIssueRequest::PaymentFailure { data } => { + ::sse_encode(0, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::models::ReportPaymentFailureDetails { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment_hash, serializer); + >::sse_encode(self.comment, serializer); + } +} + +impl SseEncode for crate::models::ReverseSwapFeesRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.send_amount_sat, serializer); + >::sse_encode(self.claim_tx_feerate, serializer); + } +} + +impl SseEncode for crate::models::ReverseSwapInfo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.id, serializer); + ::sse_encode(self.claim_pubkey, serializer); + >::sse_encode(self.lockup_txid, serializer); + >::sse_encode(self.claim_txid, serializer); + ::sse_encode(self.onchain_amount_sat, serializer); + ::sse_encode(self.status, serializer); + } +} + +impl SseEncode for crate::models::ReverseSwapPairInfo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.min, serializer); + ::sse_encode(self.max, serializer); + ::sse_encode(self.fees_hash, serializer); + ::sse_encode(self.fees_percentage, serializer); + ::sse_encode(self.fees_lockup, serializer); + ::sse_encode(self.fees_claim, serializer); + >::sse_encode(self.total_fees, serializer); + } +} + +impl SseEncode for crate::models::ReverseSwapStatus { + // 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::models::ReverseSwapStatus::Initial => 0, + crate::models::ReverseSwapStatus::InProgress => 1, + crate::models::ReverseSwapStatus::Cancelled => 2, + crate::models::ReverseSwapStatus::CompletedSeen => 3, + crate::models::ReverseSwapStatus::CompletedConfirmed => 4, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::invoice::RouteHint { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.hops, serializer); + } +} + +impl SseEncode for crate::invoice::RouteHintHop { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.src_node_id, serializer); + ::sse_encode(self.short_channel_id, serializer); + ::sse_encode(self.fees_base_msat, serializer); + ::sse_encode(self.fees_proportional_millionths, serializer); + ::sse_encode(self.cltv_expiry_delta, serializer); + >::sse_encode(self.htlc_minimum_msat, serializer); + >::sse_encode(self.htlc_maximum_msat, serializer); + } +} + +impl SseEncode for crate::models::SendOnchainRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.amount_sat, serializer); + ::sse_encode(self.onchain_recipient_address, serializer); + ::sse_encode(self.pair_hash, serializer); + ::sse_encode(self.sat_per_vbyte, serializer); + } +} + +impl SseEncode for crate::models::SendOnchainResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.reverse_swap_info, serializer); + } +} + +impl SseEncode for crate::models::SendPaymentRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.bolt11, serializer); + >::sse_encode(self.amount_msat, serializer); + >::sse_encode(self.label, serializer); + } +} + +impl SseEncode for crate::models::SendPaymentResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment, serializer); + } +} + +impl SseEncode for crate::models::SendSpontaneousPaymentRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.node_id, serializer); + ::sse_encode(self.amount_msat, serializer); + >>::sse_encode(self.extra_tlvs, serializer); + >::sse_encode(self.label, serializer); + } +} + +impl SseEncode for crate::models::ServiceHealthCheckResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.status, serializer); + } +} + +impl SseEncode for crate::breez_services::SignMessageRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.message, serializer); + } +} + +impl SseEncode for crate::breez_services::SignMessageResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.signature, serializer); + } +} + +impl SseEncode for crate::models::StaticBackupRequest { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.working_dir, serializer); + } +} + +impl SseEncode for crate::models::StaticBackupResponse { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(self.backup, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::SuccessActionProcessed { + // 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::lnurl::pay::model::SuccessActionProcessed::Aes { result } => { + ::sse_encode(0, serializer); + ::sse_encode( + result, serializer, + ); + } + crate::lnurl::pay::model::SuccessActionProcessed::Message { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + crate::lnurl::pay::model::SuccessActionProcessed::Url { data } => { + ::sse_encode(2, serializer); + ::sse_encode(data, serializer); + } + } + } +} + +impl SseEncode for crate::models::SwapAmountType { + // 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::models::SwapAmountType::Send => 0, + crate::models::SwapAmountType::Receive => 1, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::models::SwapInfo { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.bitcoin_address, serializer); + ::sse_encode(self.created_at, serializer); + ::sse_encode(self.lock_height, serializer); + >::sse_encode(self.payment_hash, serializer); + >::sse_encode(self.preimage, serializer); + >::sse_encode(self.private_key, serializer); + >::sse_encode(self.public_key, serializer); + >::sse_encode(self.swapper_public_key, serializer); + >::sse_encode(self.script, serializer); + >::sse_encode(self.bolt11, serializer); + ::sse_encode(self.paid_msat, serializer); + ::sse_encode(self.total_incoming_txs, serializer); + ::sse_encode(self.confirmed_sats, serializer); + ::sse_encode(self.unconfirmed_sats, serializer); + ::sse_encode(self.status, serializer); + >::sse_encode(self.refund_tx_ids, serializer); + >::sse_encode(self.unconfirmed_tx_ids, serializer); + >::sse_encode(self.confirmed_tx_ids, serializer); + ::sse_encode(self.min_allowed_deposit, serializer); + ::sse_encode(self.max_allowed_deposit, serializer); + ::sse_encode(self.max_swapper_payable, serializer); + >::sse_encode(self.last_redeem_error, serializer); + >::sse_encode( + self.channel_opening_fees, + serializer, + ); + >::sse_encode(self.confirmed_at, serializer); + } +} + +impl SseEncode for crate::models::SwapStatus { + // 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::models::SwapStatus::Initial => 0, + crate::models::SwapStatus::WaitingConfirmation => 1, + crate::models::SwapStatus::Redeemable => 2, + crate::models::SwapStatus::Redeemed => 3, + crate::models::SwapStatus::Refundable => 4, + crate::models::SwapStatus::Completed => 5, + _ => { + unimplemented!(""); + } + }, + serializer, + ); + } +} + +impl SseEncode for crate::fiat::Symbol { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.grapheme, serializer); + >::sse_encode(self.template, serializer); + >::sse_encode(self.rtl, serializer); + >::sse_encode(self.position, serializer); + } +} + +impl SseEncode for crate::models::TlvEntry { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.field_number, serializer); + >::sse_encode(self.value, serializer); + } +} + +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 crate::models::UnspentTransactionOutput { + // Codec=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.outnum, serializer); + ::sse_encode(self.amount_millisatoshi, serializer); + ::sse_encode(self.address, serializer); + ::sse_encode(self.reserved, serializer); + } +} + +impl SseEncode for crate::lnurl::pay::model::UrlSuccessActionData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.description, serializer); + ::sse_encode(self.url, serializer); + } +} + +#[cfg(not(target_family = "wasm"))] +#[path = "frb_generated.io.rs"] +mod io; +#[cfg(not(target_family = "wasm"))] +pub use io::*; diff --git a/libs/sdk-core/src/frb_generated.web.rs b/libs/sdk-core/src/frb_generated.web.rs new file mode 100644 index 000000000..f6d4efaf3 --- /dev/null +++ b/libs/sdk-core/src/frb_generated.web.rs @@ -0,0 +1,2838 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// Section: imports + +use super::*; +use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; +use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::for_generated::wasm_bindgen; +use flutter_rust_bridge::for_generated::wasm_bindgen::prelude::*; +use flutter_rust_bridge::{Handler, IntoIntoDart}; + +// Section: boilerplate + +flutter_rust_bridge::frb_generated_boilerplate_web!(); + +// Section: dart2rust + +impl CstDecode for String { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() + } +} +impl + CstDecode< + StreamSink, + > for String +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink + { + StreamSink::deserialize(self) + } +} +impl CstDecode> + for String +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink { + StreamSink::deserialize(self) + } +} +impl CstDecode for String { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + self + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + description: self_.get(0).cst_decode(), + plaintext: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { + data: self_.get(1).cst_decode(), + }, + 1 => crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { + reason: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::breez_services::BackupFailedData { + error: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BackupStatus { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::BackupStatus { + backed_up: self_.get(0).cst_decode(), + last_backup_time: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::input_parser::BitcoinAddressData { + address: self_.get(0).cst_decode(), + network: self_.get(1).cst_decode(), + amount_sat: self_.get(2).cst_decode(), + label: self_.get(3).cst_decode(), + message: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::breez_services::BreezEvent::NewBlock { + block: self_.get(1).cst_decode(), + }, + 1 => crate::breez_services::BreezEvent::InvoicePaid { + details: self_.get(1).cst_decode(), + }, + 2 => crate::breez_services::BreezEvent::Synced, + 3 => crate::breez_services::BreezEvent::PaymentSucceed { + details: self_.get(1).cst_decode(), + }, + 4 => crate::breez_services::BreezEvent::PaymentFailed { + details: self_.get(1).cst_decode(), + }, + 5 => crate::breez_services::BreezEvent::BackupStarted, + 6 => crate::breez_services::BreezEvent::BackupSucceeded, + 7 => crate::breez_services::BreezEvent::BackupFailed { + details: self_.get(1).cst_decode(), + }, + 8 => crate::breez_services::BreezEvent::SwapUpdated { + details: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::BuyBitcoinRequest { + provider: self_.get(0).cst_decode(), + opening_fee_params: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::BuyBitcoinResponse { + url: self_.get(0).cst_decode(), + opening_fee_params: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::breez_services::CheckMessageRequest { + message: self_.get(0).cst_decode(), + pubkey: self_.get(1).cst_decode(), + signature: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::breez_services::CheckMessageResponse { + is_valid: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::models::ClosedChannelPaymentDetails { + state: self_.get(0).cst_decode(), + funding_txid: self_.get(1).cst_decode(), + short_channel_id: self_.get(2).cst_decode(), + closing_txid: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Config { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 11, + "Expected 11 elements, got {}", + self_.length() + ); + crate::models::Config { + breezserver: self_.get(0).cst_decode(), + chainnotifier_url: self_.get(1).cst_decode(), + mempoolspace_url: self_.get(2).cst_decode(), + working_dir: self_.get(3).cst_decode(), + network: self_.get(4).cst_decode(), + payment_timeout_sec: self_.get(5).cst_decode(), + default_lsp_id: self_.get(6).cst_decode(), + api_key: self_.get(7).cst_decode(), + maxfee_percent: self_.get(8).cst_decode(), + exemptfee_msat: self_.get(9).cst_decode(), + node_config: self_.get(10).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::ConfigureNodeRequest { + close_to_address: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::ConnectRequest { + config: self_.get(0).cst_decode(), + seed: self_.get(1).cst_decode(), + restore_only: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::CurrencyInfo { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::fiat::CurrencyInfo { + name: self_.get(0).cst_decode(), + fraction_size: self_.get(1).cst_decode(), + spacing: self_.get(2).cst_decode(), + symbol: self_.get(3).cst_decode(), + uniq_symbol: self_.get(4).cst_decode(), + localized_name: self_.get(5).cst_decode(), + locale_overrides: self_.get(6).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::FiatCurrency { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::fiat::FiatCurrency { + id: self_.get(0).cst_decode(), + info: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::GreenlightCredentials { + device_key: self_.get(0).cst_decode(), + device_cert: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::GreenlightNodeConfig { + partner_credentials: self_.get(0).cst_decode(), + invite_code: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::InputType { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::input_parser::InputType::BitcoinAddress { + address: self_.get(1).cst_decode(), + }, + 1 => crate::input_parser::InputType::Bolt11 { + invoice: self_.get(1).cst_decode(), + }, + 2 => crate::input_parser::InputType::NodeId { + node_id: self_.get(1).cst_decode(), + }, + 3 => crate::input_parser::InputType::Url { + url: self_.get(1).cst_decode(), + }, + 4 => crate::input_parser::InputType::LnUrlPay { + data: self_.get(1).cst_decode(), + }, + 5 => crate::input_parser::InputType::LnUrlWithdraw { + data: self_.get(1).cst_decode(), + }, + 6 => crate::input_parser::InputType::LnUrlAuth { + data: self_.get(1).cst_decode(), + }, + 7 => crate::input_parser::InputType::LnUrlError { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::breez_services::InvoicePaidDetails { + payment_hash: self_.get(0).cst_decode(), + bolt11: self_.get(1).cst_decode(), + payment: self_.get(2).cst_decode(), + } + } +} +impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::models::ListPaymentsRequest { + filters: self_.get(0).cst_decode(), + metadata_filters: self_.get(1).cst_decode(), + from_timestamp: self_.get(2).cst_decode(), + to_timestamp: self_.get(3).cst_decode(), + include_failures: self_.get(4).cst_decode(), + offset: self_.get(5).cst_decode(), + limit: self_.get(6).cst_decode(), + } + } +} +impl CstDecode> for Box<[u8]> { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.into_vec() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.dyn_into::() + .unwrap() + .iter() + .map(CstDecode::cst_decode) + .collect() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::LNInvoice { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 12, + "Expected 12 elements, got {}", + self_.length() + ); + crate::invoice::LNInvoice { + bolt11: self_.get(0).cst_decode(), + network: self_.get(1).cst_decode(), + payee_pubkey: self_.get(2).cst_decode(), + payment_hash: self_.get(3).cst_decode(), + description: self_.get(4).cst_decode(), + description_hash: self_.get(5).cst_decode(), + amount_msat: self_.get(6).cst_decode(), + timestamp: self_.get(7).cst_decode(), + expiry: self_.get(8).cst_decode(), + routing_hints: self_.get(9).cst_decode(), + payment_secret: self_.get(10).cst_decode(), + min_final_cltv_expiry_delta: self_.get(11).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 15, + "Expected 15 elements, got {}", + self_.length() + ); + crate::models::LnPaymentDetails { + payment_hash: self_.get(0).cst_decode(), + label: self_.get(1).cst_decode(), + destination_pubkey: self_.get(2).cst_decode(), + payment_preimage: self_.get(3).cst_decode(), + keysend: self_.get(4).cst_decode(), + bolt11: self_.get(5).cst_decode(), + open_channel_bolt11: self_.get(6).cst_decode(), + lnurl_success_action: self_.get(7).cst_decode(), + lnurl_pay_domain: self_.get(8).cst_decode(), + ln_address: self_.get(9).cst_decode(), + lnurl_metadata: self_.get(10).cst_decode(), + lnurl_withdraw_endpoint: self_.get(11).cst_decode(), + swap_info: self_.get(12).cst_decode(), + reverse_swap_info: self_.get(13).cst_decode(), + pending_expiration_block: self_.get(14).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlAuthRequestData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::input_parser::LnUrlAuthRequestData { + k1: self_.get(0).cst_decode(), + action: self_.get(1).cst_decode(), + domain: self_.get(2).cst_decode(), + url: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlCallbackStatus { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::LnUrlCallbackStatus::Ok, + 1 => crate::models::LnUrlCallbackStatus::ErrorStatus { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlErrorData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::input_parser::LnUrlErrorData { + reason: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::lnurl::pay::model::LnUrlPayErrorData { + payment_hash: self_.get(0).cst_decode(), + reason: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlPayRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::models::LnUrlPayRequest { + data: self_.get(0).cst_decode(), + amount_msat: self_.get(1).cst_decode(), + comment: self_.get(2).cst_decode(), + payment_label: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlPayRequestData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 9, + "Expected 9 elements, got {}", + self_.length() + ); + crate::input_parser::LnUrlPayRequestData { + callback: self_.get(0).cst_decode(), + min_sendable: self_.get(1).cst_decode(), + max_sendable: self_.get(2).cst_decode(), + metadata_str: self_.get(3).cst_decode(), + comment_allowed: self_.get(4).cst_decode(), + domain: self_.get(5).cst_decode(), + allows_nostr: self_.get(6).cst_decode(), + nostr_pubkey: self_.get(7).cst_decode(), + ln_address: self_.get(8).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayResult { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { + data: self_.get(1).cst_decode(), + }, + 1 => crate::lnurl::pay::model::LnUrlPayResult::EndpointError { + data: self_.get(1).cst_decode(), + }, + 2 => crate::lnurl::pay::model::LnUrlPayResult::PayError { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::lnurl::pay::model::LnUrlPaySuccessData { + payment: self_.get(0).cst_decode(), + success_action: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::LnUrlWithdrawRequest { + data: self_.get(0).cst_decode(), + amount_msat: self_.get(1).cst_decode(), + description: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::input_parser::LnUrlWithdrawRequestData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::input_parser::LnUrlWithdrawRequestData { + callback: self_.get(0).cst_decode(), + k1: self_.get(1).cst_decode(), + default_description: self_.get(2).cst_decode(), + min_withdrawable: self_.get(3).cst_decode(), + max_withdrawable: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawResult { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::LnUrlWithdrawResult::Ok { + data: self_.get(1).cst_decode(), + }, + 1 => crate::models::LnUrlWithdrawResult::ErrorStatus { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnUrlWithdrawSuccessData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::LnUrlWithdrawSuccessData { + invoice: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::LocaleOverrides { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::fiat::LocaleOverrides { + locale: self_.get(0).cst_decode(), + spacing: self_.get(1).cst_decode(), + symbol: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::LocalizedName { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::fiat::LocalizedName { + locale: self_.get(0).cst_decode(), + name: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LogEntry { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::LogEntry { + line: self_.get(0).cst_decode(), + level: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 11, + "Expected 11 elements, got {}", + self_.length() + ); + crate::lsp::LspInformation { + id: self_.get(0).cst_decode(), + name: self_.get(1).cst_decode(), + widget_url: self_.get(2).cst_decode(), + pubkey: self_.get(3).cst_decode(), + host: self_.get(4).cst_decode(), + base_fee_msat: self_.get(5).cst_decode(), + fee_rate: self_.get(6).cst_decode(), + time_lock_delta: self_.get(7).cst_decode(), + min_htlc_msat: self_.get(8).cst_decode(), + lsp_pubkey: self_.get(9).cst_decode(), + opening_fee_params_list: self_.get(10).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MaxReverseSwapAmountResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::MaxReverseSwapAmountResponse { + total_sat: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::MessageSuccessActionData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::lnurl::pay::model::MessageSuccessActionData { + message: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MetadataFilter { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::MetadataFilter { + json_path: self_.get(0).cst_decode(), + json_value: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::NodeConfig::Greenlight { + config: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::NodeCredentials::Greenlight { + credentials: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeState { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 12, + "Expected 12 elements, got {}", + self_.length() + ); + crate::models::NodeState { + id: self_.get(0).cst_decode(), + block_height: self_.get(1).cst_decode(), + channels_balance_msat: self_.get(2).cst_decode(), + onchain_balance_msat: self_.get(3).cst_decode(), + pending_onchain_balance_msat: self_.get(4).cst_decode(), + utxos: self_.get(5).cst_decode(), + max_payable_msat: self_.get(6).cst_decode(), + max_receivable_msat: self_.get(7).cst_decode(), + max_single_payment_amount_msat: self_.get(8).cst_decode(), + max_chan_reserve_msats: self_.get(9).cst_decode(), + connected_peers: self_.get(10).cst_decode(), + inbound_liquidity_msats: self_.get(11).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OnchainPaymentLimitsResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::OnchainPaymentLimitsResponse { + min_sat: self_.get(0).cst_decode(), + max_sat: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::OpenChannelFeeRequest { + amount_msat: self_.get(0).cst_decode(), + expiry: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::OpenChannelFeeResponse { + fee_msat: self_.get(0).cst_decode(), + fee_params: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 6, + "Expected 6 elements, got {}", + self_.length() + ); + crate::models::OpeningFeeParams { + min_msat: self_.get(0).cst_decode(), + proportional: self_.get(1).cst_decode(), + valid_until: self_.get(2).cst_decode(), + max_idle_time: self_.get(3).cst_decode(), + max_client_to_self_delay: self_.get(4).cst_decode(), + promise: self_.get(5).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParamsMenu { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::OpeningFeeParamsMenu { + values: self_.get(0).cst_decode(), + } + } +} +impl CstDecode> for Option { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Option { + self.map(CstDecode::cst_decode) + } +} +impl CstDecode>> for Option> { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Option> { + self.map(CstDecode::cst_decode) + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::PayOnchainRequest { + recipient_address: self_.get(0).cst_decode(), + prepare_res: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::PayOnchainResponse { + reverse_swap_info: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 10, + "Expected 10 elements, got {}", + self_.length() + ); + crate::models::Payment { + id: self_.get(0).cst_decode(), + payment_type: self_.get(1).cst_decode(), + payment_time: self_.get(2).cst_decode(), + amount_msat: self_.get(3).cst_decode(), + fee_msat: self_.get(4).cst_decode(), + status: self_.get(5).cst_decode(), + error: self_.get(6).cst_decode(), + description: self_.get(7).cst_decode(), + details: self_.get(8).cst_decode(), + metadata: self_.get(9).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentDetails { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::PaymentDetails::Ln { + data: self_.get(1).cst_decode(), + }, + 1 => crate::models::PaymentDetails::ClosedChannel { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::breez_services::PaymentFailedData { + error: self_.get(0).cst_decode(), + node_id: self_.get(1).cst_decode(), + invoice: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::PrepareOnchainPaymentRequest { + amount_sat: self_.get(0).cst_decode(), + amount_type: self_.get(1).cst_decode(), + claim_tx_feerate: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::models::PrepareOnchainPaymentResponse { + fees_hash: self_.get(0).cst_decode(), + fees_percentage: self_.get(1).cst_decode(), + fees_lockup: self_.get(2).cst_decode(), + fees_claim: self_.get(3).cst_decode(), + sender_amount_sat: self_.get(4).cst_decode(), + recipient_amount_sat: self_.get(5).cst_decode(), + total_fees: self_.get(6).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::PrepareRedeemOnchainFundsRequest { + to_address: self_.get(0).cst_decode(), + sat_per_vbyte: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::PrepareRedeemOnchainFundsResponse { + tx_weight: self_.get(0).cst_decode(), + tx_fee_sat: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::PrepareRefundRequest { + swap_address: self_.get(0).cst_decode(), + to_address: self_.get(1).cst_decode(), + sat_per_vbyte: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::PrepareRefundResponse { + refund_tx_weight: self_.get(0).cst_decode(), + refund_tx_fee_sat: self_.get(1).cst_decode(), + } + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::Rate { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::fiat::Rate { + coin: self_.get(0).cst_decode(), + value: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::ReceiveOnchainRequest { + opening_fee_params: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::models::ReceivePaymentRequest { + amount_msat: self_.get(0).cst_decode(), + description: self_.get(1).cst_decode(), + preimage: self_.get(2).cst_decode(), + opening_fee_params: self_.get(3).cst_decode(), + use_description_hash: self_.get(4).cst_decode(), + expiry: self_.get(5).cst_decode(), + cltv: self_.get(6).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::ReceivePaymentResponse { + ln_invoice: self_.get(0).cst_decode(), + opening_fee_params: self_.get(1).cst_decode(), + opening_fee_msat: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::chain::RecommendedFees { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::chain::RecommendedFees { + fastest_fee: self_.get(0).cst_decode(), + half_hour_fee: self_.get(1).cst_decode(), + hour_fee: self_.get(2).cst_decode(), + economy_fee: self_.get(3).cst_decode(), + minimum_fee: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::RedeemOnchainFundsRequest { + to_address: self_.get(0).cst_decode(), + sat_per_vbyte: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::RedeemOnchainFundsResponse { + txid: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::RefundRequest { + swap_address: self_.get(0).cst_decode(), + to_address: self_.get(1).cst_decode(), + sat_per_vbyte: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::RefundResponse { + refund_tx_id: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::models::ReportIssueRequest::PaymentFailure { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::ReportPaymentFailureDetails { + payment_hash: self_.get(0).cst_decode(), + comment: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::ReverseSwapFeesRequest { + send_amount_sat: self_.get(0).cst_decode(), + claim_tx_feerate: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 6, + "Expected 6 elements, got {}", + self_.length() + ); + crate::models::ReverseSwapInfo { + id: self_.get(0).cst_decode(), + claim_pubkey: self_.get(1).cst_decode(), + lockup_txid: self_.get(2).cst_decode(), + claim_txid: self_.get(3).cst_decode(), + onchain_amount_sat: self_.get(4).cst_decode(), + status: self_.get(5).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapPairInfo { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::models::ReverseSwapPairInfo { + min: self_.get(0).cst_decode(), + max: self_.get(1).cst_decode(), + fees_hash: self_.get(2).cst_decode(), + fees_percentage: self_.get(3).cst_decode(), + fees_lockup: self_.get(4).cst_decode(), + fees_claim: self_.get(5).cst_decode(), + total_fees: self_.get(6).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::RouteHint { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::invoice::RouteHint { + hops: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::invoice::RouteHintHop { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 7, + "Expected 7 elements, got {}", + self_.length() + ); + crate::invoice::RouteHintHop { + src_node_id: self_.get(0).cst_decode(), + short_channel_id: self_.get(1).cst_decode(), + fees_base_msat: self_.get(2).cst_decode(), + fees_proportional_millionths: self_.get(3).cst_decode(), + cltv_expiry_delta: self_.get(4).cst_decode(), + htlc_minimum_msat: self_.get(5).cst_decode(), + htlc_maximum_msat: self_.get(6).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::models::SendOnchainRequest { + amount_sat: self_.get(0).cst_decode(), + onchain_recipient_address: self_.get(1).cst_decode(), + pair_hash: self_.get(2).cst_decode(), + sat_per_vbyte: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::SendOnchainResponse { + reverse_swap_info: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 3, + "Expected 3 elements, got {}", + self_.length() + ); + crate::models::SendPaymentRequest { + bolt11: self_.get(0).cst_decode(), + amount_msat: self_.get(1).cst_decode(), + label: self_.get(2).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::SendPaymentResponse { + payment: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::models::SendSpontaneousPaymentRequest { + node_id: self_.get(0).cst_decode(), + amount_msat: self_.get(1).cst_decode(), + extra_tlvs: self_.get(2).cst_decode(), + label: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ServiceHealthCheckResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::ServiceHealthCheckResponse { + status: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::breez_services::SignMessageRequest { + message: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::breez_services::SignMessageResponse { + signature: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::StaticBackupRequest { + working_dir: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupResponse { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 1, + "Expected 1 elements, got {}", + self_.length() + ); + crate::models::StaticBackupResponse { + backup: self_.get(0).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + let self_ = self.unchecked_into::(); + match self_.get(0).unchecked_into_f64() as _ { + 0 => crate::lnurl::pay::model::SuccessActionProcessed::Aes { + result: self_.get(1).cst_decode(), + }, + 1 => crate::lnurl::pay::model::SuccessActionProcessed::Message { + data: self_.get(1).cst_decode(), + }, + 2 => crate::lnurl::pay::model::SuccessActionProcessed::Url { + data: self_.get(1).cst_decode(), + }, + _ => unreachable!(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 24, + "Expected 24 elements, got {}", + self_.length() + ); + crate::models::SwapInfo { + bitcoin_address: self_.get(0).cst_decode(), + created_at: self_.get(1).cst_decode(), + lock_height: self_.get(2).cst_decode(), + payment_hash: self_.get(3).cst_decode(), + preimage: self_.get(4).cst_decode(), + private_key: self_.get(5).cst_decode(), + public_key: self_.get(6).cst_decode(), + swapper_public_key: self_.get(7).cst_decode(), + script: self_.get(8).cst_decode(), + bolt11: self_.get(9).cst_decode(), + paid_msat: self_.get(10).cst_decode(), + total_incoming_txs: self_.get(11).cst_decode(), + confirmed_sats: self_.get(12).cst_decode(), + unconfirmed_sats: self_.get(13).cst_decode(), + status: self_.get(14).cst_decode(), + refund_tx_ids: self_.get(15).cst_decode(), + unconfirmed_tx_ids: self_.get(16).cst_decode(), + confirmed_tx_ids: self_.get(17).cst_decode(), + min_allowed_deposit: self_.get(18).cst_decode(), + max_allowed_deposit: self_.get(19).cst_decode(), + max_swapper_payable: self_.get(20).cst_decode(), + last_redeem_error: self_.get(21).cst_decode(), + channel_opening_fees: self_.get(22).cst_decode(), + confirmed_at: self_.get(23).cst_decode(), + } + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::fiat::Symbol { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 4, + "Expected 4 elements, got {}", + self_.length() + ); + crate::fiat::Symbol { + grapheme: self_.get(0).cst_decode(), + template: self_.get(1).cst_decode(), + rtl: self_.get(2).cst_decode(), + position: self_.get(3).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::TlvEntry { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::models::TlvEntry { + field_number: self_.get(0).cst_decode(), + value: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::UnspentTransactionOutput { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 5, + "Expected 5 elements, got {}", + self_.length() + ); + crate::models::UnspentTransactionOutput { + txid: self_.get(0).cst_decode(), + outnum: self_.get(1).cst_decode(), + amount_millisatoshi: self_.get(2).cst_decode(), + address: self_.get(3).cst_decode(), + reserved: self_.get(4).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::model::UrlSuccessActionData { + let self_ = self + .dyn_into::() + .unwrap(); + assert_eq!( + self_.length(), + 2, + "Expected 2 elements, got {}", + self_.length() + ); + crate::lnurl::pay::model::UrlSuccessActionData { + description: self_.get(0).cst_decode(), + url: self_.get(1).cst_decode(), + } + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() + } +} +impl + CstDecode< + StreamSink, + > for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink + { + StreamSink::deserialize(self.as_string().expect("should be a string")) + } +} +impl CstDecode> + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink { + StreamSink::deserialize(self.as_string().expect("should be a string")) + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + self.as_string().expect("non-UTF-8 string, or not a string") + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + self.is_truthy() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinProvider { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ChannelState { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::EnvironmentType { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> f64 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::HealthCheckStatus { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i32 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + ::std::convert::TryInto::try_into( + self.dyn_into::() + .unwrap(), + ) + .unwrap() + } +} +impl CstDecode> for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + self.unchecked_into::() + .to_vec() + .into() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Network { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentStatus { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentType { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentTypeFilter { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapStatus { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapAmountType { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode + for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapStatus { + (self.unchecked_into_f64() as i32).cst_decode() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u16 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + self.unchecked_into_f64() as _ + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + ::std::convert::TryInto::try_into( + self.dyn_into::() + .unwrap(), + ) + .unwrap() + } +} +impl CstDecode for flutter_rust_bridge::for_generated::wasm_bindgen::JsValue { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u8 { + self.unchecked_into_f64() as _ + } +} + +#[wasm_bindgen] +pub fn wire_backup(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_backup_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_backup_status(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_backup_status_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_breez_events_stream(port_: flutter_rust_bridge::for_generated::MessagePort, s: String) { + wire_breez_events_stream_impl(port_, s) +} + +#[wasm_bindgen] +pub fn wire_breez_log_stream(port_: flutter_rust_bridge::for_generated::MessagePort, s: String) { + wire_breez_log_stream_impl(port_, s) +} + +#[wasm_bindgen] +pub fn wire_buy_bitcoin( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_buy_bitcoin_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_check_message( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_check_message_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_close_lsp_channels(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_close_lsp_channels_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_configure_node( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_configure_node_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_connect( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_connect_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_connect_lsp(port_: flutter_rust_bridge::for_generated::MessagePort, lsp_id: String) { + wire_connect_lsp_impl(port_, lsp_id) +} + +#[wasm_bindgen] +pub fn wire_default_config( + port_: flutter_rust_bridge::for_generated::MessagePort, + env_type: i32, + api_key: String, + node_config: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_default_config_impl(port_, env_type, api_key, node_config) +} + +#[wasm_bindgen] +pub fn wire_disconnect(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_disconnect_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_execute_command( + port_: flutter_rust_bridge::for_generated::MessagePort, + command: String, +) { + wire_execute_command_impl(port_, command) +} + +#[wasm_bindgen] +pub fn wire_fetch_fiat_rates(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_fetch_fiat_rates_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_fetch_lsp_info(port_: flutter_rust_bridge::for_generated::MessagePort, id: String) { + wire_fetch_lsp_info_impl(port_, id) +} + +#[wasm_bindgen] +pub fn wire_fetch_reverse_swap_fees( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_fetch_reverse_swap_fees_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_generate_diagnostic_data(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_generate_diagnostic_data_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_in_progress_onchain_payments(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_in_progress_onchain_payments_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_in_progress_reverse_swaps(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_in_progress_reverse_swaps_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_in_progress_swap(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_in_progress_swap_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_is_initialized(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_is_initialized_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_list_fiat_currencies(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_list_fiat_currencies_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_list_lsps(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_list_lsps_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_list_payments( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_list_payments_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_list_refundables(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_list_refundables_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_lnurl_auth( + port_: flutter_rust_bridge::for_generated::MessagePort, + req_data: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_lnurl_auth_impl(port_, req_data) +} + +#[wasm_bindgen] +pub fn wire_lnurl_pay( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_lnurl_pay_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_lnurl_withdraw( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_lnurl_withdraw_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_lsp_id(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_lsp_id_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_lsp_info(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_lsp_info_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_max_reverse_swap_amount(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_max_reverse_swap_amount_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_mnemonic_to_seed( + port_: flutter_rust_bridge::for_generated::MessagePort, + phrase: String, +) { + wire_mnemonic_to_seed_impl(port_, phrase) +} + +#[wasm_bindgen] +pub fn wire_node_credentials(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_node_credentials_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_node_info(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_node_info_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_onchain_payment_limits(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_onchain_payment_limits_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_open_channel_fee( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_open_channel_fee_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_parse_input(port_: flutter_rust_bridge::for_generated::MessagePort, input: String) { + wire_parse_input_impl(port_, input) +} + +#[wasm_bindgen] +pub fn wire_parse_invoice(port_: flutter_rust_bridge::for_generated::MessagePort, invoice: String) { + wire_parse_invoice_impl(port_, invoice) +} + +#[wasm_bindgen] +pub fn wire_pay_onchain( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_pay_onchain_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_payment_by_hash(port_: flutter_rust_bridge::for_generated::MessagePort, hash: String) { + wire_payment_by_hash_impl(port_, hash) +} + +#[wasm_bindgen] +pub fn wire_prepare_onchain_payment( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_prepare_onchain_payment_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_prepare_redeem_onchain_funds( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_prepare_redeem_onchain_funds_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_prepare_refund( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_prepare_refund_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_receive_onchain( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_receive_onchain_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_receive_payment( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_receive_payment_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_recommended_fees(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_recommended_fees_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_redeem_onchain_funds( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_redeem_onchain_funds_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_redeem_swap( + port_: flutter_rust_bridge::for_generated::MessagePort, + swap_address: String, +) { + wire_redeem_swap_impl(port_, swap_address) +} + +#[wasm_bindgen] +pub fn wire_refund( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_refund_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_register_webhook( + port_: flutter_rust_bridge::for_generated::MessagePort, + webhook_url: String, +) { + wire_register_webhook_impl(port_, webhook_url) +} + +#[wasm_bindgen] +pub fn wire_report_issue( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_report_issue_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_rescan_swaps(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_rescan_swaps_impl(port_) +} + +#[wasm_bindgen] +pub fn wire_send_onchain( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_send_onchain_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_send_payment( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_send_payment_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_send_spontaneous_payment( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_send_spontaneous_payment_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_service_health_check( + port_: flutter_rust_bridge::for_generated::MessagePort, + api_key: String, +) { + wire_service_health_check_impl(port_, api_key) +} + +#[wasm_bindgen] +pub fn wire_set_payment_metadata( + port_: flutter_rust_bridge::for_generated::MessagePort, + hash: String, + metadata: String, +) { + wire_set_payment_metadata_impl(port_, hash, metadata) +} + +#[wasm_bindgen] +pub fn wire_sign_message( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_sign_message_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_static_backup( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: flutter_rust_bridge::for_generated::wasm_bindgen::JsValue, +) { + wire_static_backup_impl(port_, req) +} + +#[wasm_bindgen] +pub fn wire_sync(port_: flutter_rust_bridge::for_generated::MessagePort) { + wire_sync_impl(port_) +} diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index ef4583bb0..3d3906ae7 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -156,7 +156,7 @@ //! Join this [telegram group](https://t.me/breezsdk). #[allow(clippy::all)] -mod bridge_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ +mod frb_generated; /* AUTO INJECTED BY flutter_rust_bridge. This line may not be accurate, and you can change it according to your needs. */ #[macro_use] extern crate log; diff --git a/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m index cbd12c2ae..0841418dc 100644 --- a/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m +++ b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m @@ -1,4 +1,5 @@ #import "BreezSDKPlugin.h" +#import "frb_generated.h" #if __has_include() #import #else diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h new file mode 100644 index 000000000..d239b28b6 --- /dev/null +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -0,0 +1,1329 @@ +#include +#include +#include +// EXTRA BEGIN +typedef struct DartCObject *WireSyncRust2DartDco; +typedef struct WireSyncRust2DartSse { + uint8_t *ptr; + int32_t len; +} WireSyncRust2DartSse; + +typedef int64_t DartPort; +typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); +void store_dart_post_cobject(DartPostCObjectFnType ptr); +// EXTRA END +typedef struct _Dart_Handle* Dart_Handle; + +#define SWAP_PAYMENT_FEE_EXPIRY_SECONDS (((60 * 60) * 24) * 2) + +#define INVOICE_PAYMENT_FEE_EXPIRY_SECONDS (60 * 60) + +#define ESTIMATED_CLAIM_TX_VSIZE 138 + +#define ESTIMATED_LOCKUP_TX_VSIZE 153 + +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_opening_fee_params { + uint64_t min_msat; + uint32_t proportional; + struct wire_cst_list_prim_u_8_strict *valid_until; + uint32_t max_idle_time; + uint32_t max_client_to_self_delay; + struct wire_cst_list_prim_u_8_strict *promise; +} wire_cst_opening_fee_params; + +typedef struct wire_cst_buy_bitcoin_request { + int32_t provider; + struct wire_cst_opening_fee_params *opening_fee_params; +} wire_cst_buy_bitcoin_request; + +typedef struct wire_cst_check_message_request { + struct wire_cst_list_prim_u_8_strict *message; + struct wire_cst_list_prim_u_8_strict *pubkey; + struct wire_cst_list_prim_u_8_strict *signature; +} wire_cst_check_message_request; + +typedef struct wire_cst_configure_node_request { + struct wire_cst_list_prim_u_8_strict *close_to_address; +} wire_cst_configure_node_request; + +typedef struct wire_cst_greenlight_credentials { + struct wire_cst_list_prim_u_8_strict *device_key; + struct wire_cst_list_prim_u_8_strict *device_cert; +} wire_cst_greenlight_credentials; + +typedef struct wire_cst_greenlight_node_config { + struct wire_cst_greenlight_credentials *partner_credentials; + struct wire_cst_list_prim_u_8_strict *invite_code; +} wire_cst_greenlight_node_config; + +typedef struct wire_cst_NodeConfig_Greenlight { + struct wire_cst_greenlight_node_config *config; +} wire_cst_NodeConfig_Greenlight; + +typedef union NodeConfigKind { + struct wire_cst_NodeConfig_Greenlight Greenlight; +} NodeConfigKind; + +typedef struct wire_cst_node_config { + int32_t tag; + union NodeConfigKind kind; +} wire_cst_node_config; + +typedef struct wire_cst_config { + struct wire_cst_list_prim_u_8_strict *breezserver; + struct wire_cst_list_prim_u_8_strict *chainnotifier_url; + struct wire_cst_list_prim_u_8_strict *mempoolspace_url; + struct wire_cst_list_prim_u_8_strict *working_dir; + int32_t network; + uint32_t payment_timeout_sec; + struct wire_cst_list_prim_u_8_strict *default_lsp_id; + struct wire_cst_list_prim_u_8_strict *api_key; + double maxfee_percent; + uint64_t exemptfee_msat; + struct wire_cst_node_config node_config; +} wire_cst_config; + +typedef struct wire_cst_connect_request { + struct wire_cst_config config; + struct wire_cst_list_prim_u_8_strict *seed; + bool *restore_only; +} wire_cst_connect_request; + +typedef struct wire_cst_reverse_swap_fees_request { + uint64_t *send_amount_sat; + uint32_t *claim_tx_feerate; +} wire_cst_reverse_swap_fees_request; + +typedef struct wire_cst_list_payment_type_filter { + int32_t *ptr; + int32_t len; +} wire_cst_list_payment_type_filter; + +typedef struct wire_cst_metadata_filter { + struct wire_cst_list_prim_u_8_strict *json_path; + struct wire_cst_list_prim_u_8_strict *json_value; +} wire_cst_metadata_filter; + +typedef struct wire_cst_list_metadata_filter { + struct wire_cst_metadata_filter *ptr; + int32_t len; +} wire_cst_list_metadata_filter; + +typedef struct wire_cst_list_payments_request { + struct wire_cst_list_payment_type_filter *filters; + struct wire_cst_list_metadata_filter *metadata_filters; + int64_t *from_timestamp; + int64_t *to_timestamp; + bool *include_failures; + uint32_t *offset; + uint32_t *limit; +} wire_cst_list_payments_request; + +typedef struct wire_cst_ln_url_auth_request_data { + struct wire_cst_list_prim_u_8_strict *k1; + struct wire_cst_list_prim_u_8_strict *action; + struct wire_cst_list_prim_u_8_strict *domain; + struct wire_cst_list_prim_u_8_strict *url; +} wire_cst_ln_url_auth_request_data; + +typedef struct wire_cst_ln_url_pay_request_data { + struct wire_cst_list_prim_u_8_strict *callback; + uint64_t min_sendable; + uint64_t max_sendable; + struct wire_cst_list_prim_u_8_strict *metadata_str; + uint16_t comment_allowed; + struct wire_cst_list_prim_u_8_strict *domain; + bool allows_nostr; + struct wire_cst_list_prim_u_8_strict *nostr_pubkey; + struct wire_cst_list_prim_u_8_strict *ln_address; +} wire_cst_ln_url_pay_request_data; + +typedef struct wire_cst_ln_url_pay_request { + struct wire_cst_ln_url_pay_request_data data; + uint64_t amount_msat; + struct wire_cst_list_prim_u_8_strict *comment; + struct wire_cst_list_prim_u_8_strict *payment_label; +} wire_cst_ln_url_pay_request; + +typedef struct wire_cst_ln_url_withdraw_request_data { + struct wire_cst_list_prim_u_8_strict *callback; + struct wire_cst_list_prim_u_8_strict *k1; + struct wire_cst_list_prim_u_8_strict *default_description; + uint64_t min_withdrawable; + uint64_t max_withdrawable; +} wire_cst_ln_url_withdraw_request_data; + +typedef struct wire_cst_ln_url_withdraw_request { + struct wire_cst_ln_url_withdraw_request_data data; + uint64_t amount_msat; + struct wire_cst_list_prim_u_8_strict *description; +} wire_cst_ln_url_withdraw_request; + +typedef struct wire_cst_open_channel_fee_request { + uint64_t *amount_msat; + uint32_t *expiry; +} wire_cst_open_channel_fee_request; + +typedef struct wire_cst_prepare_onchain_payment_response { + struct wire_cst_list_prim_u_8_strict *fees_hash; + double fees_percentage; + uint64_t fees_lockup; + uint64_t fees_claim; + uint64_t sender_amount_sat; + uint64_t recipient_amount_sat; + uint64_t total_fees; +} wire_cst_prepare_onchain_payment_response; + +typedef struct wire_cst_pay_onchain_request { + struct wire_cst_list_prim_u_8_strict *recipient_address; + struct wire_cst_prepare_onchain_payment_response prepare_res; +} wire_cst_pay_onchain_request; + +typedef struct wire_cst_prepare_onchain_payment_request { + uint64_t amount_sat; + int32_t amount_type; + uint32_t claim_tx_feerate; +} wire_cst_prepare_onchain_payment_request; + +typedef struct wire_cst_prepare_redeem_onchain_funds_request { + struct wire_cst_list_prim_u_8_strict *to_address; + uint32_t sat_per_vbyte; +} wire_cst_prepare_redeem_onchain_funds_request; + +typedef struct wire_cst_prepare_refund_request { + struct wire_cst_list_prim_u_8_strict *swap_address; + struct wire_cst_list_prim_u_8_strict *to_address; + uint32_t sat_per_vbyte; +} wire_cst_prepare_refund_request; + +typedef struct wire_cst_receive_onchain_request { + struct wire_cst_opening_fee_params *opening_fee_params; +} wire_cst_receive_onchain_request; + +typedef struct wire_cst_receive_payment_request { + uint64_t amount_msat; + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *preimage; + struct wire_cst_opening_fee_params *opening_fee_params; + bool *use_description_hash; + uint32_t *expiry; + uint32_t *cltv; +} wire_cst_receive_payment_request; + +typedef struct wire_cst_redeem_onchain_funds_request { + struct wire_cst_list_prim_u_8_strict *to_address; + uint32_t sat_per_vbyte; +} wire_cst_redeem_onchain_funds_request; + +typedef struct wire_cst_refund_request { + struct wire_cst_list_prim_u_8_strict *swap_address; + struct wire_cst_list_prim_u_8_strict *to_address; + uint32_t sat_per_vbyte; +} wire_cst_refund_request; + +typedef struct wire_cst_report_payment_failure_details { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *comment; +} wire_cst_report_payment_failure_details; + +typedef struct wire_cst_ReportIssueRequest_PaymentFailure { + struct wire_cst_report_payment_failure_details *data; +} wire_cst_ReportIssueRequest_PaymentFailure; + +typedef union ReportIssueRequestKind { + struct wire_cst_ReportIssueRequest_PaymentFailure PaymentFailure; +} ReportIssueRequestKind; + +typedef struct wire_cst_report_issue_request { + int32_t tag; + union ReportIssueRequestKind kind; +} wire_cst_report_issue_request; + +typedef struct wire_cst_send_onchain_request { + uint64_t amount_sat; + struct wire_cst_list_prim_u_8_strict *onchain_recipient_address; + struct wire_cst_list_prim_u_8_strict *pair_hash; + uint32_t sat_per_vbyte; +} wire_cst_send_onchain_request; + +typedef struct wire_cst_send_payment_request { + struct wire_cst_list_prim_u_8_strict *bolt11; + uint64_t *amount_msat; + struct wire_cst_list_prim_u_8_strict *label; +} wire_cst_send_payment_request; + +typedef struct wire_cst_tlv_entry { + uint64_t field_number; + struct wire_cst_list_prim_u_8_strict *value; +} wire_cst_tlv_entry; + +typedef struct wire_cst_list_tlv_entry { + struct wire_cst_tlv_entry *ptr; + int32_t len; +} wire_cst_list_tlv_entry; + +typedef struct wire_cst_send_spontaneous_payment_request { + struct wire_cst_list_prim_u_8_strict *node_id; + uint64_t amount_msat; + struct wire_cst_list_tlv_entry *extra_tlvs; + struct wire_cst_list_prim_u_8_strict *label; +} wire_cst_send_spontaneous_payment_request; + +typedef struct wire_cst_sign_message_request { + struct wire_cst_list_prim_u_8_strict *message; +} wire_cst_sign_message_request; + +typedef struct wire_cst_static_backup_request { + struct wire_cst_list_prim_u_8_strict *working_dir; +} wire_cst_static_backup_request; + +typedef struct wire_cst_aes_success_action_data_decrypted { + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *plaintext; +} wire_cst_aes_success_action_data_decrypted; + +typedef struct wire_cst_AesSuccessActionDataResult_Decrypted { + struct wire_cst_aes_success_action_data_decrypted *data; +} wire_cst_AesSuccessActionDataResult_Decrypted; + +typedef struct wire_cst_AesSuccessActionDataResult_ErrorStatus { + struct wire_cst_list_prim_u_8_strict *reason; +} wire_cst_AesSuccessActionDataResult_ErrorStatus; + +typedef union AesSuccessActionDataResultKind { + struct wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; + struct wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; +} AesSuccessActionDataResultKind; + +typedef struct wire_cst_aes_success_action_data_result { + int32_t tag; + union AesSuccessActionDataResultKind kind; +} wire_cst_aes_success_action_data_result; + +typedef struct wire_cst_backup_failed_data { + struct wire_cst_list_prim_u_8_strict *error; +} wire_cst_backup_failed_data; + +typedef struct wire_cst_bitcoin_address_data { + struct wire_cst_list_prim_u_8_strict *address; + int32_t network; + uint64_t *amount_sat; + struct wire_cst_list_prim_u_8_strict *label; + struct wire_cst_list_prim_u_8_strict *message; +} wire_cst_bitcoin_address_data; + +typedef struct wire_cst_closed_channel_payment_details { + int32_t state; + struct wire_cst_list_prim_u_8_strict *funding_txid; + struct wire_cst_list_prim_u_8_strict *short_channel_id; + struct wire_cst_list_prim_u_8_strict *closing_txid; +} wire_cst_closed_channel_payment_details; + +typedef struct wire_cst_SuccessActionProcessed_Aes { + struct wire_cst_aes_success_action_data_result *result; +} wire_cst_SuccessActionProcessed_Aes; + +typedef struct wire_cst_message_success_action_data { + struct wire_cst_list_prim_u_8_strict *message; +} wire_cst_message_success_action_data; + +typedef struct wire_cst_SuccessActionProcessed_Message { + struct wire_cst_message_success_action_data *data; +} wire_cst_SuccessActionProcessed_Message; + +typedef struct wire_cst_url_success_action_data { + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *url; +} wire_cst_url_success_action_data; + +typedef struct wire_cst_SuccessActionProcessed_Url { + struct wire_cst_url_success_action_data *data; +} wire_cst_SuccessActionProcessed_Url; + +typedef union SuccessActionProcessedKind { + struct wire_cst_SuccessActionProcessed_Aes Aes; + struct wire_cst_SuccessActionProcessed_Message Message; + struct wire_cst_SuccessActionProcessed_Url Url; +} SuccessActionProcessedKind; + +typedef struct wire_cst_success_action_processed { + int32_t tag; + union SuccessActionProcessedKind kind; +} wire_cst_success_action_processed; + +typedef struct wire_cst_list_String { + struct wire_cst_list_prim_u_8_strict **ptr; + int32_t len; +} wire_cst_list_String; + +typedef struct wire_cst_swap_info { + struct wire_cst_list_prim_u_8_strict *bitcoin_address; + int64_t created_at; + int64_t lock_height; + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *preimage; + struct wire_cst_list_prim_u_8_strict *private_key; + struct wire_cst_list_prim_u_8_strict *public_key; + struct wire_cst_list_prim_u_8_strict *swapper_public_key; + struct wire_cst_list_prim_u_8_strict *script; + struct wire_cst_list_prim_u_8_strict *bolt11; + uint64_t paid_msat; + uint64_t total_incoming_txs; + uint64_t confirmed_sats; + uint64_t unconfirmed_sats; + int32_t status; + struct wire_cst_list_String *refund_tx_ids; + struct wire_cst_list_String *unconfirmed_tx_ids; + struct wire_cst_list_String *confirmed_tx_ids; + int64_t min_allowed_deposit; + int64_t max_allowed_deposit; + int64_t max_swapper_payable; + struct wire_cst_list_prim_u_8_strict *last_redeem_error; + struct wire_cst_opening_fee_params *channel_opening_fees; + uint32_t *confirmed_at; +} wire_cst_swap_info; + +typedef struct wire_cst_reverse_swap_info { + struct wire_cst_list_prim_u_8_strict *id; + struct wire_cst_list_prim_u_8_strict *claim_pubkey; + struct wire_cst_list_prim_u_8_strict *lockup_txid; + struct wire_cst_list_prim_u_8_strict *claim_txid; + uint64_t onchain_amount_sat; + int32_t status; +} wire_cst_reverse_swap_info; + +typedef struct wire_cst_ln_payment_details { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *label; + struct wire_cst_list_prim_u_8_strict *destination_pubkey; + struct wire_cst_list_prim_u_8_strict *payment_preimage; + bool keysend; + struct wire_cst_list_prim_u_8_strict *bolt11; + struct wire_cst_list_prim_u_8_strict *open_channel_bolt11; + struct wire_cst_success_action_processed *lnurl_success_action; + struct wire_cst_list_prim_u_8_strict *lnurl_pay_domain; + struct wire_cst_list_prim_u_8_strict *ln_address; + struct wire_cst_list_prim_u_8_strict *lnurl_metadata; + struct wire_cst_list_prim_u_8_strict *lnurl_withdraw_endpoint; + struct wire_cst_swap_info *swap_info; + struct wire_cst_reverse_swap_info *reverse_swap_info; + uint32_t *pending_expiration_block; +} wire_cst_ln_payment_details; + +typedef struct wire_cst_PaymentDetails_Ln { + struct wire_cst_ln_payment_details *data; +} wire_cst_PaymentDetails_Ln; + +typedef struct wire_cst_PaymentDetails_ClosedChannel { + struct wire_cst_closed_channel_payment_details *data; +} wire_cst_PaymentDetails_ClosedChannel; + +typedef union PaymentDetailsKind { + struct wire_cst_PaymentDetails_Ln Ln; + struct wire_cst_PaymentDetails_ClosedChannel ClosedChannel; +} PaymentDetailsKind; + +typedef struct wire_cst_payment_details { + int32_t tag; + union PaymentDetailsKind kind; +} wire_cst_payment_details; + +typedef struct wire_cst_payment { + struct wire_cst_list_prim_u_8_strict *id; + int32_t payment_type; + int64_t payment_time; + uint64_t amount_msat; + uint64_t fee_msat; + int32_t status; + struct wire_cst_list_prim_u_8_strict *error; + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_payment_details details; + struct wire_cst_list_prim_u_8_strict *metadata; +} wire_cst_payment; + +typedef struct wire_cst_invoice_paid_details { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *bolt11; + struct wire_cst_payment *payment; +} wire_cst_invoice_paid_details; + +typedef struct wire_cst_route_hint_hop { + struct wire_cst_list_prim_u_8_strict *src_node_id; + uint64_t short_channel_id; + uint32_t fees_base_msat; + uint32_t fees_proportional_millionths; + uint64_t cltv_expiry_delta; + uint64_t *htlc_minimum_msat; + uint64_t *htlc_maximum_msat; +} wire_cst_route_hint_hop; + +typedef struct wire_cst_list_route_hint_hop { + struct wire_cst_route_hint_hop *ptr; + int32_t len; +} wire_cst_list_route_hint_hop; + +typedef struct wire_cst_route_hint { + struct wire_cst_list_route_hint_hop *hops; +} wire_cst_route_hint; + +typedef struct wire_cst_list_route_hint { + struct wire_cst_route_hint *ptr; + int32_t len; +} wire_cst_list_route_hint; + +typedef struct wire_cst_ln_invoice { + struct wire_cst_list_prim_u_8_strict *bolt11; + int32_t network; + struct wire_cst_list_prim_u_8_strict *payee_pubkey; + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *description_hash; + uint64_t *amount_msat; + uint64_t timestamp; + uint64_t expiry; + struct wire_cst_list_route_hint *routing_hints; + struct wire_cst_list_prim_u_8_strict *payment_secret; + uint64_t min_final_cltv_expiry_delta; +} wire_cst_ln_invoice; + +typedef struct wire_cst_ln_url_error_data { + struct wire_cst_list_prim_u_8_strict *reason; +} wire_cst_ln_url_error_data; + +typedef struct wire_cst_ln_url_pay_error_data { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *reason; +} wire_cst_ln_url_pay_error_data; + +typedef struct wire_cst_ln_url_pay_success_data { + struct wire_cst_payment payment; + struct wire_cst_success_action_processed *success_action; +} wire_cst_ln_url_pay_success_data; + +typedef struct wire_cst_ln_url_withdraw_success_data { + struct wire_cst_ln_invoice invoice; +} wire_cst_ln_url_withdraw_success_data; + +typedef struct wire_cst_list_opening_fee_params { + struct wire_cst_opening_fee_params *ptr; + int32_t len; +} wire_cst_list_opening_fee_params; + +typedef struct wire_cst_opening_fee_params_menu { + struct wire_cst_list_opening_fee_params *values; +} wire_cst_opening_fee_params_menu; + +typedef struct wire_cst_lsp_information { + struct wire_cst_list_prim_u_8_strict *id; + struct wire_cst_list_prim_u_8_strict *name; + struct wire_cst_list_prim_u_8_strict *widget_url; + struct wire_cst_list_prim_u_8_strict *pubkey; + struct wire_cst_list_prim_u_8_strict *host; + int64_t base_fee_msat; + double fee_rate; + uint32_t time_lock_delta; + int64_t min_htlc_msat; + struct wire_cst_list_prim_u_8_strict *lsp_pubkey; + struct wire_cst_opening_fee_params_menu opening_fee_params_list; +} wire_cst_lsp_information; + +typedef struct wire_cst_NodeCredentials_Greenlight { + struct wire_cst_greenlight_credentials *credentials; +} wire_cst_NodeCredentials_Greenlight; + +typedef union NodeCredentialsKind { + struct wire_cst_NodeCredentials_Greenlight Greenlight; +} NodeCredentialsKind; + +typedef struct wire_cst_node_credentials { + int32_t tag; + union NodeCredentialsKind kind; +} wire_cst_node_credentials; + +typedef struct wire_cst_payment_failed_data { + struct wire_cst_list_prim_u_8_strict *error; + struct wire_cst_list_prim_u_8_strict *node_id; + struct wire_cst_ln_invoice *invoice; +} wire_cst_payment_failed_data; + +typedef struct wire_cst_symbol { + struct wire_cst_list_prim_u_8_strict *grapheme; + struct wire_cst_list_prim_u_8_strict *template; + bool *rtl; + uint32_t *position; +} wire_cst_symbol; + +typedef struct wire_cst_localized_name { + struct wire_cst_list_prim_u_8_strict *locale; + struct wire_cst_list_prim_u_8_strict *name; +} wire_cst_localized_name; + +typedef struct wire_cst_list_localized_name { + struct wire_cst_localized_name *ptr; + int32_t len; +} wire_cst_list_localized_name; + +typedef struct wire_cst_locale_overrides { + struct wire_cst_list_prim_u_8_strict *locale; + uint32_t *spacing; + struct wire_cst_symbol symbol; +} wire_cst_locale_overrides; + +typedef struct wire_cst_list_locale_overrides { + struct wire_cst_locale_overrides *ptr; + int32_t len; +} wire_cst_list_locale_overrides; + +typedef struct wire_cst_currency_info { + struct wire_cst_list_prim_u_8_strict *name; + uint32_t fraction_size; + uint32_t *spacing; + struct wire_cst_symbol *symbol; + struct wire_cst_symbol *uniq_symbol; + struct wire_cst_list_localized_name *localized_name; + struct wire_cst_list_locale_overrides *locale_overrides; +} wire_cst_currency_info; + +typedef struct wire_cst_fiat_currency { + struct wire_cst_list_prim_u_8_strict *id; + struct wire_cst_currency_info info; +} wire_cst_fiat_currency; + +typedef struct wire_cst_list_fiat_currency { + struct wire_cst_fiat_currency *ptr; + int32_t len; +} wire_cst_list_fiat_currency; + +typedef struct wire_cst_list_lsp_information { + struct wire_cst_lsp_information *ptr; + int32_t len; +} wire_cst_list_lsp_information; + +typedef struct wire_cst_list_payment { + struct wire_cst_payment *ptr; + int32_t len; +} wire_cst_list_payment; + +typedef struct wire_cst_rate { + struct wire_cst_list_prim_u_8_strict *coin; + double value; +} wire_cst_rate; + +typedef struct wire_cst_list_rate { + struct wire_cst_rate *ptr; + int32_t len; +} wire_cst_list_rate; + +typedef struct wire_cst_list_reverse_swap_info { + struct wire_cst_reverse_swap_info *ptr; + int32_t len; +} wire_cst_list_reverse_swap_info; + +typedef struct wire_cst_list_swap_info { + struct wire_cst_swap_info *ptr; + int32_t len; +} wire_cst_list_swap_info; + +typedef struct wire_cst_unspent_transaction_output { + struct wire_cst_list_prim_u_8_strict *txid; + uint32_t outnum; + uint64_t amount_millisatoshi; + struct wire_cst_list_prim_u_8_strict *address; + bool reserved; +} wire_cst_unspent_transaction_output; + +typedef struct wire_cst_list_unspent_transaction_output { + struct wire_cst_unspent_transaction_output *ptr; + int32_t len; +} wire_cst_list_unspent_transaction_output; + +typedef struct wire_cst_backup_status { + bool backed_up; + uint64_t *last_backup_time; +} wire_cst_backup_status; + +typedef struct wire_cst_BreezEvent_NewBlock { + uint32_t block; +} wire_cst_BreezEvent_NewBlock; + +typedef struct wire_cst_BreezEvent_InvoicePaid { + struct wire_cst_invoice_paid_details *details; +} wire_cst_BreezEvent_InvoicePaid; + +typedef struct wire_cst_BreezEvent_PaymentSucceed { + struct wire_cst_payment *details; +} wire_cst_BreezEvent_PaymentSucceed; + +typedef struct wire_cst_BreezEvent_PaymentFailed { + struct wire_cst_payment_failed_data *details; +} wire_cst_BreezEvent_PaymentFailed; + +typedef struct wire_cst_BreezEvent_BackupFailed { + struct wire_cst_backup_failed_data *details; +} wire_cst_BreezEvent_BackupFailed; + +typedef struct wire_cst_BreezEvent_SwapUpdated { + struct wire_cst_swap_info *details; +} wire_cst_BreezEvent_SwapUpdated; + +typedef union BreezEventKind { + struct wire_cst_BreezEvent_NewBlock NewBlock; + struct wire_cst_BreezEvent_InvoicePaid InvoicePaid; + struct wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; + struct wire_cst_BreezEvent_PaymentFailed PaymentFailed; + struct wire_cst_BreezEvent_BackupFailed BackupFailed; + struct wire_cst_BreezEvent_SwapUpdated SwapUpdated; +} BreezEventKind; + +typedef struct wire_cst_breez_event { + int32_t tag; + union BreezEventKind kind; +} wire_cst_breez_event; + +typedef struct wire_cst_buy_bitcoin_response { + struct wire_cst_list_prim_u_8_strict *url; + struct wire_cst_opening_fee_params *opening_fee_params; +} wire_cst_buy_bitcoin_response; + +typedef struct wire_cst_check_message_response { + bool is_valid; +} wire_cst_check_message_response; + +typedef struct wire_cst_InputType_BitcoinAddress { + struct wire_cst_bitcoin_address_data *address; +} wire_cst_InputType_BitcoinAddress; + +typedef struct wire_cst_InputType_Bolt11 { + struct wire_cst_ln_invoice *invoice; +} wire_cst_InputType_Bolt11; + +typedef struct wire_cst_InputType_NodeId { + struct wire_cst_list_prim_u_8_strict *node_id; +} wire_cst_InputType_NodeId; + +typedef struct wire_cst_InputType_Url { + struct wire_cst_list_prim_u_8_strict *url; +} wire_cst_InputType_Url; + +typedef struct wire_cst_InputType_LnUrlPay { + struct wire_cst_ln_url_pay_request_data *data; +} wire_cst_InputType_LnUrlPay; + +typedef struct wire_cst_InputType_LnUrlWithdraw { + struct wire_cst_ln_url_withdraw_request_data *data; +} wire_cst_InputType_LnUrlWithdraw; + +typedef struct wire_cst_InputType_LnUrlAuth { + struct wire_cst_ln_url_auth_request_data *data; +} wire_cst_InputType_LnUrlAuth; + +typedef struct wire_cst_InputType_LnUrlError { + struct wire_cst_ln_url_error_data *data; +} wire_cst_InputType_LnUrlError; + +typedef union InputTypeKind { + struct wire_cst_InputType_BitcoinAddress BitcoinAddress; + struct wire_cst_InputType_Bolt11 Bolt11; + struct wire_cst_InputType_NodeId NodeId; + struct wire_cst_InputType_Url Url; + struct wire_cst_InputType_LnUrlPay LnUrlPay; + struct wire_cst_InputType_LnUrlWithdraw LnUrlWithdraw; + struct wire_cst_InputType_LnUrlAuth LnUrlAuth; + struct wire_cst_InputType_LnUrlError LnUrlError; +} InputTypeKind; + +typedef struct wire_cst_input_type { + int32_t tag; + union InputTypeKind kind; +} wire_cst_input_type; + +typedef struct wire_cst_LnUrlCallbackStatus_ErrorStatus { + struct wire_cst_ln_url_error_data *data; +} wire_cst_LnUrlCallbackStatus_ErrorStatus; + +typedef union LnUrlCallbackStatusKind { + struct wire_cst_LnUrlCallbackStatus_ErrorStatus ErrorStatus; +} LnUrlCallbackStatusKind; + +typedef struct wire_cst_ln_url_callback_status { + int32_t tag; + union LnUrlCallbackStatusKind kind; +} wire_cst_ln_url_callback_status; + +typedef struct wire_cst_LnUrlPayResult_EndpointSuccess { + struct wire_cst_ln_url_pay_success_data *data; +} wire_cst_LnUrlPayResult_EndpointSuccess; + +typedef struct wire_cst_LnUrlPayResult_EndpointError { + struct wire_cst_ln_url_error_data *data; +} wire_cst_LnUrlPayResult_EndpointError; + +typedef struct wire_cst_LnUrlPayResult_PayError { + struct wire_cst_ln_url_pay_error_data *data; +} wire_cst_LnUrlPayResult_PayError; + +typedef union LnUrlPayResultKind { + struct wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; + struct wire_cst_LnUrlPayResult_EndpointError EndpointError; + struct wire_cst_LnUrlPayResult_PayError PayError; +} LnUrlPayResultKind; + +typedef struct wire_cst_ln_url_pay_result { + int32_t tag; + union LnUrlPayResultKind kind; +} wire_cst_ln_url_pay_result; + +typedef struct wire_cst_LnUrlWithdrawResult_Ok { + struct wire_cst_ln_url_withdraw_success_data *data; +} wire_cst_LnUrlWithdrawResult_Ok; + +typedef struct wire_cst_LnUrlWithdrawResult_ErrorStatus { + struct wire_cst_ln_url_error_data *data; +} wire_cst_LnUrlWithdrawResult_ErrorStatus; + +typedef union LnUrlWithdrawResultKind { + struct wire_cst_LnUrlWithdrawResult_Ok Ok; + struct wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; +} LnUrlWithdrawResultKind; + +typedef struct wire_cst_ln_url_withdraw_result { + int32_t tag; + union LnUrlWithdrawResultKind kind; +} wire_cst_ln_url_withdraw_result; + +typedef struct wire_cst_log_entry { + struct wire_cst_list_prim_u_8_strict *line; + struct wire_cst_list_prim_u_8_strict *level; +} wire_cst_log_entry; + +typedef struct wire_cst_max_reverse_swap_amount_response { + uint64_t total_sat; +} wire_cst_max_reverse_swap_amount_response; + +typedef struct wire_cst_node_state { + struct wire_cst_list_prim_u_8_strict *id; + uint32_t block_height; + uint64_t channels_balance_msat; + uint64_t onchain_balance_msat; + uint64_t pending_onchain_balance_msat; + struct wire_cst_list_unspent_transaction_output *utxos; + uint64_t max_payable_msat; + uint64_t max_receivable_msat; + uint64_t max_single_payment_amount_msat; + uint64_t max_chan_reserve_msats; + struct wire_cst_list_String *connected_peers; + uint64_t inbound_liquidity_msats; +} wire_cst_node_state; + +typedef struct wire_cst_onchain_payment_limits_response { + uint64_t min_sat; + uint64_t max_sat; +} wire_cst_onchain_payment_limits_response; + +typedef struct wire_cst_open_channel_fee_response { + uint64_t *fee_msat; + struct wire_cst_opening_fee_params fee_params; +} wire_cst_open_channel_fee_response; + +typedef struct wire_cst_pay_onchain_response { + struct wire_cst_reverse_swap_info reverse_swap_info; +} wire_cst_pay_onchain_response; + +typedef struct wire_cst_prepare_redeem_onchain_funds_response { + uint64_t tx_weight; + uint64_t tx_fee_sat; +} wire_cst_prepare_redeem_onchain_funds_response; + +typedef struct wire_cst_prepare_refund_response { + uint32_t refund_tx_weight; + uint64_t refund_tx_fee_sat; +} wire_cst_prepare_refund_response; + +typedef struct wire_cst_receive_payment_response { + struct wire_cst_ln_invoice ln_invoice; + struct wire_cst_opening_fee_params *opening_fee_params; + uint64_t *opening_fee_msat; +} wire_cst_receive_payment_response; + +typedef struct wire_cst_recommended_fees { + uint64_t fastest_fee; + uint64_t half_hour_fee; + uint64_t hour_fee; + uint64_t economy_fee; + uint64_t minimum_fee; +} wire_cst_recommended_fees; + +typedef struct wire_cst_redeem_onchain_funds_response { + struct wire_cst_list_prim_u_8_strict *txid; +} wire_cst_redeem_onchain_funds_response; + +typedef struct wire_cst_refund_response { + struct wire_cst_list_prim_u_8_strict *refund_tx_id; +} wire_cst_refund_response; + +typedef struct wire_cst_reverse_swap_pair_info { + uint64_t min; + uint64_t max; + struct wire_cst_list_prim_u_8_strict *fees_hash; + double fees_percentage; + uint64_t fees_lockup; + uint64_t fees_claim; + uint64_t *total_fees; +} wire_cst_reverse_swap_pair_info; + +typedef struct wire_cst_send_onchain_response { + struct wire_cst_reverse_swap_info reverse_swap_info; +} wire_cst_send_onchain_response; + +typedef struct wire_cst_send_payment_response { + struct wire_cst_payment payment; +} wire_cst_send_payment_response; + +typedef struct wire_cst_service_health_check_response { + int32_t status; +} wire_cst_service_health_check_response; + +typedef struct wire_cst_sign_message_response { + struct wire_cst_list_prim_u_8_strict *signature; +} wire_cst_sign_message_response; + +typedef struct wire_cst_static_backup_response { + struct wire_cst_list_String *backup; +} wire_cst_static_backup_response; + +void frbgen_breez_sdk_wire_backup(int64_t port_); + +void frbgen_breez_sdk_wire_backup_status(int64_t port_); + +void frbgen_breez_sdk_wire_breez_events_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_breez_sdk_wire_breez_log_stream(int64_t port_, struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_breez_sdk_wire_buy_bitcoin(int64_t port_, struct wire_cst_buy_bitcoin_request *req); + +void frbgen_breez_sdk_wire_check_message(int64_t port_, struct wire_cst_check_message_request *req); + +void frbgen_breez_sdk_wire_close_lsp_channels(int64_t port_); + +void frbgen_breez_sdk_wire_configure_node(int64_t port_, + struct wire_cst_configure_node_request *req); + +void frbgen_breez_sdk_wire_connect(int64_t port_, struct wire_cst_connect_request *req); + +void frbgen_breez_sdk_wire_connect_lsp(int64_t port_, struct wire_cst_list_prim_u_8_strict *lsp_id); + +void frbgen_breez_sdk_wire_default_config(int64_t port_, + int32_t env_type, + struct wire_cst_list_prim_u_8_strict *api_key, + struct wire_cst_node_config *node_config); + +void frbgen_breez_sdk_wire_disconnect(int64_t port_); + +void frbgen_breez_sdk_wire_execute_command(int64_t port_, + struct wire_cst_list_prim_u_8_strict *command); + +void frbgen_breez_sdk_wire_fetch_fiat_rates(int64_t port_); + +void frbgen_breez_sdk_wire_fetch_lsp_info(int64_t port_, struct wire_cst_list_prim_u_8_strict *id); + +void frbgen_breez_sdk_wire_fetch_reverse_swap_fees(int64_t port_, + struct wire_cst_reverse_swap_fees_request *req); + +void frbgen_breez_sdk_wire_generate_diagnostic_data(int64_t port_); + +void frbgen_breez_sdk_wire_in_progress_onchain_payments(int64_t port_); + +void frbgen_breez_sdk_wire_in_progress_reverse_swaps(int64_t port_); + +void frbgen_breez_sdk_wire_in_progress_swap(int64_t port_); + +void frbgen_breez_sdk_wire_is_initialized(int64_t port_); + +void frbgen_breez_sdk_wire_list_fiat_currencies(int64_t port_); + +void frbgen_breez_sdk_wire_list_lsps(int64_t port_); + +void frbgen_breez_sdk_wire_list_payments(int64_t port_, struct wire_cst_list_payments_request *req); + +void frbgen_breez_sdk_wire_list_refundables(int64_t port_); + +void frbgen_breez_sdk_wire_lnurl_auth(int64_t port_, + struct wire_cst_ln_url_auth_request_data *req_data); + +void frbgen_breez_sdk_wire_lnurl_pay(int64_t port_, struct wire_cst_ln_url_pay_request *req); + +void frbgen_breez_sdk_wire_lnurl_withdraw(int64_t port_, + struct wire_cst_ln_url_withdraw_request *req); + +void frbgen_breez_sdk_wire_lsp_id(int64_t port_); + +void frbgen_breez_sdk_wire_lsp_info(int64_t port_); + +void frbgen_breez_sdk_wire_max_reverse_swap_amount(int64_t port_); + +void frbgen_breez_sdk_wire_mnemonic_to_seed(int64_t port_, + struct wire_cst_list_prim_u_8_strict *phrase); + +void frbgen_breez_sdk_wire_node_credentials(int64_t port_); + +void frbgen_breez_sdk_wire_node_info(int64_t port_); + +void frbgen_breez_sdk_wire_onchain_payment_limits(int64_t port_); + +void frbgen_breez_sdk_wire_open_channel_fee(int64_t port_, + struct wire_cst_open_channel_fee_request *req); + +void frbgen_breez_sdk_wire_parse_input(int64_t port_, struct wire_cst_list_prim_u_8_strict *input); + +void frbgen_breez_sdk_wire_parse_invoice(int64_t port_, + struct wire_cst_list_prim_u_8_strict *invoice); + +void frbgen_breez_sdk_wire_pay_onchain(int64_t port_, struct wire_cst_pay_onchain_request *req); + +void frbgen_breez_sdk_wire_payment_by_hash(int64_t port_, + struct wire_cst_list_prim_u_8_strict *hash); + +void frbgen_breez_sdk_wire_prepare_onchain_payment(int64_t port_, + struct wire_cst_prepare_onchain_payment_request *req); + +void frbgen_breez_sdk_wire_prepare_redeem_onchain_funds(int64_t port_, + struct wire_cst_prepare_redeem_onchain_funds_request *req); + +void frbgen_breez_sdk_wire_prepare_refund(int64_t port_, + struct wire_cst_prepare_refund_request *req); + +void frbgen_breez_sdk_wire_receive_onchain(int64_t port_, + struct wire_cst_receive_onchain_request *req); + +void frbgen_breez_sdk_wire_receive_payment(int64_t port_, + struct wire_cst_receive_payment_request *req); + +void frbgen_breez_sdk_wire_recommended_fees(int64_t port_); + +void frbgen_breez_sdk_wire_redeem_onchain_funds(int64_t port_, + struct wire_cst_redeem_onchain_funds_request *req); + +void frbgen_breez_sdk_wire_redeem_swap(int64_t port_, + struct wire_cst_list_prim_u_8_strict *swap_address); + +void frbgen_breez_sdk_wire_refund(int64_t port_, struct wire_cst_refund_request *req); + +void frbgen_breez_sdk_wire_register_webhook(int64_t port_, + struct wire_cst_list_prim_u_8_strict *webhook_url); + +void frbgen_breez_sdk_wire_report_issue(int64_t port_, struct wire_cst_report_issue_request *req); + +void frbgen_breez_sdk_wire_rescan_swaps(int64_t port_); + +void frbgen_breez_sdk_wire_send_onchain(int64_t port_, struct wire_cst_send_onchain_request *req); + +void frbgen_breez_sdk_wire_send_payment(int64_t port_, struct wire_cst_send_payment_request *req); + +void frbgen_breez_sdk_wire_send_spontaneous_payment(int64_t port_, + struct wire_cst_send_spontaneous_payment_request *req); + +void frbgen_breez_sdk_wire_service_health_check(int64_t port_, + struct wire_cst_list_prim_u_8_strict *api_key); + +void frbgen_breez_sdk_wire_set_payment_metadata(int64_t port_, + struct wire_cst_list_prim_u_8_strict *hash, + struct wire_cst_list_prim_u_8_strict *metadata); + +void frbgen_breez_sdk_wire_sign_message(int64_t port_, struct wire_cst_sign_message_request *req); + +void frbgen_breez_sdk_wire_static_backup(int64_t port_, struct wire_cst_static_backup_request *req); + +void frbgen_breez_sdk_wire_sync(int64_t port_); + +struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); + +struct wire_cst_aes_success_action_data_result *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result(void); + +struct wire_cst_backup_failed_data *frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data(void); + +struct wire_cst_bitcoin_address_data *frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data(void); + +bool *frbgen_breez_sdk_cst_new_box_autoadd_bool(bool value); + +struct wire_cst_buy_bitcoin_request *frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request(void); + +struct wire_cst_check_message_request *frbgen_breez_sdk_cst_new_box_autoadd_check_message_request(void); + +struct wire_cst_closed_channel_payment_details *frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details(void); + +struct wire_cst_configure_node_request *frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request(void); + +struct wire_cst_connect_request *frbgen_breez_sdk_cst_new_box_autoadd_connect_request(void); + +struct wire_cst_greenlight_credentials *frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials(void); + +struct wire_cst_greenlight_node_config *frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config(void); + +int64_t *frbgen_breez_sdk_cst_new_box_autoadd_i_64(int64_t value); + +struct wire_cst_invoice_paid_details *frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details(void); + +struct wire_cst_list_payments_request *frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request(void); + +struct wire_cst_ln_invoice *frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice(void); + +struct wire_cst_ln_payment_details *frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details(void); + +struct wire_cst_ln_url_auth_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data(void); + +struct wire_cst_ln_url_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data(void); + +struct wire_cst_ln_url_pay_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data(void); + +struct wire_cst_ln_url_pay_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request(void); + +struct wire_cst_ln_url_pay_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data(void); + +struct wire_cst_ln_url_pay_success_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data(void); + +struct wire_cst_ln_url_withdraw_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request(void); + +struct wire_cst_ln_url_withdraw_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data(void); + +struct wire_cst_ln_url_withdraw_success_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data(void); + +struct wire_cst_lsp_information *frbgen_breez_sdk_cst_new_box_autoadd_lsp_information(void); + +struct wire_cst_message_success_action_data *frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data(void); + +struct wire_cst_node_config *frbgen_breez_sdk_cst_new_box_autoadd_node_config(void); + +struct wire_cst_node_credentials *frbgen_breez_sdk_cst_new_box_autoadd_node_credentials(void); + +struct wire_cst_open_channel_fee_request *frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request(void); + +struct wire_cst_opening_fee_params *frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params(void); + +struct wire_cst_pay_onchain_request *frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request(void); + +struct wire_cst_payment *frbgen_breez_sdk_cst_new_box_autoadd_payment(void); + +struct wire_cst_payment_failed_data *frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data(void); + +struct wire_cst_prepare_onchain_payment_request *frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request(void); + +struct wire_cst_prepare_redeem_onchain_funds_request *frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request(void); + +struct wire_cst_prepare_refund_request *frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request(void); + +struct wire_cst_receive_onchain_request *frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request(void); + +struct wire_cst_receive_payment_request *frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request(void); + +struct wire_cst_redeem_onchain_funds_request *frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request(void); + +struct wire_cst_refund_request *frbgen_breez_sdk_cst_new_box_autoadd_refund_request(void); + +struct wire_cst_report_issue_request *frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request(void); + +struct wire_cst_report_payment_failure_details *frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details(void); + +struct wire_cst_reverse_swap_fees_request *frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request(void); + +struct wire_cst_reverse_swap_info *frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info(void); + +struct wire_cst_send_onchain_request *frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request(void); + +struct wire_cst_send_payment_request *frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request(void); + +struct wire_cst_send_spontaneous_payment_request *frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request(void); + +struct wire_cst_sign_message_request *frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request(void); + +struct wire_cst_static_backup_request *frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request(void); + +struct wire_cst_success_action_processed *frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed(void); + +struct wire_cst_swap_info *frbgen_breez_sdk_cst_new_box_autoadd_swap_info(void); + +struct wire_cst_symbol *frbgen_breez_sdk_cst_new_box_autoadd_symbol(void); + +uint32_t *frbgen_breez_sdk_cst_new_box_autoadd_u_32(uint32_t value); + +uint64_t *frbgen_breez_sdk_cst_new_box_autoadd_u_64(uint64_t value); + +struct wire_cst_url_success_action_data *frbgen_breez_sdk_cst_new_box_autoadd_url_success_action_data(void); + +struct wire_cst_list_String *frbgen_breez_sdk_cst_new_list_String(int32_t len); + +struct wire_cst_list_fiat_currency *frbgen_breez_sdk_cst_new_list_fiat_currency(int32_t len); + +struct wire_cst_list_locale_overrides *frbgen_breez_sdk_cst_new_list_locale_overrides(int32_t len); + +struct wire_cst_list_localized_name *frbgen_breez_sdk_cst_new_list_localized_name(int32_t len); + +struct wire_cst_list_lsp_information *frbgen_breez_sdk_cst_new_list_lsp_information(int32_t len); + +struct wire_cst_list_metadata_filter *frbgen_breez_sdk_cst_new_list_metadata_filter(int32_t len); + +struct wire_cst_list_opening_fee_params *frbgen_breez_sdk_cst_new_list_opening_fee_params(int32_t len); + +struct wire_cst_list_payment *frbgen_breez_sdk_cst_new_list_payment(int32_t len); + +struct wire_cst_list_payment_type_filter *frbgen_breez_sdk_cst_new_list_payment_type_filter(int32_t len); + +struct wire_cst_list_prim_u_8_strict *frbgen_breez_sdk_cst_new_list_prim_u_8_strict(int32_t len); + +struct wire_cst_list_rate *frbgen_breez_sdk_cst_new_list_rate(int32_t len); + +struct wire_cst_list_reverse_swap_info *frbgen_breez_sdk_cst_new_list_reverse_swap_info(int32_t len); + +struct wire_cst_list_route_hint *frbgen_breez_sdk_cst_new_list_route_hint(int32_t len); + +struct wire_cst_list_route_hint_hop *frbgen_breez_sdk_cst_new_list_route_hint_hop(int32_t len); + +struct wire_cst_list_swap_info *frbgen_breez_sdk_cst_new_list_swap_info(int32_t len); + +struct wire_cst_list_tlv_entry *frbgen_breez_sdk_cst_new_list_tlv_entry(int32_t len); + +struct wire_cst_list_unspent_transaction_output *frbgen_breez_sdk_cst_new_list_unspent_transaction_output(int32_t len); +static int64_t dummy_method_to_enforce_bundling(void) { + int64_t dummy_var = 0; + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_bool); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_check_message_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_connect_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_i_64); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_lsp_information); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_node_config); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_node_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_refund_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_swap_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_symbol); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_u_32); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_u_64); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_url_success_action_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_String); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_fiat_currency); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_locale_overrides); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_localized_name); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_lsp_information); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_metadata_filter); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_opening_fee_params); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_payment_type_filter); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_prim_u_8_strict); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_rate); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_reverse_swap_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_route_hint); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_route_hint_hop); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_swap_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_tlv_entry); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_breez_events_stream); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_breez_log_stream); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_buy_bitcoin); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_close_lsp_channels); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_configure_node); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_connect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_connect_lsp); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_default_config); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_disconnect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_execute_command); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_fiat_rates); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_reverse_swap_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_generate_diagnostic_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_onchain_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_reverse_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_is_initialized); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_fiat_currencies); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_lsps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_refundables); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_auth); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_pay); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_withdraw); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lsp_id); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_max_reverse_swap_amount); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_mnemonic_to_seed); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_node_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_node_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_onchain_payment_limits); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_open_channel_fee); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_parse_input); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_parse_invoice); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_pay_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_payment_by_hash); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_onchain_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_receive_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_receive_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_recommended_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_redeem_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_register_webhook); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_report_issue); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_rescan_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_spontaneous_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_service_health_check); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_set_payment_metadata); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sign_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_static_backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sync); + dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); + return dummy_var; +} diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart new file mode 100644 index 000000000..0619b0a1b --- /dev/null +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -0,0 +1,250 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'breez_services.dart'; +import 'chain.dart'; +import 'fiat.dart'; +import 'frb_generated.dart'; +import 'input_parser.dart'; +import 'invoice.dart'; +import 'lnurl/pay/model.dart'; +import 'lsp.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +// The type `BindingEventListener` is not used by any `pub` functions, thus it is ignored. +// The type `BindingLogger` is not used by any `pub` functions, thus it is ignored. + +/// Wrapper around [BreezServices::connect] which also initializes SDK logging +Future connect({required ConnectRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.connect(req: req, hint: hint); + +/// Check whether node service is initialized or not +Future isInitialized({dynamic hint}) => BreezSdkBindings.instance.api.isInitialized(hint: hint); + +/// See [BreezServices::sync] +Future sync({dynamic hint}) => BreezSdkBindings.instance.api.sync(hint: hint); + +/// See [BreezServices::node_credentials] +Future nodeCredentials({dynamic hint}) => + BreezSdkBindings.instance.api.nodeCredentials(hint: hint); + +/// See [BreezServices::node_info] +Future nodeInfo({dynamic hint}) => BreezSdkBindings.instance.api.nodeInfo(hint: hint); + +/// See [BreezServices::configure_node] +Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.configureNode(req: req, hint: hint); + +/// Cleanup node resources and stop the signer. +Future disconnect({dynamic hint}) => BreezSdkBindings.instance.api.disconnect(hint: hint); + +/// See [BreezServices::sign_message] +Future signMessage({required SignMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.signMessage(req: req, hint: hint); + +/// See [BreezServices::check_message] +Future checkMessage({required CheckMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.checkMessage(req: req, hint: hint); + +/// See [breez_services::mnemonic_to_seed] +Future mnemonicToSeed({required String phrase, dynamic hint}) => + BreezSdkBindings.instance.api.mnemonicToSeed(phrase: phrase, hint: hint); + +/// See [BreezServices::default_config] +Future defaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}) => + BreezSdkBindings.instance.api + .defaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, hint: hint); + +/// See [BreezServices::static_backup] +Future staticBackup({required StaticBackupRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.staticBackup(req: req, hint: hint); + +/// See [BreezServices::service_health_check] +Future serviceHealthCheck({required String apiKey, dynamic hint}) => + BreezSdkBindings.instance.api.serviceHealthCheck(apiKey: apiKey, hint: hint); + +/// If used, this must be called before `connect`. It can only be called once. +Stream breezEventsStream({dynamic hint}) => + BreezSdkBindings.instance.api.breezEventsStream(hint: hint); + +/// If used, this must be called before `connect`. It can only be called once. +Stream breezLogStream({dynamic hint}) => BreezSdkBindings.instance.api.breezLogStream(hint: hint); + +/// See [BreezServices::list_lsps] +Future> listLsps({dynamic hint}) => BreezSdkBindings.instance.api.listLsps(hint: hint); + +/// See [BreezServices::connect_lsp] +Future connectLsp({required String lspId, dynamic hint}) => + BreezSdkBindings.instance.api.connectLsp(lspId: lspId, hint: hint); + +/// See [BreezServices::lsp_id] +Future lspId({dynamic hint}) => BreezSdkBindings.instance.api.lspId(hint: hint); + +/// See [BreezServices::fetch_lsp_info] +Future fetchLspInfo({required String id, dynamic hint}) => + BreezSdkBindings.instance.api.fetchLspInfo(id: id, hint: hint); + +/// See [BreezServices::lsp_info] +Future lspInfo({dynamic hint}) => BreezSdkBindings.instance.api.lspInfo(hint: hint); + +/// See [BreezServices::close_lsp_channels] +Future closeLspChannels({dynamic hint}) => BreezSdkBindings.instance.api.closeLspChannels(hint: hint); + +Future registerWebhook({required String webhookUrl, dynamic hint}) => + BreezSdkBindings.instance.api.registerWebhook(webhookUrl: webhookUrl, hint: hint); + +/// See [BreezServices::backup] +Future backup({dynamic hint}) => BreezSdkBindings.instance.api.backup(hint: hint); + +/// See [BreezServices::backup_status] +Future backupStatus({dynamic hint}) => BreezSdkBindings.instance.api.backupStatus(hint: hint); + +Future parseInvoice({required String invoice, dynamic hint}) => + BreezSdkBindings.instance.api.parseInvoice(invoice: invoice, hint: hint); + +Future parseInput({required String input, dynamic hint}) => + BreezSdkBindings.instance.api.parseInput(input: input, hint: hint); + +/// See [BreezServices::list_payments] +Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.listPayments(req: req, hint: hint); + +/// See [BreezServices::list_payments] +Future paymentByHash({required String hash, dynamic hint}) => + BreezSdkBindings.instance.api.paymentByHash(hash: hash, hint: hint); + +/// See [BreezServices::set_payment_metadata] +Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => + BreezSdkBindings.instance.api.setPaymentMetadata(hash: hash, metadata: metadata, hint: hint); + +/// See [BreezServices::send_payment] +Future sendPayment({required SendPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.sendPayment(req: req, hint: hint); + +/// See [BreezServices::send_spontaneous_payment] +Future sendSpontaneousPayment( + {required SendSpontaneousPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.sendSpontaneousPayment(req: req, hint: hint); + +/// See [BreezServices::receive_payment] +Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.receivePayment(req: req, hint: hint); + +/// See [BreezServices::lnurl_pay] +Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.lnurlPay(req: req, hint: hint); + +/// See [BreezServices::lnurl_withdraw] +Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.lnurlWithdraw(req: req, hint: hint); + +/// See [BreezServices::lnurl_auth] +Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => + BreezSdkBindings.instance.api.lnurlAuth(reqData: reqData, hint: hint); + +/// See [BreezServices::report_issue] +Future reportIssue({required ReportIssueRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.reportIssue(req: req, hint: hint); + +/// See [BreezServices::fetch_fiat_rates] +Future> fetchFiatRates({dynamic hint}) => BreezSdkBindings.instance.api.fetchFiatRates(hint: hint); + +/// See [BreezServices::list_fiat_currencies] +Future> listFiatCurrencies({dynamic hint}) => + BreezSdkBindings.instance.api.listFiatCurrencies(hint: hint); + +/// See [BreezServices::max_reverse_swap_amount] +Future maxReverseSwapAmount({dynamic hint}) => + BreezSdkBindings.instance.api.maxReverseSwapAmount(hint: hint); + +/// See [BreezServices::send_onchain] +Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.sendOnchain(req: req, hint: hint); + +/// See [BreezServices::pay_onchain] +Future payOnchain({required PayOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.payOnchain(req: req, hint: hint); + +/// See [BreezServices::receive_onchain] +Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.receiveOnchain(req: req, hint: hint); + +/// See [BreezServices::buy_bitcoin] +Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.buyBitcoin(req: req, hint: hint); + +/// See [BreezServices::redeem_onchain_funds] +Future redeemOnchainFunds( + {required RedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.redeemOnchainFunds(req: req, hint: hint); + +/// See [BreezServices::prepare_redeem_onchain_funds] +Future prepareRedeemOnchainFunds( + {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.prepareRedeemOnchainFunds(req: req, hint: hint); + +/// See [BreezServices::list_refundables] +Future> listRefundables({dynamic hint}) => + BreezSdkBindings.instance.api.listRefundables(hint: hint); + +/// See [BreezServices::prepare_refund] +Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.prepareRefund(req: req, hint: hint); + +/// See [BreezServices::refund] +Future refund({required RefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.refund(req: req, hint: hint); + +/// See [BreezServices::rescan_swaps] +Future rescanSwaps({dynamic hint}) => BreezSdkBindings.instance.api.rescanSwaps(hint: hint); + +/// See [BreezServices::redeem_swap] +Future redeemSwap({required String swapAddress, dynamic hint}) => + BreezSdkBindings.instance.api.redeemSwap(swapAddress: swapAddress, hint: hint); + +/// See [BreezServices::in_progress_swap] +Future inProgressSwap({dynamic hint}) => BreezSdkBindings.instance.api.inProgressSwap(hint: hint); + +/// See [BreezServices::in_progress_reverse_swaps] +Future> inProgressReverseSwaps({dynamic hint}) => + BreezSdkBindings.instance.api.inProgressReverseSwaps(hint: hint); + +/// See [BreezServices::open_channel_fee] +Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.openChannelFee(req: req, hint: hint); + +/// See [BreezServices::fetch_reverse_swap_fees] +Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.fetchReverseSwapFees(req: req, hint: hint); + +/// See [BreezServices::onchain_payment_limits] +Future onchainPaymentLimits({dynamic hint}) => + BreezSdkBindings.instance.api.onchainPaymentLimits(hint: hint); + +/// See [BreezServices::prepare_onchain_payment] +Future prepareOnchainPayment( + {required PrepareOnchainPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.prepareOnchainPayment(req: req, hint: hint); + +/// See [BreezServices::in_progress_onchain_payments] +Future> inProgressOnchainPayments({dynamic hint}) => + BreezSdkBindings.instance.api.inProgressOnchainPayments(hint: hint); + +/// See [BreezServices::recommended_fees] +Future recommendedFees({dynamic hint}) => + BreezSdkBindings.instance.api.recommendedFees(hint: hint); + +/// See [BreezServices::execute_dev_command] +Future executeCommand({required String command, dynamic hint}) => + BreezSdkBindings.instance.api.executeCommand(command: command, hint: hint); + +/// See [BreezServices::generate_diagnostic_data] +Future generateDiagnosticData({dynamic hint}) => + BreezSdkBindings.instance.api.generateDiagnosticData(hint: hint); diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart new file mode 100644 index 000000000..b468da717 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -0,0 +1,205 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'invoice.dart'; +import 'lnurl/pay/model.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'breez_services.freezed.dart'; + +class BackupFailedData { + final String error; + + const BackupFailedData({ + required this.error, + }); + + @override + int get hashCode => error.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BackupFailedData && runtimeType == other.runtimeType && error == other.error; +} + +@freezed +sealed class BreezEvent with _$BreezEvent { + const BreezEvent._(); + + /// Indicates that a new block has just been found + const factory BreezEvent.newBlock({ + required int block, + }) = BreezEvent_NewBlock; + + /// Indicates that a new invoice has just been paid + const factory BreezEvent.invoicePaid({ + required InvoicePaidDetails details, + }) = BreezEvent_InvoicePaid; + + /// Indicates that the local SDK state has just been sync-ed with the remote components + const factory BreezEvent.synced() = BreezEvent_Synced; + + /// Indicates that an outgoing payment has been completed successfully + const factory BreezEvent.paymentSucceed({ + required Payment details, + }) = BreezEvent_PaymentSucceed; + + /// Indicates that an outgoing payment has been failed to complete + const factory BreezEvent.paymentFailed({ + required PaymentFailedData details, + }) = BreezEvent_PaymentFailed; + + /// Indicates that the backup process has just started + const factory BreezEvent.backupStarted() = BreezEvent_BackupStarted; + + /// Indicates that the backup process has just finished successfully + const factory BreezEvent.backupSucceeded() = BreezEvent_BackupSucceeded; + + /// Indicates that the backup process has just failed + const factory BreezEvent.backupFailed({ + required BackupFailedData details, + }) = BreezEvent_BackupFailed; + const factory BreezEvent.swapUpdated({ + required SwapInfo details, + }) = BreezEvent_SwapUpdated; +} + +/// Request to check a message was signed by a specific node id. +class CheckMessageRequest { + /// The message that was signed. + final String message; + + /// The public key of the node that signed the message. + final String pubkey; + + /// The zbase encoded signature to verify. + final String signature; + + const CheckMessageRequest({ + required this.message, + required this.pubkey, + required this.signature, + }); + + @override + int get hashCode => message.hashCode ^ pubkey.hashCode ^ signature.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is CheckMessageRequest && + runtimeType == other.runtimeType && + message == other.message && + pubkey == other.pubkey && + signature == other.signature; +} + +/// Response to a [CheckMessageRequest] +class CheckMessageResponse { + /// Boolean value indicating whether the signature covers the message and + /// was signed by the given pubkey. + final bool isValid; + + const CheckMessageResponse({ + required this.isValid, + }); + + @override + int get hashCode => isValid.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is CheckMessageResponse && runtimeType == other.runtimeType && isValid == other.isValid; +} + +/// Details of an invoice that has been paid, included as payload in an emitted [BreezEvent] +class InvoicePaidDetails { + final String paymentHash; + final String bolt11; + final Payment? payment; + + const InvoicePaidDetails({ + required this.paymentHash, + required this.bolt11, + this.payment, + }); + + @override + int get hashCode => paymentHash.hashCode ^ bolt11.hashCode ^ payment.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is InvoicePaidDetails && + runtimeType == other.runtimeType && + paymentHash == other.paymentHash && + bolt11 == other.bolt11 && + payment == other.payment; +} + +class PaymentFailedData { + final String error; + final String nodeId; + final LNInvoice? invoice; + + const PaymentFailedData({ + required this.error, + required this.nodeId, + this.invoice, + }); + + @override + int get hashCode => error.hashCode ^ nodeId.hashCode ^ invoice.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PaymentFailedData && + runtimeType == other.runtimeType && + error == other.error && + nodeId == other.nodeId && + invoice == other.invoice; +} + +/// Request to sign a message with the node's private key. +class SignMessageRequest { + /// The message to be signed by the node's private key. + final String message; + + const SignMessageRequest({ + required this.message, + }); + + @override + int get hashCode => message.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SignMessageRequest && runtimeType == other.runtimeType && message == other.message; +} + +/// Response to a [SignMessageRequest]. +class SignMessageResponse { + /// The signature that covers the message of SignMessageRequest. Zbase + /// encoded. + final String signature; + + const SignMessageResponse({ + required this.signature, + }); + + @override + int get hashCode => signature.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SignMessageResponse && runtimeType == other.runtimeType && signature == other.signature; +} diff --git a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart new file mode 100644 index 000000000..1076b7395 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart @@ -0,0 +1,1639 @@ +// 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 'breez_services.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 _$BreezEvent { + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $BreezEventCopyWith<$Res> { + factory $BreezEventCopyWith( + BreezEvent value, $Res Function(BreezEvent) then) = + _$BreezEventCopyWithImpl<$Res, BreezEvent>; +} + +/// @nodoc +class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> + implements $BreezEventCopyWith<$Res> { + _$BreezEventCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { + factory _$$BreezEvent_NewBlockImplCopyWith(_$BreezEvent_NewBlockImpl value, + $Res Function(_$BreezEvent_NewBlockImpl) then) = + __$$BreezEvent_NewBlockImplCopyWithImpl<$Res>; + @useResult + $Res call({int block}); +} + +/// @nodoc +class __$$BreezEvent_NewBlockImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_NewBlockImpl> + implements _$$BreezEvent_NewBlockImplCopyWith<$Res> { + __$$BreezEvent_NewBlockImplCopyWithImpl(_$BreezEvent_NewBlockImpl _value, + $Res Function(_$BreezEvent_NewBlockImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? block = null, + }) { + return _then(_$BreezEvent_NewBlockImpl( + block: null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as int, + )); + } +} + +/// @nodoc + +class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { + const _$BreezEvent_NewBlockImpl({required this.block}) : super._(); + + @override + final int block; + + @override + String toString() { + return 'BreezEvent.newBlock(block: $block)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_NewBlockImpl && + (identical(other.block, block) || other.block == block)); + } + + @override + int get hashCode => Object.hash(runtimeType, block); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => + __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return newBlock(block); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return newBlock?.call(block); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (newBlock != null) { + return newBlock(block); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return newBlock(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return newBlock?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (newBlock != null) { + return newBlock(this); + } + return orElse(); + } +} + +abstract class BreezEvent_NewBlock extends BreezEvent { + const factory BreezEvent_NewBlock({required final int block}) = + _$BreezEvent_NewBlockImpl; + const BreezEvent_NewBlock._() : super._(); + + int get block; + @JsonKey(ignore: true) + _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { + factory _$$BreezEvent_InvoicePaidImplCopyWith( + _$BreezEvent_InvoicePaidImpl value, + $Res Function(_$BreezEvent_InvoicePaidImpl) then) = + __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res>; + @useResult + $Res call({InvoicePaidDetails details}); +} + +/// @nodoc +class __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_InvoicePaidImpl> + implements _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { + __$$BreezEvent_InvoicePaidImplCopyWithImpl( + _$BreezEvent_InvoicePaidImpl _value, + $Res Function(_$BreezEvent_InvoicePaidImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_InvoicePaidImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as InvoicePaidDetails, + )); + } +} + +/// @nodoc + +class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { + const _$BreezEvent_InvoicePaidImpl({required this.details}) : super._(); + + @override + final InvoicePaidDetails details; + + @override + String toString() { + return 'BreezEvent.invoicePaid(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_InvoicePaidImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> + get copyWith => __$$BreezEvent_InvoicePaidImplCopyWithImpl< + _$BreezEvent_InvoicePaidImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return invoicePaid(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return invoicePaid?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (invoicePaid != null) { + return invoicePaid(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return invoicePaid(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return invoicePaid?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (invoicePaid != null) { + return invoicePaid(this); + } + return orElse(); + } +} + +abstract class BreezEvent_InvoicePaid extends BreezEvent { + const factory BreezEvent_InvoicePaid( + {required final InvoicePaidDetails details}) = + _$BreezEvent_InvoicePaidImpl; + const BreezEvent_InvoicePaid._() : super._(); + + InvoicePaidDetails get details; + @JsonKey(ignore: true) + _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { + factory _$$BreezEvent_SyncedImplCopyWith(_$BreezEvent_SyncedImpl value, + $Res Function(_$BreezEvent_SyncedImpl) then) = + __$$BreezEvent_SyncedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BreezEvent_SyncedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SyncedImpl> + implements _$$BreezEvent_SyncedImplCopyWith<$Res> { + __$$BreezEvent_SyncedImplCopyWithImpl(_$BreezEvent_SyncedImpl _value, + $Res Function(_$BreezEvent_SyncedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { + const _$BreezEvent_SyncedImpl() : super._(); + + @override + String toString() { + return 'BreezEvent.synced()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return synced(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return synced?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (synced != null) { + return synced(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return synced(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return synced?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (synced != null) { + return synced(this); + } + return orElse(); + } +} + +abstract class BreezEvent_Synced extends BreezEvent { + const factory BreezEvent_Synced() = _$BreezEvent_SyncedImpl; + const BreezEvent_Synced._() : super._(); +} + +/// @nodoc +abstract class _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { + factory _$$BreezEvent_PaymentSucceedImplCopyWith( + _$BreezEvent_PaymentSucceedImpl value, + $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = + __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res>; + @useResult + $Res call({Payment details}); +} + +/// @nodoc +class __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentSucceedImpl> + implements _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { + __$$BreezEvent_PaymentSucceedImplCopyWithImpl( + _$BreezEvent_PaymentSucceedImpl _value, + $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_PaymentSucceedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as Payment, + )); + } +} + +/// @nodoc + +class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { + const _$BreezEvent_PaymentSucceedImpl({required this.details}) : super._(); + + @override + final Payment details; + + @override + String toString() { + return 'BreezEvent.paymentSucceed(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_PaymentSucceedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> + get copyWith => __$$BreezEvent_PaymentSucceedImplCopyWithImpl< + _$BreezEvent_PaymentSucceedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return paymentSucceed(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return paymentSucceed?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (paymentSucceed != null) { + return paymentSucceed(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return paymentSucceed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return paymentSucceed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (paymentSucceed != null) { + return paymentSucceed(this); + } + return orElse(); + } +} + +abstract class BreezEvent_PaymentSucceed extends BreezEvent { + const factory BreezEvent_PaymentSucceed({required final Payment details}) = + _$BreezEvent_PaymentSucceedImpl; + const BreezEvent_PaymentSucceed._() : super._(); + + Payment get details; + @JsonKey(ignore: true) + _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { + factory _$$BreezEvent_PaymentFailedImplCopyWith( + _$BreezEvent_PaymentFailedImpl value, + $Res Function(_$BreezEvent_PaymentFailedImpl) then) = + __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res>; + @useResult + $Res call({PaymentFailedData details}); +} + +/// @nodoc +class __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentFailedImpl> + implements _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { + __$$BreezEvent_PaymentFailedImplCopyWithImpl( + _$BreezEvent_PaymentFailedImpl _value, + $Res Function(_$BreezEvent_PaymentFailedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_PaymentFailedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as PaymentFailedData, + )); + } +} + +/// @nodoc + +class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { + const _$BreezEvent_PaymentFailedImpl({required this.details}) : super._(); + + @override + final PaymentFailedData details; + + @override + String toString() { + return 'BreezEvent.paymentFailed(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_PaymentFailedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> + get copyWith => __$$BreezEvent_PaymentFailedImplCopyWithImpl< + _$BreezEvent_PaymentFailedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return paymentFailed(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return paymentFailed?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (paymentFailed != null) { + return paymentFailed(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return paymentFailed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return paymentFailed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (paymentFailed != null) { + return paymentFailed(this); + } + return orElse(); + } +} + +abstract class BreezEvent_PaymentFailed extends BreezEvent { + const factory BreezEvent_PaymentFailed( + {required final PaymentFailedData details}) = + _$BreezEvent_PaymentFailedImpl; + const BreezEvent_PaymentFailed._() : super._(); + + PaymentFailedData get details; + @JsonKey(ignore: true) + _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BreezEvent_BackupStartedImplCopyWith<$Res> { + factory _$$BreezEvent_BackupStartedImplCopyWith( + _$BreezEvent_BackupStartedImpl value, + $Res Function(_$BreezEvent_BackupStartedImpl) then) = + __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupStartedImpl> + implements _$$BreezEvent_BackupStartedImplCopyWith<$Res> { + __$$BreezEvent_BackupStartedImplCopyWithImpl( + _$BreezEvent_BackupStartedImpl _value, + $Res Function(_$BreezEvent_BackupStartedImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { + const _$BreezEvent_BackupStartedImpl() : super._(); + + @override + String toString() { + return 'BreezEvent.backupStarted()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_BackupStartedImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return backupStarted(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return backupStarted?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (backupStarted != null) { + return backupStarted(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return backupStarted(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return backupStarted?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (backupStarted != null) { + return backupStarted(this); + } + return orElse(); + } +} + +abstract class BreezEvent_BackupStarted extends BreezEvent { + const factory BreezEvent_BackupStarted() = _$BreezEvent_BackupStartedImpl; + const BreezEvent_BackupStarted._() : super._(); +} + +/// @nodoc +abstract class _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { + factory _$$BreezEvent_BackupSucceededImplCopyWith( + _$BreezEvent_BackupSucceededImpl value, + $Res Function(_$BreezEvent_BackupSucceededImpl) then) = + __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupSucceededImpl> + implements _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { + __$$BreezEvent_BackupSucceededImplCopyWithImpl( + _$BreezEvent_BackupSucceededImpl _value, + $Res Function(_$BreezEvent_BackupSucceededImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { + const _$BreezEvent_BackupSucceededImpl() : super._(); + + @override + String toString() { + return 'BreezEvent.backupSucceeded()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_BackupSucceededImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return backupSucceeded(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return backupSucceeded?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (backupSucceeded != null) { + return backupSucceeded(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return backupSucceeded(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return backupSucceeded?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (backupSucceeded != null) { + return backupSucceeded(this); + } + return orElse(); + } +} + +abstract class BreezEvent_BackupSucceeded extends BreezEvent { + const factory BreezEvent_BackupSucceeded() = _$BreezEvent_BackupSucceededImpl; + const BreezEvent_BackupSucceeded._() : super._(); +} + +/// @nodoc +abstract class _$$BreezEvent_BackupFailedImplCopyWith<$Res> { + factory _$$BreezEvent_BackupFailedImplCopyWith( + _$BreezEvent_BackupFailedImpl value, + $Res Function(_$BreezEvent_BackupFailedImpl) then) = + __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res>; + @useResult + $Res call({BackupFailedData details}); +} + +/// @nodoc +class __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupFailedImpl> + implements _$$BreezEvent_BackupFailedImplCopyWith<$Res> { + __$$BreezEvent_BackupFailedImplCopyWithImpl( + _$BreezEvent_BackupFailedImpl _value, + $Res Function(_$BreezEvent_BackupFailedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_BackupFailedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as BackupFailedData, + )); + } +} + +/// @nodoc + +class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { + const _$BreezEvent_BackupFailedImpl({required this.details}) : super._(); + + @override + final BackupFailedData details; + + @override + String toString() { + return 'BreezEvent.backupFailed(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_BackupFailedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> + get copyWith => __$$BreezEvent_BackupFailedImplCopyWithImpl< + _$BreezEvent_BackupFailedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return backupFailed(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return backupFailed?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (backupFailed != null) { + return backupFailed(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return backupFailed(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return backupFailed?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (backupFailed != null) { + return backupFailed(this); + } + return orElse(); + } +} + +abstract class BreezEvent_BackupFailed extends BreezEvent { + const factory BreezEvent_BackupFailed( + {required final BackupFailedData details}) = + _$BreezEvent_BackupFailedImpl; + const BreezEvent_BackupFailed._() : super._(); + + BackupFailedData get details; + @JsonKey(ignore: true) + _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { + factory _$$BreezEvent_SwapUpdatedImplCopyWith( + _$BreezEvent_SwapUpdatedImpl value, + $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = + __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res>; + @useResult + $Res call({SwapInfo details}); +} + +/// @nodoc +class __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SwapUpdatedImpl> + implements _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { + __$$BreezEvent_SwapUpdatedImplCopyWithImpl( + _$BreezEvent_SwapUpdatedImpl _value, + $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_SwapUpdatedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as SwapInfo, + )); + } +} + +/// @nodoc + +class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { + const _$BreezEvent_SwapUpdatedImpl({required this.details}) : super._(); + + @override + final SwapInfo details; + + @override + String toString() { + return 'BreezEvent.swapUpdated(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_SwapUpdatedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> + get copyWith => __$$BreezEvent_SwapUpdatedImplCopyWithImpl< + _$BreezEvent_SwapUpdatedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return swapUpdated(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return swapUpdated?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (swapUpdated != null) { + return swapUpdated(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return swapUpdated(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return swapUpdated?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (swapUpdated != null) { + return swapUpdated(this); + } + return orElse(); + } +} + +abstract class BreezEvent_SwapUpdated extends BreezEvent { + const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = + _$BreezEvent_SwapUpdatedImpl; + const BreezEvent_SwapUpdated._() : super._(); + + SwapInfo get details; + @JsonKey(ignore: true) + _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart new file mode 100644 index 000000000..70580fc0a --- /dev/null +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -0,0 +1,43 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Wrapper containing the result of the recommended fees query, in sat/vByte, based on mempool.space data +class RecommendedFees { + final int fastestFee; + final int halfHourFee; + final int hourFee; + final int economyFee; + final int minimumFee; + + const RecommendedFees({ + required this.fastestFee, + required this.halfHourFee, + required this.hourFee, + required this.economyFee, + required this.minimumFee, + }); + + @override + int get hashCode => + fastestFee.hashCode ^ + halfHourFee.hashCode ^ + hourFee.hashCode ^ + economyFee.hashCode ^ + minimumFee.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RecommendedFees && + runtimeType == other.runtimeType && + fastestFee == other.fastestFee && + halfHourFee == other.halfHourFee && + hourFee == other.hourFee && + economyFee == other.economyFee && + minimumFee == other.minimumFee; +} diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart new file mode 100644 index 000000000..27046c783 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/fiat.dart @@ -0,0 +1,164 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Details about a supported currency in the fiat rate feed +class CurrencyInfo { + final String name; + final int fractionSize; + final int? spacing; + final Symbol? symbol; + final Symbol? uniqSymbol; + final List? localizedName; + final List? localeOverrides; + + const CurrencyInfo({ + required this.name, + required this.fractionSize, + this.spacing, + this.symbol, + this.uniqSymbol, + this.localizedName, + this.localeOverrides, + }); + + @override + int get hashCode => + name.hashCode ^ + fractionSize.hashCode ^ + spacing.hashCode ^ + symbol.hashCode ^ + uniqSymbol.hashCode ^ + localizedName.hashCode ^ + localeOverrides.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is CurrencyInfo && + runtimeType == other.runtimeType && + name == other.name && + fractionSize == other.fractionSize && + spacing == other.spacing && + symbol == other.symbol && + uniqSymbol == other.uniqSymbol && + localizedName == other.localizedName && + localeOverrides == other.localeOverrides; +} + +/// Wrapper around the [CurrencyInfo] of a fiat currency +class FiatCurrency { + final String id; + final CurrencyInfo info; + + const FiatCurrency({ + required this.id, + required this.info, + }); + + @override + int get hashCode => id.hashCode ^ info.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FiatCurrency && runtimeType == other.runtimeType && id == other.id && info == other.info; +} + +/// Locale-specific settings for the representation of a currency +class LocaleOverrides { + final String locale; + final int? spacing; + final Symbol symbol; + + const LocaleOverrides({ + required this.locale, + this.spacing, + required this.symbol, + }); + + @override + int get hashCode => locale.hashCode ^ spacing.hashCode ^ symbol.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LocaleOverrides && + runtimeType == other.runtimeType && + locale == other.locale && + spacing == other.spacing && + symbol == other.symbol; +} + +/// Localized name of a currency +class LocalizedName { + final String locale; + final String name; + + const LocalizedName({ + required this.locale, + required this.name, + }); + + @override + int get hashCode => locale.hashCode ^ name.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LocalizedName && + runtimeType == other.runtimeType && + locale == other.locale && + name == other.name; +} + +/// Denominator in an exchange rate +class Rate { + final String coin; + final double value; + + const Rate({ + required this.coin, + required this.value, + }); + + @override + int get hashCode => coin.hashCode ^ value.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Rate && runtimeType == other.runtimeType && coin == other.coin && value == other.value; +} + +/// Settings for the symbol representation of a currency +class Symbol { + final String? grapheme; + final String? template; + final bool? rtl; + final int? position; + + const Symbol({ + this.grapheme, + this.template, + this.rtl, + this.position, + }); + + @override + int get hashCode => grapheme.hashCode ^ template.hashCode ^ rtl.hashCode ^ position.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Symbol && + runtimeType == other.runtimeType && + grapheme == other.grapheme && + template == other.template && + rtl == other.rtl && + position == other.position; +} diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart new file mode 100644 index 000000000..85cb02d2a --- /dev/null +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -0,0 +1,7614 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// 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 'binding.dart'; +import 'breez_services.dart'; +import 'chain.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'fiat.dart'; +import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; +import 'input_parser.dart'; +import 'invoice.dart'; +import 'lnurl/pay/model.dart'; +import 'lsp.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Main entrypoint of the Rust API +class BreezSdkBindings + extends BaseEntrypoint { + @internal + static final instance = BreezSdkBindings._(); + + BreezSdkBindings._(); + + /// Initialize flutter_rust_bridge + static Future init({ + BreezSdkBindingsApi? api, + BaseHandler? handler, + ExternalLibrary? externalLibrary, + }) async { + await instance.initImpl( + api: api, + handler: handler, + externalLibrary: externalLibrary, + ); + } + + /// Dispose flutter_rust_bridge + /// + /// The call to this function is optional, since flutter_rust_bridge (and everything else) + /// is automatically disposed when the app stops. + static void dispose() => instance.disposeImpl(); + + @override + ApiImplConstructor get apiImplConstructor => + BreezSdkBindingsApiImpl.new; + + @override + WireConstructor get wireConstructor => BreezSdkBindingsWire.fromExternalLibrary; + + @override + Future executeRustInitializers() async {} + + @override + ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; + + @override + String get codegenVersion => '2.0.0-dev.32'; + + @override + int get rustContentHash => -924313952; + + static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( + stem: 'breez_sdk_core', + ioDirectory: '../sdk-core/target/release/', + webPrefix: 'pkg/', + ); +} + +abstract class BreezSdkBindingsApi extends BaseApi { + Future backup({dynamic hint}); + + Future backupStatus({dynamic hint}); + + Stream breezEventsStream({dynamic hint}); + + Stream breezLogStream({dynamic hint}); + + Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}); + + Future checkMessage({required CheckMessageRequest req, dynamic hint}); + + Future closeLspChannels({dynamic hint}); + + Future configureNode({required ConfigureNodeRequest req, dynamic hint}); + + Future connect({required ConnectRequest req, dynamic hint}); + + Future connectLsp({required String lspId, dynamic hint}); + + Future defaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}); + + Future disconnect({dynamic hint}); + + Future executeCommand({required String command, dynamic hint}); + + Future> fetchFiatRates({dynamic hint}); + + Future fetchLspInfo({required String id, dynamic hint}); + + Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}); + + Future generateDiagnosticData({dynamic hint}); + + Future> inProgressOnchainPayments({dynamic hint}); + + Future> inProgressReverseSwaps({dynamic hint}); + + Future inProgressSwap({dynamic hint}); + + Future isInitialized({dynamic hint}); + + Future> listFiatCurrencies({dynamic hint}); + + Future> listLsps({dynamic hint}); + + Future> listPayments({required ListPaymentsRequest req, dynamic hint}); + + Future> listRefundables({dynamic hint}); + + Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); + + Future lnurlPay({required LnUrlPayRequest req, dynamic hint}); + + Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); + + Future lspId({dynamic hint}); + + Future lspInfo({dynamic hint}); + + Future maxReverseSwapAmount({dynamic hint}); + + Future mnemonicToSeed({required String phrase, dynamic hint}); + + Future nodeCredentials({dynamic hint}); + + Future nodeInfo({dynamic hint}); + + Future onchainPaymentLimits({dynamic hint}); + + Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}); + + Future parseInput({required String input, dynamic hint}); + + Future parseInvoice({required String invoice, dynamic hint}); + + Future payOnchain({required PayOnchainRequest req, dynamic hint}); + + Future paymentByHash({required String hash, dynamic hint}); + + Future prepareOnchainPayment( + {required PrepareOnchainPaymentRequest req, dynamic hint}); + + Future prepareRedeemOnchainFunds( + {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); + + Future prepareRefund({required PrepareRefundRequest req, dynamic hint}); + + Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); + + Future receivePayment({required ReceivePaymentRequest req, dynamic hint}); + + Future recommendedFees({dynamic hint}); + + Future redeemOnchainFunds( + {required RedeemOnchainFundsRequest req, dynamic hint}); + + Future redeemSwap({required String swapAddress, dynamic hint}); + + Future refund({required RefundRequest req, dynamic hint}); + + Future registerWebhook({required String webhookUrl, dynamic hint}); + + Future reportIssue({required ReportIssueRequest req, dynamic hint}); + + Future rescanSwaps({dynamic hint}); + + Future sendOnchain({required SendOnchainRequest req, dynamic hint}); + + Future sendPayment({required SendPaymentRequest req, dynamic hint}); + + Future sendSpontaneousPayment( + {required SendSpontaneousPaymentRequest req, dynamic hint}); + + Future serviceHealthCheck({required String apiKey, dynamic hint}); + + Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}); + + Future signMessage({required SignMessageRequest req, dynamic hint}); + + Future staticBackup({required StaticBackupRequest req, dynamic hint}); + + Future sync({dynamic hint}); +} + +class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { + BreezSdkBindingsApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override + Future backup({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_backup(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kBackupConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBackupConstMeta => const TaskConstMeta( + debugName: "backup", + argNames: [], + ); + + @override + Future backupStatus({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_backup_status(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_backup_status, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kBackupStatusConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBackupStatusConstMeta => const TaskConstMeta( + debugName: "backup_status", + argNames: [], + ); + + @override + Stream breezEventsStream({dynamic hint}) { + final s = RustStreamSink(); + unawaited(handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_StreamSink_breez_event_Dco(s); + return wire.wire_breez_events_stream(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kBreezEventsStreamConstMeta, + argValues: [s], + apiImpl: this, + hint: hint, + ))); + return s.stream; + } + + TaskConstMeta get kBreezEventsStreamConstMeta => const TaskConstMeta( + debugName: "breez_events_stream", + argNames: ["s"], + ); + + @override + Stream breezLogStream({dynamic hint}) { + final s = RustStreamSink(); + unawaited(handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_StreamSink_log_entry_Dco(s); + return wire.wire_breez_log_stream(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kBreezLogStreamConstMeta, + argValues: [s], + apiImpl: this, + hint: hint, + ))); + return s.stream; + } + + TaskConstMeta get kBreezLogStreamConstMeta => const TaskConstMeta( + debugName: "breez_log_stream", + argNames: ["s"], + ); + + @override + Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_buy_bitcoin_request(req); + return wire.wire_buy_bitcoin(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_buy_bitcoin_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kBuyBitcoinConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kBuyBitcoinConstMeta => const TaskConstMeta( + debugName: "buy_bitcoin", + argNames: ["req"], + ); + + @override + Future checkMessage({required CheckMessageRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_check_message_request(req); + return wire.wire_check_message(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_check_message_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCheckMessageConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCheckMessageConstMeta => const TaskConstMeta( + debugName: "check_message", + argNames: ["req"], + ); + + @override + Future closeLspChannels({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_close_lsp_channels(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCloseLspChannelsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCloseLspChannelsConstMeta => const TaskConstMeta( + debugName: "close_lsp_channels", + argNames: [], + ); + + @override + Future configureNode({required ConfigureNodeRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_configure_node_request(req); + return wire.wire_configure_node(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kConfigureNodeConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kConfigureNodeConstMeta => const TaskConstMeta( + debugName: "configure_node", + argNames: ["req"], + ); + + @override + Future connect({required ConnectRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_connect_request(req); + return wire.wire_connect(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kConnectConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kConnectConstMeta => const TaskConstMeta( + debugName: "connect", + argNames: ["req"], + ); + + @override + Future connectLsp({required String lspId, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(lspId); + return wire.wire_connect_lsp(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kConnectLspConstMeta, + argValues: [lspId], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kConnectLspConstMeta => const TaskConstMeta( + debugName: "connect_lsp", + argNames: ["lspId"], + ); + + @override + Future defaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_environment_type(envType); + var arg1 = cst_encode_String(apiKey); + var arg2 = cst_encode_box_autoadd_node_config(nodeConfig); + return wire.wire_default_config(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_config, + decodeErrorData: null, + ), + constMeta: kDefaultConfigConstMeta, + argValues: [envType, apiKey, nodeConfig], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kDefaultConfigConstMeta => const TaskConstMeta( + debugName: "default_config", + argNames: ["envType", "apiKey", "nodeConfig"], + ); + + @override + Future disconnect({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_disconnect(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kDisconnectConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kDisconnectConstMeta => const TaskConstMeta( + debugName: "disconnect", + argNames: [], + ); + + @override + Future executeCommand({required String command, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(command); + return wire.wire_execute_command(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kExecuteCommandConstMeta, + argValues: [command], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kExecuteCommandConstMeta => const TaskConstMeta( + debugName: "execute_command", + argNames: ["command"], + ); + + @override + Future> fetchFiatRates({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_fetch_fiat_rates(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_rate, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kFetchFiatRatesConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kFetchFiatRatesConstMeta => const TaskConstMeta( + debugName: "fetch_fiat_rates", + argNames: [], + ); + + @override + Future fetchLspInfo({required String id, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(id); + return wire.wire_fetch_lsp_info(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kFetchLspInfoConstMeta, + argValues: [id], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kFetchLspInfoConstMeta => const TaskConstMeta( + debugName: "fetch_lsp_info", + argNames: ["id"], + ); + + @override + Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_reverse_swap_fees_request(req); + return wire.wire_fetch_reverse_swap_fees(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_reverse_swap_pair_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kFetchReverseSwapFeesConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kFetchReverseSwapFeesConstMeta => const TaskConstMeta( + debugName: "fetch_reverse_swap_fees", + argNames: ["req"], + ); + + @override + Future generateDiagnosticData({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_generate_diagnostic_data(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kGenerateDiagnosticDataConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kGenerateDiagnosticDataConstMeta => const TaskConstMeta( + debugName: "generate_diagnostic_data", + argNames: [], + ); + + @override + Future> inProgressOnchainPayments({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_in_progress_onchain_payments(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kInProgressOnchainPaymentsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kInProgressOnchainPaymentsConstMeta => const TaskConstMeta( + debugName: "in_progress_onchain_payments", + argNames: [], + ); + + @override + Future> inProgressReverseSwaps({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_in_progress_reverse_swaps(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kInProgressReverseSwapsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kInProgressReverseSwapsConstMeta => const TaskConstMeta( + debugName: "in_progress_reverse_swaps", + argNames: [], + ); + + @override + Future inProgressSwap({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_in_progress_swap(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kInProgressSwapConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kInProgressSwapConstMeta => const TaskConstMeta( + debugName: "in_progress_swap", + argNames: [], + ); + + @override + Future isInitialized({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_is_initialized(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_bool, + decodeErrorData: null, + ), + constMeta: kIsInitializedConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kIsInitializedConstMeta => const TaskConstMeta( + debugName: "is_initialized", + argNames: [], + ); + + @override + Future> listFiatCurrencies({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_list_fiat_currencies(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_fiat_currency, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kListFiatCurrenciesConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kListFiatCurrenciesConstMeta => const TaskConstMeta( + debugName: "list_fiat_currencies", + argNames: [], + ); + + @override + Future> listLsps({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_list_lsps(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kListLspsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kListLspsConstMeta => const TaskConstMeta( + debugName: "list_lsps", + argNames: [], + ); + + @override + Future> listPayments({required ListPaymentsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_list_payments_request(req); + return wire.wire_list_payments(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_payment, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kListPaymentsConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kListPaymentsConstMeta => const TaskConstMeta( + debugName: "list_payments", + argNames: ["req"], + ); + + @override + Future> listRefundables({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_list_refundables(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kListRefundablesConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kListRefundablesConstMeta => const TaskConstMeta( + debugName: "list_refundables", + argNames: [], + ); + + @override + Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); + return wire.wire_lnurl_auth(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_callback_status, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kLnurlAuthConstMeta, + argValues: [reqData], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kLnurlAuthConstMeta => const TaskConstMeta( + debugName: "lnurl_auth", + argNames: ["reqData"], + ); + + @override + Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ln_url_pay_request(req); + return wire.wire_lnurl_pay(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_pay_result, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kLnurlPayConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kLnurlPayConstMeta => const TaskConstMeta( + debugName: "lnurl_pay", + argNames: ["req"], + ); + + @override + Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_ln_url_withdraw_request(req); + return wire.wire_lnurl_withdraw(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_withdraw_result, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kLnurlWithdrawConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kLnurlWithdrawConstMeta => const TaskConstMeta( + debugName: "lnurl_withdraw", + argNames: ["req"], + ); + + @override + Future lspId({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_lsp_id(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kLspIdConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kLspIdConstMeta => const TaskConstMeta( + debugName: "lsp_id", + argNames: [], + ); + + @override + Future lspInfo({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_lsp_info(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kLspInfoConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kLspInfoConstMeta => const TaskConstMeta( + debugName: "lsp_info", + argNames: [], + ); + + @override + Future maxReverseSwapAmount({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_max_reverse_swap_amount(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_max_reverse_swap_amount_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kMaxReverseSwapAmountConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kMaxReverseSwapAmountConstMeta => const TaskConstMeta( + debugName: "max_reverse_swap_amount", + argNames: [], + ); + + @override + Future mnemonicToSeed({required String phrase, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(phrase); + return wire.wire_mnemonic_to_seed(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kMnemonicToSeedConstMeta, + argValues: [phrase], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kMnemonicToSeedConstMeta => const TaskConstMeta( + debugName: "mnemonic_to_seed", + argNames: ["phrase"], + ); + + @override + Future nodeCredentials({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_node_credentials(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_node_credentials, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kNodeCredentialsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kNodeCredentialsConstMeta => const TaskConstMeta( + debugName: "node_credentials", + argNames: [], + ); + + @override + Future nodeInfo({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_node_info(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_node_state, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kNodeInfoConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kNodeInfoConstMeta => const TaskConstMeta( + debugName: "node_info", + argNames: [], + ); + + @override + Future onchainPaymentLimits({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_onchain_payment_limits(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_onchain_payment_limits_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kOnchainPaymentLimitsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kOnchainPaymentLimitsConstMeta => const TaskConstMeta( + debugName: "onchain_payment_limits", + argNames: [], + ); + + @override + Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_open_channel_fee_request(req); + return wire.wire_open_channel_fee(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_open_channel_fee_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kOpenChannelFeeConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kOpenChannelFeeConstMeta => const TaskConstMeta( + debugName: "open_channel_fee", + argNames: ["req"], + ); + + @override + Future parseInput({required String input, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(input); + return wire.wire_parse_input(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_input_type, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kParseInputConstMeta, + argValues: [input], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kParseInputConstMeta => const TaskConstMeta( + debugName: "parse_input", + argNames: ["input"], + ); + + @override + Future parseInvoice({required String invoice, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(invoice); + return wire.wire_parse_invoice(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_invoice, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kParseInvoiceConstMeta, + argValues: [invoice], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kParseInvoiceConstMeta => const TaskConstMeta( + debugName: "parse_invoice", + argNames: ["invoice"], + ); + + @override + Future payOnchain({required PayOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_pay_onchain_request(req); + return wire.wire_pay_onchain(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_pay_onchain_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kPayOnchainConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kPayOnchainConstMeta => const TaskConstMeta( + debugName: "pay_onchain", + argNames: ["req"], + ); + + @override + Future paymentByHash({required String hash, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(hash); + return wire.wire_payment_by_hash(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_payment, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kPaymentByHashConstMeta, + argValues: [hash], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kPaymentByHashConstMeta => const TaskConstMeta( + debugName: "payment_by_hash", + argNames: ["hash"], + ); + + @override + Future prepareOnchainPayment( + {required PrepareOnchainPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); + return wire.wire_prepare_onchain_payment(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_onchain_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kPrepareOnchainPaymentConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kPrepareOnchainPaymentConstMeta => const TaskConstMeta( + debugName: "prepare_onchain_payment", + argNames: ["req"], + ); + + @override + Future prepareRedeemOnchainFunds( + {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); + return wire.wire_prepare_redeem_onchain_funds(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_redeem_onchain_funds_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kPrepareRedeemOnchainFundsConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kPrepareRedeemOnchainFundsConstMeta => const TaskConstMeta( + debugName: "prepare_redeem_onchain_funds", + argNames: ["req"], + ); + + @override + Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_prepare_refund_request(req); + return wire.wire_prepare_refund(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_refund_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kPrepareRefundConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kPrepareRefundConstMeta => const TaskConstMeta( + debugName: "prepare_refund", + argNames: ["req"], + ); + + @override + Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_receive_onchain_request(req); + return wire.wire_receive_onchain(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kReceiveOnchainConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kReceiveOnchainConstMeta => const TaskConstMeta( + debugName: "receive_onchain", + argNames: ["req"], + ); + + @override + Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_receive_payment_request(req); + return wire.wire_receive_payment(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_receive_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kReceivePaymentConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kReceivePaymentConstMeta => const TaskConstMeta( + debugName: "receive_payment", + argNames: ["req"], + ); + + @override + Future recommendedFees({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_recommended_fees(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_recommended_fees, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRecommendedFeesConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRecommendedFeesConstMeta => const TaskConstMeta( + debugName: "recommended_fees", + argNames: [], + ); + + @override + Future redeemOnchainFunds( + {required RedeemOnchainFundsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); + return wire.wire_redeem_onchain_funds(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_redeem_onchain_funds_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRedeemOnchainFundsConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRedeemOnchainFundsConstMeta => const TaskConstMeta( + debugName: "redeem_onchain_funds", + argNames: ["req"], + ); + + @override + Future redeemSwap({required String swapAddress, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(swapAddress); + return wire.wire_redeem_swap(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRedeemSwapConstMeta, + argValues: [swapAddress], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRedeemSwapConstMeta => const TaskConstMeta( + debugName: "redeem_swap", + argNames: ["swapAddress"], + ); + + @override + Future refund({required RefundRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_refund_request(req); + return wire.wire_refund(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_refund_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRefundConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRefundConstMeta => const TaskConstMeta( + debugName: "refund", + argNames: ["req"], + ); + + @override + Future registerWebhook({required String webhookUrl, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(webhookUrl); + return wire.wire_register_webhook(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRegisterWebhookConstMeta, + argValues: [webhookUrl], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRegisterWebhookConstMeta => const TaskConstMeta( + debugName: "register_webhook", + argNames: ["webhookUrl"], + ); + + @override + Future reportIssue({required ReportIssueRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_report_issue_request(req); + return wire.wire_report_issue(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kReportIssueConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kReportIssueConstMeta => const TaskConstMeta( + debugName: "report_issue", + argNames: ["req"], + ); + + @override + Future rescanSwaps({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_rescan_swaps(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kRescanSwapsConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kRescanSwapsConstMeta => const TaskConstMeta( + debugName: "rescan_swaps", + argNames: [], + ); + + @override + Future sendOnchain({required SendOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_send_onchain_request(req); + return wire.wire_send_onchain(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_onchain_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSendOnchainConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSendOnchainConstMeta => const TaskConstMeta( + debugName: "send_onchain", + argNames: ["req"], + ); + + @override + Future sendPayment({required SendPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_send_payment_request(req); + return wire.wire_send_payment(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSendPaymentConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSendPaymentConstMeta => const TaskConstMeta( + debugName: "send_payment", + argNames: ["req"], + ); + + @override + Future sendSpontaneousPayment( + {required SendSpontaneousPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); + return wire.wire_send_spontaneous_payment(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSendSpontaneousPaymentConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSendSpontaneousPaymentConstMeta => const TaskConstMeta( + debugName: "send_spontaneous_payment", + argNames: ["req"], + ); + + @override + Future serviceHealthCheck({required String apiKey, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(apiKey); + return wire.wire_service_health_check(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_service_health_check_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kServiceHealthCheckConstMeta, + argValues: [apiKey], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kServiceHealthCheckConstMeta => const TaskConstMeta( + debugName: "service_health_check", + argNames: ["apiKey"], + ); + + @override + Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(hash); + var arg1 = cst_encode_String(metadata); + return wire.wire_set_payment_metadata(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSetPaymentMetadataConstMeta, + argValues: [hash, metadata], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSetPaymentMetadataConstMeta => const TaskConstMeta( + debugName: "set_payment_metadata", + argNames: ["hash", "metadata"], + ); + + @override + Future signMessage({required SignMessageRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_sign_message_request(req); + return wire.wire_sign_message(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_sign_message_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSignMessageConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSignMessageConstMeta => const TaskConstMeta( + debugName: "sign_message", + argNames: ["req"], + ); + + @override + Future staticBackup({required StaticBackupRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_static_backup_request(req); + return wire.wire_static_backup(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_static_backup_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kStaticBackupConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kStaticBackupConstMeta => const TaskConstMeta( + debugName: "static_backup", + argNames: ["req"], + ); + + @override + Future sync({dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + return wire.wire_sync(port_); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kSyncConstMeta, + argValues: [], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kSyncConstMeta => const TaskConstMeta( + debugName: "sync", + argNames: [], + ); + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyhowException(raw as String); + } + + @protected + RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(); + } + + @protected + RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + throw UnimplementedError(); + } + + @protected + String dco_decode_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as String; + } + + @protected + AesSuccessActionDataDecrypted dco_decode_aes_success_action_data_decrypted(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 AesSuccessActionDataDecrypted( + description: dco_decode_String(arr[0]), + plaintext: dco_decode_String(arr[1]), + ); + } + + @protected + AesSuccessActionDataResult dco_decode_aes_success_action_data_result(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return AesSuccessActionDataResult_Decrypted( + data: dco_decode_box_autoadd_aes_success_action_data_decrypted(raw[1]), + ); + case 1: + return AesSuccessActionDataResult_ErrorStatus( + reason: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + BackupFailedData dco_decode_backup_failed_data(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 BackupFailedData( + error: dco_decode_String(arr[0]), + ); + } + + @protected + BackupStatus dco_decode_backup_status(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 BackupStatus( + backedUp: dco_decode_bool(arr[0]), + lastBackupTime: dco_decode_opt_box_autoadd_u_64(arr[1]), + ); + } + + @protected + BitcoinAddressData dco_decode_bitcoin_address_data(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 BitcoinAddressData( + address: dco_decode_String(arr[0]), + network: dco_decode_network(arr[1]), + amountSat: dco_decode_opt_box_autoadd_u_64(arr[2]), + label: dco_decode_opt_String(arr[3]), + message: dco_decode_opt_String(arr[4]), + ); + } + + @protected + bool dco_decode_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + AesSuccessActionDataDecrypted dco_decode_box_autoadd_aes_success_action_data_decrypted(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_aes_success_action_data_decrypted(raw); + } + + @protected + AesSuccessActionDataResult dco_decode_box_autoadd_aes_success_action_data_result(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_aes_success_action_data_result(raw); + } + + @protected + BackupFailedData dco_decode_box_autoadd_backup_failed_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_backup_failed_data(raw); + } + + @protected + BitcoinAddressData dco_decode_box_autoadd_bitcoin_address_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_bitcoin_address_data(raw); + } + + @protected + bool dco_decode_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as bool; + } + + @protected + BuyBitcoinRequest dco_decode_box_autoadd_buy_bitcoin_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_buy_bitcoin_request(raw); + } + + @protected + CheckMessageRequest dco_decode_box_autoadd_check_message_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_check_message_request(raw); + } + + @protected + ClosedChannelPaymentDetails dco_decode_box_autoadd_closed_channel_payment_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_closed_channel_payment_details(raw); + } + + @protected + ConfigureNodeRequest dco_decode_box_autoadd_configure_node_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_configure_node_request(raw); + } + + @protected + ConnectRequest dco_decode_box_autoadd_connect_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_connect_request(raw); + } + + @protected + GreenlightCredentials dco_decode_box_autoadd_greenlight_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_greenlight_credentials(raw); + } + + @protected + GreenlightNodeConfig dco_decode_box_autoadd_greenlight_node_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_greenlight_node_config(raw); + } + + @protected + int dco_decode_box_autoadd_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_i_64(raw); + } + + @protected + InvoicePaidDetails dco_decode_box_autoadd_invoice_paid_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_invoice_paid_details(raw); + } + + @protected + ListPaymentsRequest dco_decode_box_autoadd_list_payments_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_list_payments_request(raw); + } + + @protected + LNInvoice dco_decode_box_autoadd_ln_invoice(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_invoice(raw); + } + + @protected + LnPaymentDetails dco_decode_box_autoadd_ln_payment_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_payment_details(raw); + } + + @protected + LnUrlAuthRequestData dco_decode_box_autoadd_ln_url_auth_request_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_auth_request_data(raw); + } + + @protected + LnUrlErrorData dco_decode_box_autoadd_ln_url_error_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_error_data(raw); + } + + @protected + LnUrlPayErrorData dco_decode_box_autoadd_ln_url_pay_error_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_error_data(raw); + } + + @protected + LnUrlPayRequest dco_decode_box_autoadd_ln_url_pay_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_request(raw); + } + + @protected + LnUrlPayRequestData dco_decode_box_autoadd_ln_url_pay_request_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_request_data(raw); + } + + @protected + LnUrlPaySuccessData dco_decode_box_autoadd_ln_url_pay_success_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_success_data(raw); + } + + @protected + LnUrlWithdrawRequest dco_decode_box_autoadd_ln_url_withdraw_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_withdraw_request(raw); + } + + @protected + LnUrlWithdrawRequestData dco_decode_box_autoadd_ln_url_withdraw_request_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_withdraw_request_data(raw); + } + + @protected + LnUrlWithdrawSuccessData dco_decode_box_autoadd_ln_url_withdraw_success_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_withdraw_success_data(raw); + } + + @protected + LspInformation dco_decode_box_autoadd_lsp_information(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_lsp_information(raw); + } + + @protected + MessageSuccessActionData dco_decode_box_autoadd_message_success_action_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_message_success_action_data(raw); + } + + @protected + NodeConfig dco_decode_box_autoadd_node_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_node_config(raw); + } + + @protected + NodeCredentials dco_decode_box_autoadd_node_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_node_credentials(raw); + } + + @protected + OpenChannelFeeRequest dco_decode_box_autoadd_open_channel_fee_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_open_channel_fee_request(raw); + } + + @protected + OpeningFeeParams dco_decode_box_autoadd_opening_fee_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_opening_fee_params(raw); + } + + @protected + PayOnchainRequest dco_decode_box_autoadd_pay_onchain_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_pay_onchain_request(raw); + } + + @protected + Payment dco_decode_box_autoadd_payment(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_payment(raw); + } + + @protected + PaymentFailedData dco_decode_box_autoadd_payment_failed_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_payment_failed_data(raw); + } + + @protected + PrepareOnchainPaymentRequest dco_decode_box_autoadd_prepare_onchain_payment_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_prepare_onchain_payment_request(raw); + } + + @protected + PrepareRedeemOnchainFundsRequest dco_decode_box_autoadd_prepare_redeem_onchain_funds_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_prepare_redeem_onchain_funds_request(raw); + } + + @protected + PrepareRefundRequest dco_decode_box_autoadd_prepare_refund_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_prepare_refund_request(raw); + } + + @protected + ReceiveOnchainRequest dco_decode_box_autoadd_receive_onchain_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_receive_onchain_request(raw); + } + + @protected + ReceivePaymentRequest dco_decode_box_autoadd_receive_payment_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_receive_payment_request(raw); + } + + @protected + RedeemOnchainFundsRequest dco_decode_box_autoadd_redeem_onchain_funds_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_redeem_onchain_funds_request(raw); + } + + @protected + RefundRequest dco_decode_box_autoadd_refund_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_refund_request(raw); + } + + @protected + ReportIssueRequest dco_decode_box_autoadd_report_issue_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_report_issue_request(raw); + } + + @protected + ReportPaymentFailureDetails dco_decode_box_autoadd_report_payment_failure_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_report_payment_failure_details(raw); + } + + @protected + ReverseSwapFeesRequest dco_decode_box_autoadd_reverse_swap_fees_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_reverse_swap_fees_request(raw); + } + + @protected + ReverseSwapInfo dco_decode_box_autoadd_reverse_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_reverse_swap_info(raw); + } + + @protected + SendOnchainRequest dco_decode_box_autoadd_send_onchain_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_send_onchain_request(raw); + } + + @protected + SendPaymentRequest dco_decode_box_autoadd_send_payment_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_send_payment_request(raw); + } + + @protected + SendSpontaneousPaymentRequest dco_decode_box_autoadd_send_spontaneous_payment_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_send_spontaneous_payment_request(raw); + } + + @protected + SignMessageRequest dco_decode_box_autoadd_sign_message_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_sign_message_request(raw); + } + + @protected + StaticBackupRequest dco_decode_box_autoadd_static_backup_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_static_backup_request(raw); + } + + @protected + SuccessActionProcessed dco_decode_box_autoadd_success_action_processed(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_success_action_processed(raw); + } + + @protected + SwapInfo dco_decode_box_autoadd_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_swap_info(raw); + } + + @protected + Symbol dco_decode_box_autoadd_symbol(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_symbol(raw); + } + + @protected + int dco_decode_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + int dco_decode_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_u_64(raw); + } + + @protected + UrlSuccessActionData dco_decode_box_autoadd_url_success_action_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_url_success_action_data(raw); + } + + @protected + BreezEvent dco_decode_breez_event(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return BreezEvent_NewBlock( + block: dco_decode_u_32(raw[1]), + ); + case 1: + return BreezEvent_InvoicePaid( + details: dco_decode_box_autoadd_invoice_paid_details(raw[1]), + ); + case 2: + return BreezEvent_Synced(); + case 3: + return BreezEvent_PaymentSucceed( + details: dco_decode_box_autoadd_payment(raw[1]), + ); + case 4: + return BreezEvent_PaymentFailed( + details: dco_decode_box_autoadd_payment_failed_data(raw[1]), + ); + case 5: + return BreezEvent_BackupStarted(); + case 6: + return BreezEvent_BackupSucceeded(); + case 7: + return BreezEvent_BackupFailed( + details: dco_decode_box_autoadd_backup_failed_data(raw[1]), + ); + case 8: + return BreezEvent_SwapUpdated( + details: dco_decode_box_autoadd_swap_info(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + BuyBitcoinProvider dco_decode_buy_bitcoin_provider(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BuyBitcoinProvider.values[raw as int]; + } + + @protected + BuyBitcoinRequest dco_decode_buy_bitcoin_request(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 BuyBitcoinRequest( + provider: dco_decode_buy_bitcoin_provider(arr[0]), + openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[1]), + ); + } + + @protected + BuyBitcoinResponse dco_decode_buy_bitcoin_response(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 BuyBitcoinResponse( + url: dco_decode_String(arr[0]), + openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[1]), + ); + } + + @protected + ChannelState dco_decode_channel_state(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ChannelState.values[raw as int]; + } + + @protected + CheckMessageRequest dco_decode_check_message_request(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 CheckMessageRequest( + message: dco_decode_String(arr[0]), + pubkey: dco_decode_String(arr[1]), + signature: dco_decode_String(arr[2]), + ); + } + + @protected + CheckMessageResponse dco_decode_check_message_response(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 CheckMessageResponse( + isValid: dco_decode_bool(arr[0]), + ); + } + + @protected + ClosedChannelPaymentDetails dco_decode_closed_channel_payment_details(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 ClosedChannelPaymentDetails( + state: dco_decode_channel_state(arr[0]), + fundingTxid: dco_decode_String(arr[1]), + shortChannelId: dco_decode_opt_String(arr[2]), + closingTxid: dco_decode_opt_String(arr[3]), + ); + } + + @protected + Config dco_decode_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); + return Config( + breezserver: dco_decode_String(arr[0]), + chainnotifierUrl: dco_decode_String(arr[1]), + mempoolspaceUrl: dco_decode_opt_String(arr[2]), + workingDir: dco_decode_String(arr[3]), + network: dco_decode_network(arr[4]), + paymentTimeoutSec: dco_decode_u_32(arr[5]), + defaultLspId: dco_decode_opt_String(arr[6]), + apiKey: dco_decode_opt_String(arr[7]), + maxfeePercent: dco_decode_f_64(arr[8]), + exemptfeeMsat: dco_decode_u_64(arr[9]), + nodeConfig: dco_decode_node_config(arr[10]), + ); + } + + @protected + ConfigureNodeRequest dco_decode_configure_node_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 ConfigureNodeRequest( + closeToAddress: dco_decode_opt_String(arr[0]), + ); + } + + @protected + ConnectRequest dco_decode_connect_request(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 ConnectRequest( + config: dco_decode_config(arr[0]), + seed: dco_decode_list_prim_u_8_strict(arr[1]), + restoreOnly: dco_decode_opt_box_autoadd_bool(arr[2]), + ); + } + + @protected + CurrencyInfo dco_decode_currency_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return CurrencyInfo( + name: dco_decode_String(arr[0]), + fractionSize: dco_decode_u_32(arr[1]), + spacing: dco_decode_opt_box_autoadd_u_32(arr[2]), + symbol: dco_decode_opt_box_autoadd_symbol(arr[3]), + uniqSymbol: dco_decode_opt_box_autoadd_symbol(arr[4]), + localizedName: dco_decode_opt_list_localized_name(arr[5]), + localeOverrides: dco_decode_opt_list_locale_overrides(arr[6]), + ); + } + + @protected + EnvironmentType dco_decode_environment_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return EnvironmentType.values[raw as int]; + } + + @protected + double dco_decode_f_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as double; + } + + @protected + FiatCurrency dco_decode_fiat_currency(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 FiatCurrency( + id: dco_decode_String(arr[0]), + info: dco_decode_currency_info(arr[1]), + ); + } + + @protected + GreenlightCredentials dco_decode_greenlight_credentials(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 GreenlightCredentials( + deviceKey: dco_decode_list_prim_u_8_strict(arr[0]), + deviceCert: dco_decode_list_prim_u_8_strict(arr[1]), + ); + } + + @protected + GreenlightNodeConfig dco_decode_greenlight_node_config(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 GreenlightNodeConfig( + partnerCredentials: dco_decode_opt_box_autoadd_greenlight_credentials(arr[0]), + inviteCode: dco_decode_opt_String(arr[1]), + ); + } + + @protected + HealthCheckStatus dco_decode_health_check_status(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return HealthCheckStatus.values[raw as int]; + } + + @protected + int dco_decode_i_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + int dco_decode_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64OrU64(raw); + } + + @protected + InputType dco_decode_input_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return InputType_BitcoinAddress( + address: dco_decode_box_autoadd_bitcoin_address_data(raw[1]), + ); + case 1: + return InputType_Bolt11( + invoice: dco_decode_box_autoadd_ln_invoice(raw[1]), + ); + case 2: + return InputType_NodeId( + nodeId: dco_decode_String(raw[1]), + ); + case 3: + return InputType_Url( + url: dco_decode_String(raw[1]), + ); + case 4: + return InputType_LnUrlPay( + data: dco_decode_box_autoadd_ln_url_pay_request_data(raw[1]), + ); + case 5: + return InputType_LnUrlWithdraw( + data: dco_decode_box_autoadd_ln_url_withdraw_request_data(raw[1]), + ); + case 6: + return InputType_LnUrlAuth( + data: dco_decode_box_autoadd_ln_url_auth_request_data(raw[1]), + ); + case 7: + return InputType_LnUrlError( + data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + InvoicePaidDetails dco_decode_invoice_paid_details(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 InvoicePaidDetails( + paymentHash: dco_decode_String(arr[0]), + bolt11: dco_decode_String(arr[1]), + payment: dco_decode_opt_box_autoadd_payment(arr[2]), + ); + } + + @protected + List dco_decode_list_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_String).toList(); + } + + @protected + List dco_decode_list_fiat_currency(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_fiat_currency).toList(); + } + + @protected + List dco_decode_list_locale_overrides(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_locale_overrides).toList(); + } + + @protected + List dco_decode_list_localized_name(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_localized_name).toList(); + } + + @protected + List dco_decode_list_lsp_information(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_lsp_information).toList(); + } + + @protected + List dco_decode_list_metadata_filter(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_metadata_filter).toList(); + } + + @protected + List dco_decode_list_opening_fee_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_opening_fee_params).toList(); + } + + @protected + List dco_decode_list_payment(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_payment).toList(); + } + + @protected + List dco_decode_list_payment_type_filter(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_payment_type_filter).toList(); + } + + @protected + ListPaymentsRequest dco_decode_list_payments_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return ListPaymentsRequest( + filters: dco_decode_opt_list_payment_type_filter(arr[0]), + metadataFilters: dco_decode_opt_list_metadata_filter(arr[1]), + fromTimestamp: dco_decode_opt_box_autoadd_i_64(arr[2]), + toTimestamp: dco_decode_opt_box_autoadd_i_64(arr[3]), + includeFailures: dco_decode_opt_box_autoadd_bool(arr[4]), + offset: dco_decode_opt_box_autoadd_u_32(arr[5]), + limit: dco_decode_opt_box_autoadd_u_32(arr[6]), + ); + } + + @protected + Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as Uint8List; + } + + @protected + List dco_decode_list_rate(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_rate).toList(); + } + + @protected + List dco_decode_list_reverse_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_reverse_swap_info).toList(); + } + + @protected + List dco_decode_list_route_hint(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_route_hint).toList(); + } + + @protected + List dco_decode_list_route_hint_hop(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_route_hint_hop).toList(); + } + + @protected + List dco_decode_list_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_swap_info).toList(); + } + + @protected + List dco_decode_list_tlv_entry(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_tlv_entry).toList(); + } + + @protected + List dco_decode_list_unspent_transaction_output(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return (raw as List).map(dco_decode_unspent_transaction_output).toList(); + } + + @protected + LNInvoice dco_decode_ln_invoice(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); + return LNInvoice( + bolt11: dco_decode_String(arr[0]), + network: dco_decode_network(arr[1]), + payeePubkey: dco_decode_String(arr[2]), + paymentHash: dco_decode_String(arr[3]), + description: dco_decode_opt_String(arr[4]), + descriptionHash: dco_decode_opt_String(arr[5]), + amountMsat: dco_decode_opt_box_autoadd_u_64(arr[6]), + timestamp: dco_decode_u_64(arr[7]), + expiry: dco_decode_u_64(arr[8]), + routingHints: dco_decode_list_route_hint(arr[9]), + paymentSecret: dco_decode_list_prim_u_8_strict(arr[10]), + minFinalCltvExpiryDelta: dco_decode_u_64(arr[11]), + ); + } + + @protected + LnPaymentDetails dco_decode_ln_payment_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 15) throw Exception('unexpected arr length: expect 15 but see ${arr.length}'); + return LnPaymentDetails( + paymentHash: dco_decode_String(arr[0]), + label: dco_decode_String(arr[1]), + destinationPubkey: dco_decode_String(arr[2]), + paymentPreimage: dco_decode_String(arr[3]), + keysend: dco_decode_bool(arr[4]), + bolt11: dco_decode_String(arr[5]), + openChannelBolt11: dco_decode_opt_String(arr[6]), + lnurlSuccessAction: dco_decode_opt_box_autoadd_success_action_processed(arr[7]), + lnurlPayDomain: dco_decode_opt_String(arr[8]), + lnAddress: dco_decode_opt_String(arr[9]), + lnurlMetadata: dco_decode_opt_String(arr[10]), + lnurlWithdrawEndpoint: dco_decode_opt_String(arr[11]), + swapInfo: dco_decode_opt_box_autoadd_swap_info(arr[12]), + reverseSwapInfo: dco_decode_opt_box_autoadd_reverse_swap_info(arr[13]), + pendingExpirationBlock: dco_decode_opt_box_autoadd_u_32(arr[14]), + ); + } + + @protected + LnUrlAuthRequestData dco_decode_ln_url_auth_request_data(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 LnUrlAuthRequestData( + k1: dco_decode_String(arr[0]), + action: dco_decode_opt_String(arr[1]), + domain: dco_decode_String(arr[2]), + url: dco_decode_String(arr[3]), + ); + } + + @protected + LnUrlCallbackStatus dco_decode_ln_url_callback_status(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LnUrlCallbackStatus_Ok(); + case 1: + return LnUrlCallbackStatus_ErrorStatus( + data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + LnUrlErrorData dco_decode_ln_url_error_data(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 LnUrlErrorData( + reason: dco_decode_String(arr[0]), + ); + } + + @protected + LnUrlPayErrorData dco_decode_ln_url_pay_error_data(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 LnUrlPayErrorData( + paymentHash: dco_decode_String(arr[0]), + reason: dco_decode_String(arr[1]), + ); + } + + @protected + LnUrlPayRequest dco_decode_ln_url_pay_request(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 LnUrlPayRequest( + data: dco_decode_ln_url_pay_request_data(arr[0]), + amountMsat: dco_decode_u_64(arr[1]), + comment: dco_decode_opt_String(arr[2]), + paymentLabel: dco_decode_opt_String(arr[3]), + ); + } + + @protected + LnUrlPayRequestData dco_decode_ln_url_pay_request_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 9) throw Exception('unexpected arr length: expect 9 but see ${arr.length}'); + return LnUrlPayRequestData( + callback: dco_decode_String(arr[0]), + minSendable: dco_decode_u_64(arr[1]), + maxSendable: dco_decode_u_64(arr[2]), + metadataStr: dco_decode_String(arr[3]), + commentAllowed: dco_decode_u_16(arr[4]), + domain: dco_decode_String(arr[5]), + allowsNostr: dco_decode_bool(arr[6]), + nostrPubkey: dco_decode_opt_String(arr[7]), + lnAddress: dco_decode_opt_String(arr[8]), + ); + } + + @protected + LnUrlPayResult dco_decode_ln_url_pay_result(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LnUrlPayResult_EndpointSuccess( + data: dco_decode_box_autoadd_ln_url_pay_success_data(raw[1]), + ); + case 1: + return LnUrlPayResult_EndpointError( + data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), + ); + case 2: + return LnUrlPayResult_PayError( + data: dco_decode_box_autoadd_ln_url_pay_error_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + LnUrlPaySuccessData dco_decode_ln_url_pay_success_data(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 LnUrlPaySuccessData( + payment: dco_decode_payment(arr[0]), + successAction: dco_decode_opt_box_autoadd_success_action_processed(arr[1]), + ); + } + + @protected + LnUrlWithdrawRequest dco_decode_ln_url_withdraw_request(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 LnUrlWithdrawRequest( + data: dco_decode_ln_url_withdraw_request_data(arr[0]), + amountMsat: dco_decode_u_64(arr[1]), + description: dco_decode_opt_String(arr[2]), + ); + } + + @protected + LnUrlWithdrawRequestData dco_decode_ln_url_withdraw_request_data(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 LnUrlWithdrawRequestData( + callback: dco_decode_String(arr[0]), + k1: dco_decode_String(arr[1]), + defaultDescription: dco_decode_String(arr[2]), + minWithdrawable: dco_decode_u_64(arr[3]), + maxWithdrawable: dco_decode_u_64(arr[4]), + ); + } + + @protected + LnUrlWithdrawResult dco_decode_ln_url_withdraw_result(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LnUrlWithdrawResult_Ok( + data: dco_decode_box_autoadd_ln_url_withdraw_success_data(raw[1]), + ); + case 1: + return LnUrlWithdrawResult_ErrorStatus( + data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + LnUrlWithdrawSuccessData dco_decode_ln_url_withdraw_success_data(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 LnUrlWithdrawSuccessData( + invoice: dco_decode_ln_invoice(arr[0]), + ); + } + + @protected + LocaleOverrides dco_decode_locale_overrides(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 LocaleOverrides( + locale: dco_decode_String(arr[0]), + spacing: dco_decode_opt_box_autoadd_u_32(arr[1]), + symbol: dco_decode_symbol(arr[2]), + ); + } + + @protected + LocalizedName dco_decode_localized_name(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 LocalizedName( + locale: dco_decode_String(arr[0]), + name: dco_decode_String(arr[1]), + ); + } + + @protected + LogEntry dco_decode_log_entry(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 LogEntry( + line: dco_decode_String(arr[0]), + level: dco_decode_String(arr[1]), + ); + } + + @protected + LspInformation dco_decode_lsp_information(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); + return LspInformation( + id: dco_decode_String(arr[0]), + name: dco_decode_String(arr[1]), + widgetUrl: dco_decode_String(arr[2]), + pubkey: dco_decode_String(arr[3]), + host: dco_decode_String(arr[4]), + baseFeeMsat: dco_decode_i_64(arr[5]), + feeRate: dco_decode_f_64(arr[6]), + timeLockDelta: dco_decode_u_32(arr[7]), + minHtlcMsat: dco_decode_i_64(arr[8]), + lspPubkey: dco_decode_list_prim_u_8_strict(arr[9]), + openingFeeParamsList: dco_decode_opening_fee_params_menu(arr[10]), + ); + } + + @protected + MaxReverseSwapAmountResponse dco_decode_max_reverse_swap_amount_response(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 MaxReverseSwapAmountResponse( + totalSat: dco_decode_u_64(arr[0]), + ); + } + + @protected + MessageSuccessActionData dco_decode_message_success_action_data(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 MessageSuccessActionData( + message: dco_decode_String(arr[0]), + ); + } + + @protected + MetadataFilter dco_decode_metadata_filter(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 MetadataFilter( + jsonPath: dco_decode_String(arr[0]), + jsonValue: dco_decode_String(arr[1]), + ); + } + + @protected + Network dco_decode_network(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return Network.values[raw as int]; + } + + @protected + NodeConfig dco_decode_node_config(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return NodeConfig_Greenlight( + config: dco_decode_box_autoadd_greenlight_node_config(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + NodeCredentials dco_decode_node_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return NodeCredentials_Greenlight( + credentials: dco_decode_box_autoadd_greenlight_credentials(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + NodeState dco_decode_node_state(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); + return NodeState( + id: dco_decode_String(arr[0]), + blockHeight: dco_decode_u_32(arr[1]), + channelsBalanceMsat: dco_decode_u_64(arr[2]), + onchainBalanceMsat: dco_decode_u_64(arr[3]), + pendingOnchainBalanceMsat: dco_decode_u_64(arr[4]), + utxos: dco_decode_list_unspent_transaction_output(arr[5]), + maxPayableMsat: dco_decode_u_64(arr[6]), + maxReceivableMsat: dco_decode_u_64(arr[7]), + maxSinglePaymentAmountMsat: dco_decode_u_64(arr[8]), + maxChanReserveMsats: dco_decode_u_64(arr[9]), + connectedPeers: dco_decode_list_String(arr[10]), + inboundLiquidityMsats: dco_decode_u_64(arr[11]), + ); + } + + @protected + OnchainPaymentLimitsResponse dco_decode_onchain_payment_limits_response(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 OnchainPaymentLimitsResponse( + minSat: dco_decode_u_64(arr[0]), + maxSat: dco_decode_u_64(arr[1]), + ); + } + + @protected + OpenChannelFeeRequest dco_decode_open_channel_fee_request(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 OpenChannelFeeRequest( + amountMsat: dco_decode_opt_box_autoadd_u_64(arr[0]), + expiry: dco_decode_opt_box_autoadd_u_32(arr[1]), + ); + } + + @protected + OpenChannelFeeResponse dco_decode_open_channel_fee_response(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 OpenChannelFeeResponse( + feeMsat: dco_decode_opt_box_autoadd_u_64(arr[0]), + feeParams: dco_decode_opening_fee_params(arr[1]), + ); + } + + @protected + OpeningFeeParams dco_decode_opening_fee_params(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 OpeningFeeParams( + minMsat: dco_decode_u_64(arr[0]), + proportional: dco_decode_u_32(arr[1]), + validUntil: dco_decode_String(arr[2]), + maxIdleTime: dco_decode_u_32(arr[3]), + maxClientToSelfDelay: dco_decode_u_32(arr[4]), + promise: dco_decode_String(arr[5]), + ); + } + + @protected + OpeningFeeParamsMenu dco_decode_opening_fee_params_menu(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 OpeningFeeParamsMenu( + values: dco_decode_list_opening_fee_params(arr[0]), + ); + } + + @protected + String? dco_decode_opt_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_String(raw); + } + + @protected + bool? dco_decode_opt_box_autoadd_bool(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_bool(raw); + } + + @protected + GreenlightCredentials? dco_decode_opt_box_autoadd_greenlight_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_greenlight_credentials(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_i_64(raw); + } + + @protected + LNInvoice? dco_decode_opt_box_autoadd_ln_invoice(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_ln_invoice(raw); + } + + @protected + LspInformation? dco_decode_opt_box_autoadd_lsp_information(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_lsp_information(raw); + } + + @protected + NodeCredentials? dco_decode_opt_box_autoadd_node_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_node_credentials(raw); + } + + @protected + OpeningFeeParams? dco_decode_opt_box_autoadd_opening_fee_params(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_opening_fee_params(raw); + } + + @protected + Payment? dco_decode_opt_box_autoadd_payment(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_payment(raw); + } + + @protected + ReverseSwapInfo? dco_decode_opt_box_autoadd_reverse_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_reverse_swap_info(raw); + } + + @protected + SuccessActionProcessed? dco_decode_opt_box_autoadd_success_action_processed(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_success_action_processed(raw); + } + + @protected + SwapInfo? dco_decode_opt_box_autoadd_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_swap_info(raw); + } + + @protected + Symbol? dco_decode_opt_box_autoadd_symbol(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_symbol(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_u_32(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_32(raw); + } + + @protected + int? dco_decode_opt_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_64(raw); + } + + @protected + List? dco_decode_opt_list_String(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_String(raw); + } + + @protected + List? dco_decode_opt_list_locale_overrides(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_locale_overrides(raw); + } + + @protected + List? dco_decode_opt_list_localized_name(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_localized_name(raw); + } + + @protected + List? dco_decode_opt_list_metadata_filter(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_metadata_filter(raw); + } + + @protected + List? dco_decode_opt_list_payment_type_filter(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_payment_type_filter(raw); + } + + @protected + Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_prim_u_8_strict(raw); + } + + @protected + List? dco_decode_opt_list_tlv_entry(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_list_tlv_entry(raw); + } + + @protected + PayOnchainRequest dco_decode_pay_onchain_request(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 PayOnchainRequest( + recipientAddress: dco_decode_String(arr[0]), + prepareRes: dco_decode_prepare_onchain_payment_response(arr[1]), + ); + } + + @protected + PayOnchainResponse dco_decode_pay_onchain_response(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 PayOnchainResponse( + reverseSwapInfo: dco_decode_reverse_swap_info(arr[0]), + ); + } + + @protected + Payment dco_decode_payment(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); + return Payment( + id: dco_decode_String(arr[0]), + paymentType: dco_decode_payment_type(arr[1]), + paymentTime: dco_decode_i_64(arr[2]), + amountMsat: dco_decode_u_64(arr[3]), + feeMsat: dco_decode_u_64(arr[4]), + status: dco_decode_payment_status(arr[5]), + error: dco_decode_opt_String(arr[6]), + description: dco_decode_opt_String(arr[7]), + details: dco_decode_payment_details(arr[8]), + metadata: dco_decode_opt_String(arr[9]), + ); + } + + @protected + PaymentDetails dco_decode_payment_details(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return PaymentDetails_Ln( + data: dco_decode_box_autoadd_ln_payment_details(raw[1]), + ); + case 1: + return PaymentDetails_ClosedChannel( + data: dco_decode_box_autoadd_closed_channel_payment_details(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + PaymentFailedData dco_decode_payment_failed_data(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 PaymentFailedData( + error: dco_decode_String(arr[0]), + nodeId: dco_decode_String(arr[1]), + invoice: dco_decode_opt_box_autoadd_ln_invoice(arr[2]), + ); + } + + @protected + PaymentStatus dco_decode_payment_status(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PaymentStatus.values[raw as int]; + } + + @protected + PaymentType dco_decode_payment_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PaymentType.values[raw as int]; + } + + @protected + PaymentTypeFilter dco_decode_payment_type_filter(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return PaymentTypeFilter.values[raw as int]; + } + + @protected + PrepareOnchainPaymentRequest dco_decode_prepare_onchain_payment_request(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 PrepareOnchainPaymentRequest( + amountSat: dco_decode_u_64(arr[0]), + amountType: dco_decode_swap_amount_type(arr[1]), + claimTxFeerate: dco_decode_u_32(arr[2]), + ); + } + + @protected + PrepareOnchainPaymentResponse dco_decode_prepare_onchain_payment_response(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return PrepareOnchainPaymentResponse( + feesHash: dco_decode_String(arr[0]), + feesPercentage: dco_decode_f_64(arr[1]), + feesLockup: dco_decode_u_64(arr[2]), + feesClaim: dco_decode_u_64(arr[3]), + senderAmountSat: dco_decode_u_64(arr[4]), + recipientAmountSat: dco_decode_u_64(arr[5]), + totalFees: dco_decode_u_64(arr[6]), + ); + } + + @protected + PrepareRedeemOnchainFundsRequest dco_decode_prepare_redeem_onchain_funds_request(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 PrepareRedeemOnchainFundsRequest( + toAddress: dco_decode_String(arr[0]), + satPerVbyte: dco_decode_u_32(arr[1]), + ); + } + + @protected + PrepareRedeemOnchainFundsResponse dco_decode_prepare_redeem_onchain_funds_response(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 PrepareRedeemOnchainFundsResponse( + txWeight: dco_decode_u_64(arr[0]), + txFeeSat: dco_decode_u_64(arr[1]), + ); + } + + @protected + PrepareRefundRequest dco_decode_prepare_refund_request(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 PrepareRefundRequest( + swapAddress: dco_decode_String(arr[0]), + toAddress: dco_decode_String(arr[1]), + satPerVbyte: dco_decode_u_32(arr[2]), + ); + } + + @protected + PrepareRefundResponse dco_decode_prepare_refund_response(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 PrepareRefundResponse( + refundTxWeight: dco_decode_u_32(arr[0]), + refundTxFeeSat: dco_decode_u_64(arr[1]), + ); + } + + @protected + Rate dco_decode_rate(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 Rate( + coin: dco_decode_String(arr[0]), + value: dco_decode_f_64(arr[1]), + ); + } + + @protected + ReceiveOnchainRequest dco_decode_receive_onchain_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 ReceiveOnchainRequest( + openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[0]), + ); + } + + @protected + ReceivePaymentRequest dco_decode_receive_payment_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return ReceivePaymentRequest( + amountMsat: dco_decode_u_64(arr[0]), + description: dco_decode_String(arr[1]), + preimage: dco_decode_opt_list_prim_u_8_strict(arr[2]), + openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[3]), + useDescriptionHash: dco_decode_opt_box_autoadd_bool(arr[4]), + expiry: dco_decode_opt_box_autoadd_u_32(arr[5]), + cltv: dco_decode_opt_box_autoadd_u_32(arr[6]), + ); + } + + @protected + ReceivePaymentResponse dco_decode_receive_payment_response(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 ReceivePaymentResponse( + lnInvoice: dco_decode_ln_invoice(arr[0]), + openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[1]), + openingFeeMsat: dco_decode_opt_box_autoadd_u_64(arr[2]), + ); + } + + @protected + RecommendedFees dco_decode_recommended_fees(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 RecommendedFees( + fastestFee: dco_decode_u_64(arr[0]), + halfHourFee: dco_decode_u_64(arr[1]), + hourFee: dco_decode_u_64(arr[2]), + economyFee: dco_decode_u_64(arr[3]), + minimumFee: dco_decode_u_64(arr[4]), + ); + } + + @protected + RedeemOnchainFundsRequest dco_decode_redeem_onchain_funds_request(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 RedeemOnchainFundsRequest( + toAddress: dco_decode_String(arr[0]), + satPerVbyte: dco_decode_u_32(arr[1]), + ); + } + + @protected + RedeemOnchainFundsResponse dco_decode_redeem_onchain_funds_response(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 RedeemOnchainFundsResponse( + txid: dco_decode_list_prim_u_8_strict(arr[0]), + ); + } + + @protected + RefundRequest dco_decode_refund_request(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 RefundRequest( + swapAddress: dco_decode_String(arr[0]), + toAddress: dco_decode_String(arr[1]), + satPerVbyte: dco_decode_u_32(arr[2]), + ); + } + + @protected + RefundResponse dco_decode_refund_response(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 RefundResponse( + refundTxId: dco_decode_String(arr[0]), + ); + } + + @protected + ReportIssueRequest dco_decode_report_issue_request(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return ReportIssueRequest_PaymentFailure( + data: dco_decode_box_autoadd_report_payment_failure_details(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + ReportPaymentFailureDetails dco_decode_report_payment_failure_details(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 ReportPaymentFailureDetails( + paymentHash: dco_decode_String(arr[0]), + comment: dco_decode_opt_String(arr[1]), + ); + } + + @protected + ReverseSwapFeesRequest dco_decode_reverse_swap_fees_request(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 ReverseSwapFeesRequest( + sendAmountSat: dco_decode_opt_box_autoadd_u_64(arr[0]), + claimTxFeerate: dco_decode_opt_box_autoadd_u_32(arr[1]), + ); + } + + @protected + ReverseSwapInfo dco_decode_reverse_swap_info(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 ReverseSwapInfo( + id: dco_decode_String(arr[0]), + claimPubkey: dco_decode_String(arr[1]), + lockupTxid: dco_decode_opt_String(arr[2]), + claimTxid: dco_decode_opt_String(arr[3]), + onchainAmountSat: dco_decode_u_64(arr[4]), + status: dco_decode_reverse_swap_status(arr[5]), + ); + } + + @protected + ReverseSwapPairInfo dco_decode_reverse_swap_pair_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return ReverseSwapPairInfo( + min: dco_decode_u_64(arr[0]), + max: dco_decode_u_64(arr[1]), + feesHash: dco_decode_String(arr[2]), + feesPercentage: dco_decode_f_64(arr[3]), + feesLockup: dco_decode_u_64(arr[4]), + feesClaim: dco_decode_u_64(arr[5]), + totalFees: dco_decode_opt_box_autoadd_u_64(arr[6]), + ); + } + + @protected + ReverseSwapStatus dco_decode_reverse_swap_status(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return ReverseSwapStatus.values[raw as int]; + } + + @protected + RouteHint dco_decode_route_hint(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 RouteHint( + hops: dco_decode_list_route_hint_hop(arr[0]), + ); + } + + @protected + RouteHintHop dco_decode_route_hint_hop(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); + return RouteHintHop( + srcNodeId: dco_decode_String(arr[0]), + shortChannelId: dco_decode_u_64(arr[1]), + feesBaseMsat: dco_decode_u_32(arr[2]), + feesProportionalMillionths: dco_decode_u_32(arr[3]), + cltvExpiryDelta: dco_decode_u_64(arr[4]), + htlcMinimumMsat: dco_decode_opt_box_autoadd_u_64(arr[5]), + htlcMaximumMsat: dco_decode_opt_box_autoadd_u_64(arr[6]), + ); + } + + @protected + SendOnchainRequest dco_decode_send_onchain_request(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 SendOnchainRequest( + amountSat: dco_decode_u_64(arr[0]), + onchainRecipientAddress: dco_decode_String(arr[1]), + pairHash: dco_decode_String(arr[2]), + satPerVbyte: dco_decode_u_32(arr[3]), + ); + } + + @protected + SendOnchainResponse dco_decode_send_onchain_response(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 SendOnchainResponse( + reverseSwapInfo: dco_decode_reverse_swap_info(arr[0]), + ); + } + + @protected + SendPaymentRequest dco_decode_send_payment_request(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 SendPaymentRequest( + bolt11: dco_decode_String(arr[0]), + amountMsat: dco_decode_opt_box_autoadd_u_64(arr[1]), + label: dco_decode_opt_String(arr[2]), + ); + } + + @protected + SendPaymentResponse dco_decode_send_payment_response(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 SendPaymentResponse( + payment: dco_decode_payment(arr[0]), + ); + } + + @protected + SendSpontaneousPaymentRequest dco_decode_send_spontaneous_payment_request(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 SendSpontaneousPaymentRequest( + nodeId: dco_decode_String(arr[0]), + amountMsat: dco_decode_u_64(arr[1]), + extraTlvs: dco_decode_opt_list_tlv_entry(arr[2]), + label: dco_decode_opt_String(arr[3]), + ); + } + + @protected + ServiceHealthCheckResponse dco_decode_service_health_check_response(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 ServiceHealthCheckResponse( + status: dco_decode_health_check_status(arr[0]), + ); + } + + @protected + SignMessageRequest dco_decode_sign_message_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 SignMessageRequest( + message: dco_decode_String(arr[0]), + ); + } + + @protected + SignMessageResponse dco_decode_sign_message_response(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 SignMessageResponse( + signature: dco_decode_String(arr[0]), + ); + } + + @protected + StaticBackupRequest dco_decode_static_backup_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 StaticBackupRequest( + workingDir: dco_decode_String(arr[0]), + ); + } + + @protected + StaticBackupResponse dco_decode_static_backup_response(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 StaticBackupResponse( + backup: dco_decode_opt_list_String(arr[0]), + ); + } + + @protected + SuccessActionProcessed dco_decode_success_action_processed(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return SuccessActionProcessed_Aes( + result: dco_decode_box_autoadd_aes_success_action_data_result(raw[1]), + ); + case 1: + return SuccessActionProcessed_Message( + data: dco_decode_box_autoadd_message_success_action_data(raw[1]), + ); + case 2: + return SuccessActionProcessed_Url( + data: dco_decode_box_autoadd_url_success_action_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + SwapAmountType dco_decode_swap_amount_type(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SwapAmountType.values[raw as int]; + } + + @protected + SwapInfo dco_decode_swap_info(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 24) throw Exception('unexpected arr length: expect 24 but see ${arr.length}'); + return SwapInfo( + bitcoinAddress: dco_decode_String(arr[0]), + createdAt: dco_decode_i_64(arr[1]), + lockHeight: dco_decode_i_64(arr[2]), + paymentHash: dco_decode_list_prim_u_8_strict(arr[3]), + preimage: dco_decode_list_prim_u_8_strict(arr[4]), + privateKey: dco_decode_list_prim_u_8_strict(arr[5]), + publicKey: dco_decode_list_prim_u_8_strict(arr[6]), + swapperPublicKey: dco_decode_list_prim_u_8_strict(arr[7]), + script: dco_decode_list_prim_u_8_strict(arr[8]), + bolt11: dco_decode_opt_String(arr[9]), + paidMsat: dco_decode_u_64(arr[10]), + totalIncomingTxs: dco_decode_u_64(arr[11]), + confirmedSats: dco_decode_u_64(arr[12]), + unconfirmedSats: dco_decode_u_64(arr[13]), + status: dco_decode_swap_status(arr[14]), + refundTxIds: dco_decode_list_String(arr[15]), + unconfirmedTxIds: dco_decode_list_String(arr[16]), + confirmedTxIds: dco_decode_list_String(arr[17]), + minAllowedDeposit: dco_decode_i_64(arr[18]), + maxAllowedDeposit: dco_decode_i_64(arr[19]), + maxSwapperPayable: dco_decode_i_64(arr[20]), + lastRedeemError: dco_decode_opt_String(arr[21]), + channelOpeningFees: dco_decode_opt_box_autoadd_opening_fee_params(arr[22]), + confirmedAt: dco_decode_opt_box_autoadd_u_32(arr[23]), + ); + } + + @protected + SwapStatus dco_decode_swap_status(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return SwapStatus.values[raw as int]; + } + + @protected + Symbol dco_decode_symbol(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 Symbol( + grapheme: dco_decode_opt_String(arr[0]), + template: dco_decode_opt_String(arr[1]), + rtl: dco_decode_opt_box_autoadd_bool(arr[2]), + position: dco_decode_opt_box_autoadd_u_32(arr[3]), + ); + } + + @protected + TlvEntry dco_decode_tlv_entry(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 TlvEntry( + fieldNumber: dco_decode_u_64(arr[0]), + value: dco_decode_list_prim_u_8_strict(arr[1]), + ); + } + + @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 + return raw as int; + } + + @protected + int dco_decode_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64OrU64(raw); + } + + @protected + int dco_decode_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + void dco_decode_unit(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return; + } + + @protected + UnspentTransactionOutput dco_decode_unspent_transaction_output(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 UnspentTransactionOutput( + txid: dco_decode_list_prim_u_8_strict(arr[0]), + outnum: dco_decode_u_32(arr[1]), + amountMillisatoshi: dco_decode_u_64(arr[2]), + address: dco_decode_String(arr[3]), + reserved: dco_decode_bool(arr[4]), + ); + } + + @protected + UrlSuccessActionData dco_decode_url_success_action_data(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 UrlSuccessActionData( + description: dco_decode_String(arr[0]), + url: dco_decode_String(arr[1]), + ); + } + + @protected + 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 + RustStreamSink sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + throw UnimplementedError('Unreachable ()'); + } + + @protected + RustStreamSink sse_decode_StreamSink_log_entry_Dco(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + throw UnimplementedError('Unreachable ()'); + } + + @protected + String sse_decode_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_list_prim_u_8_strict(deserializer); + return utf8.decoder.convert(inner); + } + + @protected + AesSuccessActionDataDecrypted sse_decode_aes_success_action_data_decrypted(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_description = sse_decode_String(deserializer); + var var_plaintext = sse_decode_String(deserializer); + return AesSuccessActionDataDecrypted(description: var_description, plaintext: var_plaintext); + } + + @protected + AesSuccessActionDataResult sse_decode_aes_success_action_data_result(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_data = sse_decode_box_autoadd_aes_success_action_data_decrypted(deserializer); + return AesSuccessActionDataResult_Decrypted(data: var_data); + case 1: + var var_reason = sse_decode_String(deserializer); + return AesSuccessActionDataResult_ErrorStatus(reason: var_reason); + default: + throw UnimplementedError(''); + } + } + + @protected + BackupFailedData sse_decode_backup_failed_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_error = sse_decode_String(deserializer); + return BackupFailedData(error: var_error); + } + + @protected + BackupStatus sse_decode_backup_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_backedUp = sse_decode_bool(deserializer); + var var_lastBackupTime = sse_decode_opt_box_autoadd_u_64(deserializer); + return BackupStatus(backedUp: var_backedUp, lastBackupTime: var_lastBackupTime); + } + + @protected + BitcoinAddressData sse_decode_bitcoin_address_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_address = sse_decode_String(deserializer); + var var_network = sse_decode_network(deserializer); + var var_amountSat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_label = sse_decode_opt_String(deserializer); + var var_message = sse_decode_opt_String(deserializer); + return BitcoinAddressData( + address: var_address, + network: var_network, + amountSat: var_amountSat, + label: var_label, + message: var_message); + } + + @protected + bool sse_decode_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8() != 0; + } + + @protected + AesSuccessActionDataDecrypted sse_decode_box_autoadd_aes_success_action_data_decrypted( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_aes_success_action_data_decrypted(deserializer)); + } + + @protected + AesSuccessActionDataResult sse_decode_box_autoadd_aes_success_action_data_result( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_aes_success_action_data_result(deserializer)); + } + + @protected + BackupFailedData sse_decode_box_autoadd_backup_failed_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_backup_failed_data(deserializer)); + } + + @protected + BitcoinAddressData sse_decode_box_autoadd_bitcoin_address_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bitcoin_address_data(deserializer)); + } + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_bool(deserializer)); + } + + @protected + BuyBitcoinRequest sse_decode_box_autoadd_buy_bitcoin_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_buy_bitcoin_request(deserializer)); + } + + @protected + CheckMessageRequest sse_decode_box_autoadd_check_message_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_check_message_request(deserializer)); + } + + @protected + ClosedChannelPaymentDetails sse_decode_box_autoadd_closed_channel_payment_details( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_closed_channel_payment_details(deserializer)); + } + + @protected + ConfigureNodeRequest sse_decode_box_autoadd_configure_node_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_configure_node_request(deserializer)); + } + + @protected + ConnectRequest sse_decode_box_autoadd_connect_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_connect_request(deserializer)); + } + + @protected + GreenlightCredentials sse_decode_box_autoadd_greenlight_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_greenlight_credentials(deserializer)); + } + + @protected + GreenlightNodeConfig sse_decode_box_autoadd_greenlight_node_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_greenlight_node_config(deserializer)); + } + + @protected + int sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_i_64(deserializer)); + } + + @protected + InvoicePaidDetails sse_decode_box_autoadd_invoice_paid_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_invoice_paid_details(deserializer)); + } + + @protected + ListPaymentsRequest sse_decode_box_autoadd_list_payments_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_list_payments_request(deserializer)); + } + + @protected + LNInvoice sse_decode_box_autoadd_ln_invoice(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_invoice(deserializer)); + } + + @protected + LnPaymentDetails sse_decode_box_autoadd_ln_payment_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_payment_details(deserializer)); + } + + @protected + LnUrlAuthRequestData sse_decode_box_autoadd_ln_url_auth_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_auth_request_data(deserializer)); + } + + @protected + LnUrlErrorData sse_decode_box_autoadd_ln_url_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_error_data(deserializer)); + } + + @protected + LnUrlPayErrorData sse_decode_box_autoadd_ln_url_pay_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_error_data(deserializer)); + } + + @protected + LnUrlPayRequest sse_decode_box_autoadd_ln_url_pay_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_request(deserializer)); + } + + @protected + LnUrlPayRequestData sse_decode_box_autoadd_ln_url_pay_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_request_data(deserializer)); + } + + @protected + LnUrlPaySuccessData sse_decode_box_autoadd_ln_url_pay_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_success_data(deserializer)); + } + + @protected + LnUrlWithdrawRequest sse_decode_box_autoadd_ln_url_withdraw_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_withdraw_request(deserializer)); + } + + @protected + LnUrlWithdrawRequestData sse_decode_box_autoadd_ln_url_withdraw_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_withdraw_request_data(deserializer)); + } + + @protected + LnUrlWithdrawSuccessData sse_decode_box_autoadd_ln_url_withdraw_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_withdraw_success_data(deserializer)); + } + + @protected + LspInformation sse_decode_box_autoadd_lsp_information(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_lsp_information(deserializer)); + } + + @protected + MessageSuccessActionData sse_decode_box_autoadd_message_success_action_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_message_success_action_data(deserializer)); + } + + @protected + NodeConfig sse_decode_box_autoadd_node_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_node_config(deserializer)); + } + + @protected + NodeCredentials sse_decode_box_autoadd_node_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_node_credentials(deserializer)); + } + + @protected + OpenChannelFeeRequest sse_decode_box_autoadd_open_channel_fee_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_open_channel_fee_request(deserializer)); + } + + @protected + OpeningFeeParams sse_decode_box_autoadd_opening_fee_params(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_opening_fee_params(deserializer)); + } + + @protected + PayOnchainRequest sse_decode_box_autoadd_pay_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_pay_onchain_request(deserializer)); + } + + @protected + Payment sse_decode_box_autoadd_payment(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_payment(deserializer)); + } + + @protected + PaymentFailedData sse_decode_box_autoadd_payment_failed_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_payment_failed_data(deserializer)); + } + + @protected + PrepareOnchainPaymentRequest sse_decode_box_autoadd_prepare_onchain_payment_request( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_prepare_onchain_payment_request(deserializer)); + } + + @protected + PrepareRedeemOnchainFundsRequest sse_decode_box_autoadd_prepare_redeem_onchain_funds_request( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_prepare_redeem_onchain_funds_request(deserializer)); + } + + @protected + PrepareRefundRequest sse_decode_box_autoadd_prepare_refund_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_prepare_refund_request(deserializer)); + } + + @protected + ReceiveOnchainRequest sse_decode_box_autoadd_receive_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_receive_onchain_request(deserializer)); + } + + @protected + ReceivePaymentRequest sse_decode_box_autoadd_receive_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_receive_payment_request(deserializer)); + } + + @protected + RedeemOnchainFundsRequest sse_decode_box_autoadd_redeem_onchain_funds_request( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_redeem_onchain_funds_request(deserializer)); + } + + @protected + RefundRequest sse_decode_box_autoadd_refund_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_refund_request(deserializer)); + } + + @protected + ReportIssueRequest sse_decode_box_autoadd_report_issue_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_report_issue_request(deserializer)); + } + + @protected + ReportPaymentFailureDetails sse_decode_box_autoadd_report_payment_failure_details( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_report_payment_failure_details(deserializer)); + } + + @protected + ReverseSwapFeesRequest sse_decode_box_autoadd_reverse_swap_fees_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_reverse_swap_fees_request(deserializer)); + } + + @protected + ReverseSwapInfo sse_decode_box_autoadd_reverse_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_reverse_swap_info(deserializer)); + } + + @protected + SendOnchainRequest sse_decode_box_autoadd_send_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_send_onchain_request(deserializer)); + } + + @protected + SendPaymentRequest sse_decode_box_autoadd_send_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_send_payment_request(deserializer)); + } + + @protected + SendSpontaneousPaymentRequest sse_decode_box_autoadd_send_spontaneous_payment_request( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_send_spontaneous_payment_request(deserializer)); + } + + @protected + SignMessageRequest sse_decode_box_autoadd_sign_message_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_sign_message_request(deserializer)); + } + + @protected + StaticBackupRequest sse_decode_box_autoadd_static_backup_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_static_backup_request(deserializer)); + } + + @protected + SuccessActionProcessed sse_decode_box_autoadd_success_action_processed(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_success_action_processed(deserializer)); + } + + @protected + SwapInfo sse_decode_box_autoadd_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_swap_info(deserializer)); + } + + @protected + Symbol sse_decode_box_autoadd_symbol(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_symbol(deserializer)); + } + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_32(deserializer)); + } + + @protected + int sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_64(deserializer)); + } + + @protected + UrlSuccessActionData sse_decode_box_autoadd_url_success_action_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_url_success_action_data(deserializer)); + } + + @protected + BreezEvent sse_decode_breez_event(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_block = sse_decode_u_32(deserializer); + return BreezEvent_NewBlock(block: var_block); + case 1: + var var_details = sse_decode_box_autoadd_invoice_paid_details(deserializer); + return BreezEvent_InvoicePaid(details: var_details); + case 2: + return BreezEvent_Synced(); + case 3: + var var_details = sse_decode_box_autoadd_payment(deserializer); + return BreezEvent_PaymentSucceed(details: var_details); + case 4: + var var_details = sse_decode_box_autoadd_payment_failed_data(deserializer); + return BreezEvent_PaymentFailed(details: var_details); + case 5: + return BreezEvent_BackupStarted(); + case 6: + return BreezEvent_BackupSucceeded(); + case 7: + var var_details = sse_decode_box_autoadd_backup_failed_data(deserializer); + return BreezEvent_BackupFailed(details: var_details); + case 8: + var var_details = sse_decode_box_autoadd_swap_info(deserializer); + return BreezEvent_SwapUpdated(details: var_details); + default: + throw UnimplementedError(''); + } + } + + @protected + BuyBitcoinProvider sse_decode_buy_bitcoin_provider(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return BuyBitcoinProvider.values[inner]; + } + + @protected + BuyBitcoinRequest sse_decode_buy_bitcoin_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_provider = sse_decode_buy_bitcoin_provider(deserializer); + var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + return BuyBitcoinRequest(provider: var_provider, openingFeeParams: var_openingFeeParams); + } + + @protected + BuyBitcoinResponse sse_decode_buy_bitcoin_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_url = sse_decode_String(deserializer); + var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + return BuyBitcoinResponse(url: var_url, openingFeeParams: var_openingFeeParams); + } + + @protected + ChannelState sse_decode_channel_state(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return ChannelState.values[inner]; + } + + @protected + CheckMessageRequest sse_decode_check_message_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_message = sse_decode_String(deserializer); + var var_pubkey = sse_decode_String(deserializer); + var var_signature = sse_decode_String(deserializer); + return CheckMessageRequest(message: var_message, pubkey: var_pubkey, signature: var_signature); + } + + @protected + CheckMessageResponse sse_decode_check_message_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_isValid = sse_decode_bool(deserializer); + return CheckMessageResponse(isValid: var_isValid); + } + + @protected + ClosedChannelPaymentDetails sse_decode_closed_channel_payment_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_state = sse_decode_channel_state(deserializer); + var var_fundingTxid = sse_decode_String(deserializer); + var var_shortChannelId = sse_decode_opt_String(deserializer); + var var_closingTxid = sse_decode_opt_String(deserializer); + return ClosedChannelPaymentDetails( + state: var_state, + fundingTxid: var_fundingTxid, + shortChannelId: var_shortChannelId, + closingTxid: var_closingTxid); + } + + @protected + Config sse_decode_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_breezserver = sse_decode_String(deserializer); + var var_chainnotifierUrl = sse_decode_String(deserializer); + var var_mempoolspaceUrl = sse_decode_opt_String(deserializer); + var var_workingDir = sse_decode_String(deserializer); + var var_network = sse_decode_network(deserializer); + var var_paymentTimeoutSec = sse_decode_u_32(deserializer); + var var_defaultLspId = sse_decode_opt_String(deserializer); + var var_apiKey = sse_decode_opt_String(deserializer); + var var_maxfeePercent = sse_decode_f_64(deserializer); + var var_exemptfeeMsat = sse_decode_u_64(deserializer); + var var_nodeConfig = sse_decode_node_config(deserializer); + return Config( + breezserver: var_breezserver, + chainnotifierUrl: var_chainnotifierUrl, + mempoolspaceUrl: var_mempoolspaceUrl, + workingDir: var_workingDir, + network: var_network, + paymentTimeoutSec: var_paymentTimeoutSec, + defaultLspId: var_defaultLspId, + apiKey: var_apiKey, + maxfeePercent: var_maxfeePercent, + exemptfeeMsat: var_exemptfeeMsat, + nodeConfig: var_nodeConfig); + } + + @protected + ConfigureNodeRequest sse_decode_configure_node_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_closeToAddress = sse_decode_opt_String(deserializer); + return ConfigureNodeRequest(closeToAddress: var_closeToAddress); + } + + @protected + ConnectRequest sse_decode_connect_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_config = sse_decode_config(deserializer); + var var_seed = sse_decode_list_prim_u_8_strict(deserializer); + var var_restoreOnly = sse_decode_opt_box_autoadd_bool(deserializer); + return ConnectRequest(config: var_config, seed: var_seed, restoreOnly: var_restoreOnly); + } + + @protected + CurrencyInfo sse_decode_currency_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_name = sse_decode_String(deserializer); + var var_fractionSize = sse_decode_u_32(deserializer); + var var_spacing = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_symbol = sse_decode_opt_box_autoadd_symbol(deserializer); + var var_uniqSymbol = sse_decode_opt_box_autoadd_symbol(deserializer); + var var_localizedName = sse_decode_opt_list_localized_name(deserializer); + var var_localeOverrides = sse_decode_opt_list_locale_overrides(deserializer); + return CurrencyInfo( + name: var_name, + fractionSize: var_fractionSize, + spacing: var_spacing, + symbol: var_symbol, + uniqSymbol: var_uniqSymbol, + localizedName: var_localizedName, + localeOverrides: var_localeOverrides); + } + + @protected + EnvironmentType sse_decode_environment_type(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return EnvironmentType.values[inner]; + } + + @protected + double sse_decode_f_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getFloat64(); + } + + @protected + FiatCurrency sse_decode_fiat_currency(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_info = sse_decode_currency_info(deserializer); + return FiatCurrency(id: var_id, info: var_info); + } + + @protected + GreenlightCredentials sse_decode_greenlight_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_deviceKey = sse_decode_list_prim_u_8_strict(deserializer); + var var_deviceCert = sse_decode_list_prim_u_8_strict(deserializer); + return GreenlightCredentials(deviceKey: var_deviceKey, deviceCert: var_deviceCert); + } + + @protected + GreenlightNodeConfig sse_decode_greenlight_node_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_partnerCredentials = sse_decode_opt_box_autoadd_greenlight_credentials(deserializer); + var var_inviteCode = sse_decode_opt_String(deserializer); + return GreenlightNodeConfig(partnerCredentials: var_partnerCredentials, inviteCode: var_inviteCode); + } + + @protected + HealthCheckStatus sse_decode_health_check_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return HealthCheckStatus.values[inner]; + } + + @protected + int sse_decode_i_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt32(); + } + + @protected + int sse_decode_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getInt64(); + } + + @protected + InputType sse_decode_input_type(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_address = sse_decode_box_autoadd_bitcoin_address_data(deserializer); + return InputType_BitcoinAddress(address: var_address); + case 1: + var var_invoice = sse_decode_box_autoadd_ln_invoice(deserializer); + return InputType_Bolt11(invoice: var_invoice); + case 2: + var var_nodeId = sse_decode_String(deserializer); + return InputType_NodeId(nodeId: var_nodeId); + case 3: + var var_url = sse_decode_String(deserializer); + return InputType_Url(url: var_url); + case 4: + var var_data = sse_decode_box_autoadd_ln_url_pay_request_data(deserializer); + return InputType_LnUrlPay(data: var_data); + case 5: + var var_data = sse_decode_box_autoadd_ln_url_withdraw_request_data(deserializer); + return InputType_LnUrlWithdraw(data: var_data); + case 6: + var var_data = sse_decode_box_autoadd_ln_url_auth_request_data(deserializer); + return InputType_LnUrlAuth(data: var_data); + case 7: + var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); + return InputType_LnUrlError(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + InvoicePaidDetails sse_decode_invoice_paid_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_paymentHash = sse_decode_String(deserializer); + var var_bolt11 = sse_decode_String(deserializer); + var var_payment = sse_decode_opt_box_autoadd_payment(deserializer); + return InvoicePaidDetails(paymentHash: var_paymentHash, bolt11: var_bolt11, payment: var_payment); + } + + @protected + List sse_decode_list_String(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_String(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_fiat_currency(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_fiat_currency(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_locale_overrides(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_locale_overrides(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_localized_name(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_localized_name(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_lsp_information(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_lsp_information(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_metadata_filter(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_metadata_filter(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_opening_fee_params(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_opening_fee_params(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_payment(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_payment(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_payment_type_filter(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_payment_type_filter(deserializer)); + } + return ans_; + } + + @protected + ListPaymentsRequest sse_decode_list_payments_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_filters = sse_decode_opt_list_payment_type_filter(deserializer); + var var_metadataFilters = sse_decode_opt_list_metadata_filter(deserializer); + var var_fromTimestamp = sse_decode_opt_box_autoadd_i_64(deserializer); + var var_toTimestamp = sse_decode_opt_box_autoadd_i_64(deserializer); + var var_includeFailures = sse_decode_opt_box_autoadd_bool(deserializer); + var var_offset = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_limit = sse_decode_opt_box_autoadd_u_32(deserializer); + return ListPaymentsRequest( + filters: var_filters, + metadataFilters: var_metadataFilters, + fromTimestamp: var_fromTimestamp, + toTimestamp: var_toTimestamp, + includeFailures: var_includeFailures, + offset: var_offset, + limit: var_limit); + } + + @protected + Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var len_ = sse_decode_i_32(deserializer); + return deserializer.buffer.getUint8List(len_); + } + + @protected + List sse_decode_list_rate(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_rate(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_reverse_swap_info(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_reverse_swap_info(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_route_hint(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_route_hint(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_route_hint_hop(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_route_hint_hop(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_swap_info(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_swap_info(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_tlv_entry(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_tlv_entry(deserializer)); + } + return ans_; + } + + @protected + List sse_decode_list_unspent_transaction_output(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_unspent_transaction_output(deserializer)); + } + return ans_; + } + + @protected + LNInvoice sse_decode_ln_invoice(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_bolt11 = sse_decode_String(deserializer); + var var_network = sse_decode_network(deserializer); + var var_payeePubkey = sse_decode_String(deserializer); + var var_paymentHash = sse_decode_String(deserializer); + var var_description = sse_decode_opt_String(deserializer); + var var_descriptionHash = sse_decode_opt_String(deserializer); + var var_amountMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_timestamp = sse_decode_u_64(deserializer); + var var_expiry = sse_decode_u_64(deserializer); + var var_routingHints = sse_decode_list_route_hint(deserializer); + var var_paymentSecret = sse_decode_list_prim_u_8_strict(deserializer); + var var_minFinalCltvExpiryDelta = sse_decode_u_64(deserializer); + return LNInvoice( + bolt11: var_bolt11, + network: var_network, + payeePubkey: var_payeePubkey, + paymentHash: var_paymentHash, + description: var_description, + descriptionHash: var_descriptionHash, + amountMsat: var_amountMsat, + timestamp: var_timestamp, + expiry: var_expiry, + routingHints: var_routingHints, + paymentSecret: var_paymentSecret, + minFinalCltvExpiryDelta: var_minFinalCltvExpiryDelta); + } + + @protected + LnPaymentDetails sse_decode_ln_payment_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_paymentHash = sse_decode_String(deserializer); + var var_label = sse_decode_String(deserializer); + var var_destinationPubkey = sse_decode_String(deserializer); + var var_paymentPreimage = sse_decode_String(deserializer); + var var_keysend = sse_decode_bool(deserializer); + var var_bolt11 = sse_decode_String(deserializer); + var var_openChannelBolt11 = sse_decode_opt_String(deserializer); + var var_lnurlSuccessAction = sse_decode_opt_box_autoadd_success_action_processed(deserializer); + var var_lnurlPayDomain = sse_decode_opt_String(deserializer); + var var_lnAddress = sse_decode_opt_String(deserializer); + var var_lnurlMetadata = sse_decode_opt_String(deserializer); + var var_lnurlWithdrawEndpoint = sse_decode_opt_String(deserializer); + var var_swapInfo = sse_decode_opt_box_autoadd_swap_info(deserializer); + var var_reverseSwapInfo = sse_decode_opt_box_autoadd_reverse_swap_info(deserializer); + var var_pendingExpirationBlock = sse_decode_opt_box_autoadd_u_32(deserializer); + return LnPaymentDetails( + paymentHash: var_paymentHash, + label: var_label, + destinationPubkey: var_destinationPubkey, + paymentPreimage: var_paymentPreimage, + keysend: var_keysend, + bolt11: var_bolt11, + openChannelBolt11: var_openChannelBolt11, + lnurlSuccessAction: var_lnurlSuccessAction, + lnurlPayDomain: var_lnurlPayDomain, + lnAddress: var_lnAddress, + lnurlMetadata: var_lnurlMetadata, + lnurlWithdrawEndpoint: var_lnurlWithdrawEndpoint, + swapInfo: var_swapInfo, + reverseSwapInfo: var_reverseSwapInfo, + pendingExpirationBlock: var_pendingExpirationBlock); + } + + @protected + LnUrlAuthRequestData sse_decode_ln_url_auth_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_k1 = sse_decode_String(deserializer); + var var_action = sse_decode_opt_String(deserializer); + var var_domain = sse_decode_String(deserializer); + var var_url = sse_decode_String(deserializer); + return LnUrlAuthRequestData(k1: var_k1, action: var_action, domain: var_domain, url: var_url); + } + + @protected + LnUrlCallbackStatus sse_decode_ln_url_callback_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + return LnUrlCallbackStatus_Ok(); + case 1: + var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); + return LnUrlCallbackStatus_ErrorStatus(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + LnUrlErrorData sse_decode_ln_url_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_reason = sse_decode_String(deserializer); + return LnUrlErrorData(reason: var_reason); + } + + @protected + LnUrlPayErrorData sse_decode_ln_url_pay_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_paymentHash = sse_decode_String(deserializer); + var var_reason = sse_decode_String(deserializer); + return LnUrlPayErrorData(paymentHash: var_paymentHash, reason: var_reason); + } + + @protected + LnUrlPayRequest sse_decode_ln_url_pay_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_data = sse_decode_ln_url_pay_request_data(deserializer); + var var_amountMsat = sse_decode_u_64(deserializer); + var var_comment = sse_decode_opt_String(deserializer); + var var_paymentLabel = sse_decode_opt_String(deserializer); + return LnUrlPayRequest( + data: var_data, amountMsat: var_amountMsat, comment: var_comment, paymentLabel: var_paymentLabel); + } + + @protected + LnUrlPayRequestData sse_decode_ln_url_pay_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_callback = sse_decode_String(deserializer); + var var_minSendable = sse_decode_u_64(deserializer); + var var_maxSendable = sse_decode_u_64(deserializer); + var var_metadataStr = sse_decode_String(deserializer); + var var_commentAllowed = sse_decode_u_16(deserializer); + var var_domain = sse_decode_String(deserializer); + var var_allowsNostr = sse_decode_bool(deserializer); + var var_nostrPubkey = sse_decode_opt_String(deserializer); + var var_lnAddress = sse_decode_opt_String(deserializer); + return LnUrlPayRequestData( + callback: var_callback, + minSendable: var_minSendable, + maxSendable: var_maxSendable, + metadataStr: var_metadataStr, + commentAllowed: var_commentAllowed, + domain: var_domain, + allowsNostr: var_allowsNostr, + nostrPubkey: var_nostrPubkey, + lnAddress: var_lnAddress); + } + + @protected + LnUrlPayResult sse_decode_ln_url_pay_result(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_data = sse_decode_box_autoadd_ln_url_pay_success_data(deserializer); + return LnUrlPayResult_EndpointSuccess(data: var_data); + case 1: + var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); + return LnUrlPayResult_EndpointError(data: var_data); + case 2: + var var_data = sse_decode_box_autoadd_ln_url_pay_error_data(deserializer); + return LnUrlPayResult_PayError(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + LnUrlPaySuccessData sse_decode_ln_url_pay_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_payment = sse_decode_payment(deserializer); + var var_successAction = sse_decode_opt_box_autoadd_success_action_processed(deserializer); + return LnUrlPaySuccessData(payment: var_payment, successAction: var_successAction); + } + + @protected + LnUrlWithdrawRequest sse_decode_ln_url_withdraw_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_data = sse_decode_ln_url_withdraw_request_data(deserializer); + var var_amountMsat = sse_decode_u_64(deserializer); + var var_description = sse_decode_opt_String(deserializer); + return LnUrlWithdrawRequest(data: var_data, amountMsat: var_amountMsat, description: var_description); + } + + @protected + LnUrlWithdrawRequestData sse_decode_ln_url_withdraw_request_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_callback = sse_decode_String(deserializer); + var var_k1 = sse_decode_String(deserializer); + var var_defaultDescription = sse_decode_String(deserializer); + var var_minWithdrawable = sse_decode_u_64(deserializer); + var var_maxWithdrawable = sse_decode_u_64(deserializer); + return LnUrlWithdrawRequestData( + callback: var_callback, + k1: var_k1, + defaultDescription: var_defaultDescription, + minWithdrawable: var_minWithdrawable, + maxWithdrawable: var_maxWithdrawable); + } + + @protected + LnUrlWithdrawResult sse_decode_ln_url_withdraw_result(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_data = sse_decode_box_autoadd_ln_url_withdraw_success_data(deserializer); + return LnUrlWithdrawResult_Ok(data: var_data); + case 1: + var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); + return LnUrlWithdrawResult_ErrorStatus(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + LnUrlWithdrawSuccessData sse_decode_ln_url_withdraw_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_invoice = sse_decode_ln_invoice(deserializer); + return LnUrlWithdrawSuccessData(invoice: var_invoice); + } + + @protected + LocaleOverrides sse_decode_locale_overrides(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_locale = sse_decode_String(deserializer); + var var_spacing = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_symbol = sse_decode_symbol(deserializer); + return LocaleOverrides(locale: var_locale, spacing: var_spacing, symbol: var_symbol); + } + + @protected + LocalizedName sse_decode_localized_name(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_locale = sse_decode_String(deserializer); + var var_name = sse_decode_String(deserializer); + return LocalizedName(locale: var_locale, name: var_name); + } + + @protected + LogEntry sse_decode_log_entry(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_line = sse_decode_String(deserializer); + var var_level = sse_decode_String(deserializer); + return LogEntry(line: var_line, level: var_level); + } + + @protected + LspInformation sse_decode_lsp_information(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_name = sse_decode_String(deserializer); + var var_widgetUrl = sse_decode_String(deserializer); + var var_pubkey = sse_decode_String(deserializer); + var var_host = sse_decode_String(deserializer); + var var_baseFeeMsat = sse_decode_i_64(deserializer); + var var_feeRate = sse_decode_f_64(deserializer); + var var_timeLockDelta = sse_decode_u_32(deserializer); + var var_minHtlcMsat = sse_decode_i_64(deserializer); + var var_lspPubkey = sse_decode_list_prim_u_8_strict(deserializer); + var var_openingFeeParamsList = sse_decode_opening_fee_params_menu(deserializer); + return LspInformation( + id: var_id, + name: var_name, + widgetUrl: var_widgetUrl, + pubkey: var_pubkey, + host: var_host, + baseFeeMsat: var_baseFeeMsat, + feeRate: var_feeRate, + timeLockDelta: var_timeLockDelta, + minHtlcMsat: var_minHtlcMsat, + lspPubkey: var_lspPubkey, + openingFeeParamsList: var_openingFeeParamsList); + } + + @protected + MaxReverseSwapAmountResponse sse_decode_max_reverse_swap_amount_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_totalSat = sse_decode_u_64(deserializer); + return MaxReverseSwapAmountResponse(totalSat: var_totalSat); + } + + @protected + MessageSuccessActionData sse_decode_message_success_action_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_message = sse_decode_String(deserializer); + return MessageSuccessActionData(message: var_message); + } + + @protected + MetadataFilter sse_decode_metadata_filter(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_jsonPath = sse_decode_String(deserializer); + var var_jsonValue = sse_decode_String(deserializer); + return MetadataFilter(jsonPath: var_jsonPath, jsonValue: var_jsonValue); + } + + @protected + Network sse_decode_network(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return Network.values[inner]; + } + + @protected + NodeConfig sse_decode_node_config(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_config = sse_decode_box_autoadd_greenlight_node_config(deserializer); + return NodeConfig_Greenlight(config: var_config); + default: + throw UnimplementedError(''); + } + } + + @protected + NodeCredentials sse_decode_node_credentials(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_credentials = sse_decode_box_autoadd_greenlight_credentials(deserializer); + return NodeCredentials_Greenlight(credentials: var_credentials); + default: + throw UnimplementedError(''); + } + } + + @protected + NodeState sse_decode_node_state(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_blockHeight = sse_decode_u_32(deserializer); + var var_channelsBalanceMsat = sse_decode_u_64(deserializer); + var var_onchainBalanceMsat = sse_decode_u_64(deserializer); + var var_pendingOnchainBalanceMsat = sse_decode_u_64(deserializer); + var var_utxos = sse_decode_list_unspent_transaction_output(deserializer); + var var_maxPayableMsat = sse_decode_u_64(deserializer); + var var_maxReceivableMsat = sse_decode_u_64(deserializer); + var var_maxSinglePaymentAmountMsat = sse_decode_u_64(deserializer); + var var_maxChanReserveMsats = sse_decode_u_64(deserializer); + var var_connectedPeers = sse_decode_list_String(deserializer); + var var_inboundLiquidityMsats = sse_decode_u_64(deserializer); + return NodeState( + id: var_id, + blockHeight: var_blockHeight, + channelsBalanceMsat: var_channelsBalanceMsat, + onchainBalanceMsat: var_onchainBalanceMsat, + pendingOnchainBalanceMsat: var_pendingOnchainBalanceMsat, + utxos: var_utxos, + maxPayableMsat: var_maxPayableMsat, + maxReceivableMsat: var_maxReceivableMsat, + maxSinglePaymentAmountMsat: var_maxSinglePaymentAmountMsat, + maxChanReserveMsats: var_maxChanReserveMsats, + connectedPeers: var_connectedPeers, + inboundLiquidityMsats: var_inboundLiquidityMsats); + } + + @protected + OnchainPaymentLimitsResponse sse_decode_onchain_payment_limits_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_minSat = sse_decode_u_64(deserializer); + var var_maxSat = sse_decode_u_64(deserializer); + return OnchainPaymentLimitsResponse(minSat: var_minSat, maxSat: var_maxSat); + } + + @protected + OpenChannelFeeRequest sse_decode_open_channel_fee_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_amountMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_expiry = sse_decode_opt_box_autoadd_u_32(deserializer); + return OpenChannelFeeRequest(amountMsat: var_amountMsat, expiry: var_expiry); + } + + @protected + OpenChannelFeeResponse sse_decode_open_channel_fee_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_feeMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_feeParams = sse_decode_opening_fee_params(deserializer); + return OpenChannelFeeResponse(feeMsat: var_feeMsat, feeParams: var_feeParams); + } + + @protected + OpeningFeeParams sse_decode_opening_fee_params(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_minMsat = sse_decode_u_64(deserializer); + var var_proportional = sse_decode_u_32(deserializer); + var var_validUntil = sse_decode_String(deserializer); + var var_maxIdleTime = sse_decode_u_32(deserializer); + var var_maxClientToSelfDelay = sse_decode_u_32(deserializer); + var var_promise = sse_decode_String(deserializer); + return OpeningFeeParams( + minMsat: var_minMsat, + proportional: var_proportional, + validUntil: var_validUntil, + maxIdleTime: var_maxIdleTime, + maxClientToSelfDelay: var_maxClientToSelfDelay, + promise: var_promise); + } + + @protected + OpeningFeeParamsMenu sse_decode_opening_fee_params_menu(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_values = sse_decode_list_opening_fee_params(deserializer); + return OpeningFeeParamsMenu(values: var_values); + } + + @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 + bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_bool(deserializer)); + } else { + return null; + } + } + + @protected + GreenlightCredentials? sse_decode_opt_box_autoadd_greenlight_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_greenlight_credentials(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_i_64(deserializer)); + } else { + return null; + } + } + + @protected + LNInvoice? sse_decode_opt_box_autoadd_ln_invoice(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_ln_invoice(deserializer)); + } else { + return null; + } + } + + @protected + LspInformation? sse_decode_opt_box_autoadd_lsp_information(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_lsp_information(deserializer)); + } else { + return null; + } + } + + @protected + NodeCredentials? sse_decode_opt_box_autoadd_node_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_node_credentials(deserializer)); + } else { + return null; + } + } + + @protected + OpeningFeeParams? sse_decode_opt_box_autoadd_opening_fee_params(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_opening_fee_params(deserializer)); + } else { + return null; + } + } + + @protected + Payment? sse_decode_opt_box_autoadd_payment(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_payment(deserializer)); + } else { + return null; + } + } + + @protected + ReverseSwapInfo? sse_decode_opt_box_autoadd_reverse_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_reverse_swap_info(deserializer)); + } else { + return null; + } + } + + @protected + SuccessActionProcessed? sse_decode_opt_box_autoadd_success_action_processed(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_success_action_processed(deserializer)); + } else { + return null; + } + } + + @protected + SwapInfo? sse_decode_opt_box_autoadd_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_swap_info(deserializer)); + } else { + return null; + } + } + + @protected + Symbol? sse_decode_opt_box_autoadd_symbol(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_symbol(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_32(deserializer)); + } else { + return null; + } + } + + @protected + int? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_64(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_String(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_String(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_locale_overrides(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_locale_overrides(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_localized_name(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_localized_name(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_metadata_filter(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_metadata_filter(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_payment_type_filter(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_payment_type_filter(deserializer)); + } else { + return null; + } + } + + @protected + Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_prim_u_8_strict(deserializer)); + } else { + return null; + } + } + + @protected + List? sse_decode_opt_list_tlv_entry(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_list_tlv_entry(deserializer)); + } else { + return null; + } + } + + @protected + PayOnchainRequest sse_decode_pay_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_recipientAddress = sse_decode_String(deserializer); + var var_prepareRes = sse_decode_prepare_onchain_payment_response(deserializer); + return PayOnchainRequest(recipientAddress: var_recipientAddress, prepareRes: var_prepareRes); + } + + @protected + PayOnchainResponse sse_decode_pay_onchain_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_reverseSwapInfo = sse_decode_reverse_swap_info(deserializer); + return PayOnchainResponse(reverseSwapInfo: var_reverseSwapInfo); + } + + @protected + Payment sse_decode_payment(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_paymentType = sse_decode_payment_type(deserializer); + var var_paymentTime = sse_decode_i_64(deserializer); + var var_amountMsat = sse_decode_u_64(deserializer); + var var_feeMsat = sse_decode_u_64(deserializer); + var var_status = sse_decode_payment_status(deserializer); + var var_error = sse_decode_opt_String(deserializer); + var var_description = sse_decode_opt_String(deserializer); + var var_details = sse_decode_payment_details(deserializer); + var var_metadata = sse_decode_opt_String(deserializer); + return Payment( + id: var_id, + paymentType: var_paymentType, + paymentTime: var_paymentTime, + amountMsat: var_amountMsat, + feeMsat: var_feeMsat, + status: var_status, + error: var_error, + description: var_description, + details: var_details, + metadata: var_metadata); + } + + @protected + PaymentDetails sse_decode_payment_details(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_data = sse_decode_box_autoadd_ln_payment_details(deserializer); + return PaymentDetails_Ln(data: var_data); + case 1: + var var_data = sse_decode_box_autoadd_closed_channel_payment_details(deserializer); + return PaymentDetails_ClosedChannel(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + PaymentFailedData sse_decode_payment_failed_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_error = sse_decode_String(deserializer); + var var_nodeId = sse_decode_String(deserializer); + var var_invoice = sse_decode_opt_box_autoadd_ln_invoice(deserializer); + return PaymentFailedData(error: var_error, nodeId: var_nodeId, invoice: var_invoice); + } + + @protected + PaymentStatus sse_decode_payment_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return PaymentStatus.values[inner]; + } + + @protected + PaymentType sse_decode_payment_type(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return PaymentType.values[inner]; + } + + @protected + PaymentTypeFilter sse_decode_payment_type_filter(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return PaymentTypeFilter.values[inner]; + } + + @protected + PrepareOnchainPaymentRequest sse_decode_prepare_onchain_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_amountSat = sse_decode_u_64(deserializer); + var var_amountType = sse_decode_swap_amount_type(deserializer); + var var_claimTxFeerate = sse_decode_u_32(deserializer); + return PrepareOnchainPaymentRequest( + amountSat: var_amountSat, amountType: var_amountType, claimTxFeerate: var_claimTxFeerate); + } + + @protected + PrepareOnchainPaymentResponse sse_decode_prepare_onchain_payment_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_feesHash = sse_decode_String(deserializer); + var var_feesPercentage = sse_decode_f_64(deserializer); + var var_feesLockup = sse_decode_u_64(deserializer); + var var_feesClaim = sse_decode_u_64(deserializer); + var var_senderAmountSat = sse_decode_u_64(deserializer); + var var_recipientAmountSat = sse_decode_u_64(deserializer); + var var_totalFees = sse_decode_u_64(deserializer); + return PrepareOnchainPaymentResponse( + feesHash: var_feesHash, + feesPercentage: var_feesPercentage, + feesLockup: var_feesLockup, + feesClaim: var_feesClaim, + senderAmountSat: var_senderAmountSat, + recipientAmountSat: var_recipientAmountSat, + totalFees: var_totalFees); + } + + @protected + PrepareRedeemOnchainFundsRequest sse_decode_prepare_redeem_onchain_funds_request( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_toAddress = sse_decode_String(deserializer); + var var_satPerVbyte = sse_decode_u_32(deserializer); + return PrepareRedeemOnchainFundsRequest(toAddress: var_toAddress, satPerVbyte: var_satPerVbyte); + } + + @protected + PrepareRedeemOnchainFundsResponse sse_decode_prepare_redeem_onchain_funds_response( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_txWeight = sse_decode_u_64(deserializer); + var var_txFeeSat = sse_decode_u_64(deserializer); + return PrepareRedeemOnchainFundsResponse(txWeight: var_txWeight, txFeeSat: var_txFeeSat); + } + + @protected + PrepareRefundRequest sse_decode_prepare_refund_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_swapAddress = sse_decode_String(deserializer); + var var_toAddress = sse_decode_String(deserializer); + var var_satPerVbyte = sse_decode_u_32(deserializer); + return PrepareRefundRequest( + swapAddress: var_swapAddress, toAddress: var_toAddress, satPerVbyte: var_satPerVbyte); + } + + @protected + PrepareRefundResponse sse_decode_prepare_refund_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_refundTxWeight = sse_decode_u_32(deserializer); + var var_refundTxFeeSat = sse_decode_u_64(deserializer); + return PrepareRefundResponse(refundTxWeight: var_refundTxWeight, refundTxFeeSat: var_refundTxFeeSat); + } + + @protected + Rate sse_decode_rate(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_coin = sse_decode_String(deserializer); + var var_value = sse_decode_f_64(deserializer); + return Rate(coin: var_coin, value: var_value); + } + + @protected + ReceiveOnchainRequest sse_decode_receive_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + return ReceiveOnchainRequest(openingFeeParams: var_openingFeeParams); + } + + @protected + ReceivePaymentRequest sse_decode_receive_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_amountMsat = sse_decode_u_64(deserializer); + var var_description = sse_decode_String(deserializer); + var var_preimage = sse_decode_opt_list_prim_u_8_strict(deserializer); + var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + var var_useDescriptionHash = sse_decode_opt_box_autoadd_bool(deserializer); + var var_expiry = sse_decode_opt_box_autoadd_u_32(deserializer); + var var_cltv = sse_decode_opt_box_autoadd_u_32(deserializer); + return ReceivePaymentRequest( + amountMsat: var_amountMsat, + description: var_description, + preimage: var_preimage, + openingFeeParams: var_openingFeeParams, + useDescriptionHash: var_useDescriptionHash, + expiry: var_expiry, + cltv: var_cltv); + } + + @protected + ReceivePaymentResponse sse_decode_receive_payment_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_lnInvoice = sse_decode_ln_invoice(deserializer); + var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + var var_openingFeeMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + return ReceivePaymentResponse( + lnInvoice: var_lnInvoice, openingFeeParams: var_openingFeeParams, openingFeeMsat: var_openingFeeMsat); + } + + @protected + RecommendedFees sse_decode_recommended_fees(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_fastestFee = sse_decode_u_64(deserializer); + var var_halfHourFee = sse_decode_u_64(deserializer); + var var_hourFee = sse_decode_u_64(deserializer); + var var_economyFee = sse_decode_u_64(deserializer); + var var_minimumFee = sse_decode_u_64(deserializer); + return RecommendedFees( + fastestFee: var_fastestFee, + halfHourFee: var_halfHourFee, + hourFee: var_hourFee, + economyFee: var_economyFee, + minimumFee: var_minimumFee); + } + + @protected + RedeemOnchainFundsRequest sse_decode_redeem_onchain_funds_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_toAddress = sse_decode_String(deserializer); + var var_satPerVbyte = sse_decode_u_32(deserializer); + return RedeemOnchainFundsRequest(toAddress: var_toAddress, satPerVbyte: var_satPerVbyte); + } + + @protected + RedeemOnchainFundsResponse sse_decode_redeem_onchain_funds_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_txid = sse_decode_list_prim_u_8_strict(deserializer); + return RedeemOnchainFundsResponse(txid: var_txid); + } + + @protected + RefundRequest sse_decode_refund_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_swapAddress = sse_decode_String(deserializer); + var var_toAddress = sse_decode_String(deserializer); + var var_satPerVbyte = sse_decode_u_32(deserializer); + return RefundRequest( + swapAddress: var_swapAddress, toAddress: var_toAddress, satPerVbyte: var_satPerVbyte); + } + + @protected + RefundResponse sse_decode_refund_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_refundTxId = sse_decode_String(deserializer); + return RefundResponse(refundTxId: var_refundTxId); + } + + @protected + ReportIssueRequest sse_decode_report_issue_request(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_data = sse_decode_box_autoadd_report_payment_failure_details(deserializer); + return ReportIssueRequest_PaymentFailure(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + ReportPaymentFailureDetails sse_decode_report_payment_failure_details(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_paymentHash = sse_decode_String(deserializer); + var var_comment = sse_decode_opt_String(deserializer); + return ReportPaymentFailureDetails(paymentHash: var_paymentHash, comment: var_comment); + } + + @protected + ReverseSwapFeesRequest sse_decode_reverse_swap_fees_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_sendAmountSat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_claimTxFeerate = sse_decode_opt_box_autoadd_u_32(deserializer); + return ReverseSwapFeesRequest(sendAmountSat: var_sendAmountSat, claimTxFeerate: var_claimTxFeerate); + } + + @protected + ReverseSwapInfo sse_decode_reverse_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_id = sse_decode_String(deserializer); + var var_claimPubkey = sse_decode_String(deserializer); + var var_lockupTxid = sse_decode_opt_String(deserializer); + var var_claimTxid = sse_decode_opt_String(deserializer); + var var_onchainAmountSat = sse_decode_u_64(deserializer); + var var_status = sse_decode_reverse_swap_status(deserializer); + return ReverseSwapInfo( + id: var_id, + claimPubkey: var_claimPubkey, + lockupTxid: var_lockupTxid, + claimTxid: var_claimTxid, + onchainAmountSat: var_onchainAmountSat, + status: var_status); + } + + @protected + ReverseSwapPairInfo sse_decode_reverse_swap_pair_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_min = sse_decode_u_64(deserializer); + var var_max = sse_decode_u_64(deserializer); + var var_feesHash = sse_decode_String(deserializer); + var var_feesPercentage = sse_decode_f_64(deserializer); + var var_feesLockup = sse_decode_u_64(deserializer); + var var_feesClaim = sse_decode_u_64(deserializer); + var var_totalFees = sse_decode_opt_box_autoadd_u_64(deserializer); + return ReverseSwapPairInfo( + min: var_min, + max: var_max, + feesHash: var_feesHash, + feesPercentage: var_feesPercentage, + feesLockup: var_feesLockup, + feesClaim: var_feesClaim, + totalFees: var_totalFees); + } + + @protected + ReverseSwapStatus sse_decode_reverse_swap_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return ReverseSwapStatus.values[inner]; + } + + @protected + RouteHint sse_decode_route_hint(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_hops = sse_decode_list_route_hint_hop(deserializer); + return RouteHint(hops: var_hops); + } + + @protected + RouteHintHop sse_decode_route_hint_hop(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_srcNodeId = sse_decode_String(deserializer); + var var_shortChannelId = sse_decode_u_64(deserializer); + var var_feesBaseMsat = sse_decode_u_32(deserializer); + var var_feesProportionalMillionths = sse_decode_u_32(deserializer); + var var_cltvExpiryDelta = sse_decode_u_64(deserializer); + var var_htlcMinimumMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_htlcMaximumMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + return RouteHintHop( + srcNodeId: var_srcNodeId, + shortChannelId: var_shortChannelId, + feesBaseMsat: var_feesBaseMsat, + feesProportionalMillionths: var_feesProportionalMillionths, + cltvExpiryDelta: var_cltvExpiryDelta, + htlcMinimumMsat: var_htlcMinimumMsat, + htlcMaximumMsat: var_htlcMaximumMsat); + } + + @protected + SendOnchainRequest sse_decode_send_onchain_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_amountSat = sse_decode_u_64(deserializer); + var var_onchainRecipientAddress = sse_decode_String(deserializer); + var var_pairHash = sse_decode_String(deserializer); + var var_satPerVbyte = sse_decode_u_32(deserializer); + return SendOnchainRequest( + amountSat: var_amountSat, + onchainRecipientAddress: var_onchainRecipientAddress, + pairHash: var_pairHash, + satPerVbyte: var_satPerVbyte); + } + + @protected + SendOnchainResponse sse_decode_send_onchain_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_reverseSwapInfo = sse_decode_reverse_swap_info(deserializer); + return SendOnchainResponse(reverseSwapInfo: var_reverseSwapInfo); + } + + @protected + SendPaymentRequest sse_decode_send_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_bolt11 = sse_decode_String(deserializer); + var var_amountMsat = sse_decode_opt_box_autoadd_u_64(deserializer); + var var_label = sse_decode_opt_String(deserializer); + return SendPaymentRequest(bolt11: var_bolt11, amountMsat: var_amountMsat, label: var_label); + } + + @protected + SendPaymentResponse sse_decode_send_payment_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_payment = sse_decode_payment(deserializer); + return SendPaymentResponse(payment: var_payment); + } + + @protected + SendSpontaneousPaymentRequest sse_decode_send_spontaneous_payment_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_nodeId = sse_decode_String(deserializer); + var var_amountMsat = sse_decode_u_64(deserializer); + var var_extraTlvs = sse_decode_opt_list_tlv_entry(deserializer); + var var_label = sse_decode_opt_String(deserializer); + return SendSpontaneousPaymentRequest( + nodeId: var_nodeId, amountMsat: var_amountMsat, extraTlvs: var_extraTlvs, label: var_label); + } + + @protected + ServiceHealthCheckResponse sse_decode_service_health_check_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_status = sse_decode_health_check_status(deserializer); + return ServiceHealthCheckResponse(status: var_status); + } + + @protected + SignMessageRequest sse_decode_sign_message_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_message = sse_decode_String(deserializer); + return SignMessageRequest(message: var_message); + } + + @protected + SignMessageResponse sse_decode_sign_message_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_signature = sse_decode_String(deserializer); + return SignMessageResponse(signature: var_signature); + } + + @protected + StaticBackupRequest sse_decode_static_backup_request(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_workingDir = sse_decode_String(deserializer); + return StaticBackupRequest(workingDir: var_workingDir); + } + + @protected + StaticBackupResponse sse_decode_static_backup_response(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_backup = sse_decode_opt_list_String(deserializer); + return StaticBackupResponse(backup: var_backup); + } + + @protected + SuccessActionProcessed sse_decode_success_action_processed(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_result = sse_decode_box_autoadd_aes_success_action_data_result(deserializer); + return SuccessActionProcessed_Aes(result: var_result); + case 1: + var var_data = sse_decode_box_autoadd_message_success_action_data(deserializer); + return SuccessActionProcessed_Message(data: var_data); + case 2: + var var_data = sse_decode_box_autoadd_url_success_action_data(deserializer); + return SuccessActionProcessed_Url(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + SwapAmountType sse_decode_swap_amount_type(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return SwapAmountType.values[inner]; + } + + @protected + SwapInfo sse_decode_swap_info(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_bitcoinAddress = sse_decode_String(deserializer); + var var_createdAt = sse_decode_i_64(deserializer); + var var_lockHeight = sse_decode_i_64(deserializer); + var var_paymentHash = sse_decode_list_prim_u_8_strict(deserializer); + var var_preimage = sse_decode_list_prim_u_8_strict(deserializer); + var var_privateKey = sse_decode_list_prim_u_8_strict(deserializer); + var var_publicKey = sse_decode_list_prim_u_8_strict(deserializer); + var var_swapperPublicKey = sse_decode_list_prim_u_8_strict(deserializer); + var var_script = sse_decode_list_prim_u_8_strict(deserializer); + var var_bolt11 = sse_decode_opt_String(deserializer); + var var_paidMsat = sse_decode_u_64(deserializer); + var var_totalIncomingTxs = sse_decode_u_64(deserializer); + var var_confirmedSats = sse_decode_u_64(deserializer); + var var_unconfirmedSats = sse_decode_u_64(deserializer); + var var_status = sse_decode_swap_status(deserializer); + var var_refundTxIds = sse_decode_list_String(deserializer); + var var_unconfirmedTxIds = sse_decode_list_String(deserializer); + var var_confirmedTxIds = sse_decode_list_String(deserializer); + var var_minAllowedDeposit = sse_decode_i_64(deserializer); + var var_maxAllowedDeposit = sse_decode_i_64(deserializer); + var var_maxSwapperPayable = sse_decode_i_64(deserializer); + var var_lastRedeemError = sse_decode_opt_String(deserializer); + var var_channelOpeningFees = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); + var var_confirmedAt = sse_decode_opt_box_autoadd_u_32(deserializer); + return SwapInfo( + bitcoinAddress: var_bitcoinAddress, + createdAt: var_createdAt, + lockHeight: var_lockHeight, + paymentHash: var_paymentHash, + preimage: var_preimage, + privateKey: var_privateKey, + publicKey: var_publicKey, + swapperPublicKey: var_swapperPublicKey, + script: var_script, + bolt11: var_bolt11, + paidMsat: var_paidMsat, + totalIncomingTxs: var_totalIncomingTxs, + confirmedSats: var_confirmedSats, + unconfirmedSats: var_unconfirmedSats, + status: var_status, + refundTxIds: var_refundTxIds, + unconfirmedTxIds: var_unconfirmedTxIds, + confirmedTxIds: var_confirmedTxIds, + minAllowedDeposit: var_minAllowedDeposit, + maxAllowedDeposit: var_maxAllowedDeposit, + maxSwapperPayable: var_maxSwapperPayable, + lastRedeemError: var_lastRedeemError, + channelOpeningFees: var_channelOpeningFees, + confirmedAt: var_confirmedAt); + } + + @protected + SwapStatus sse_decode_swap_status(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var inner = sse_decode_i_32(deserializer); + return SwapStatus.values[inner]; + } + + @protected + Symbol sse_decode_symbol(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_grapheme = sse_decode_opt_String(deserializer); + var var_template = sse_decode_opt_String(deserializer); + var var_rtl = sse_decode_opt_box_autoadd_bool(deserializer); + var var_position = sse_decode_opt_box_autoadd_u_32(deserializer); + return Symbol(grapheme: var_grapheme, template: var_template, rtl: var_rtl, position: var_position); + } + + @protected + TlvEntry sse_decode_tlv_entry(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_fieldNumber = sse_decode_u_64(deserializer); + var var_value = sse_decode_list_prim_u_8_strict(deserializer); + return TlvEntry(fieldNumber: var_fieldNumber, value: var_value); + } + + @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 + return deserializer.buffer.getUint32(); + } + + @protected + int sse_decode_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint64(); + } + + @protected + int sse_decode_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8(); + } + + @protected + void sse_decode_unit(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + UnspentTransactionOutput sse_decode_unspent_transaction_output(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_txid = sse_decode_list_prim_u_8_strict(deserializer); + var var_outnum = sse_decode_u_32(deserializer); + var var_amountMillisatoshi = sse_decode_u_64(deserializer); + var var_address = sse_decode_String(deserializer); + var var_reserved = sse_decode_bool(deserializer); + return UnspentTransactionOutput( + txid: var_txid, + outnum: var_outnum, + amountMillisatoshi: var_amountMillisatoshi, + address: var_address, + reserved: var_reserved); + } + + @protected + UrlSuccessActionData sse_decode_url_success_action_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_description = sse_decode_String(deserializer); + var var_url = sse_decode_String(deserializer); + return UrlSuccessActionData(description: var_description, url: var_url); + } + + @protected + bool cst_encode_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_buy_bitcoin_provider(BuyBitcoinProvider raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_channel_state(ChannelState raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_environment_type(EnvironmentType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + double cst_encode_f_64(double raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_health_check_status(HealthCheckStatus 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 + return raw; + } + + @protected + int cst_encode_network(Network raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_payment_status(PaymentStatus raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_payment_type(PaymentType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_payment_type_filter(PaymentTypeFilter raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_reverse_swap_status(ReverseSwapStatus raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_swap_amount_type(SwapAmountType raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_i_32(raw.index); + } + + @protected + int cst_encode_swap_status(SwapStatus 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 + return raw; + } + + @protected + int cst_encode_u_8(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + void cst_encode_unit(void raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + void sse_encode_AnyhowException(AnyhowException self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + throw UnimplementedError('Unreachable ()'); + } + + @protected + void sse_encode_StreamSink_breez_event_Dco(RustStreamSink self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String( + self.setupAndSerialize( + codec: DcoCodec(decodeSuccessData: dco_decode_breez_event, decodeErrorData: null)), + serializer); + } + + @protected + void sse_encode_StreamSink_log_entry_Dco(RustStreamSink self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String( + self.setupAndSerialize( + codec: DcoCodec(decodeSuccessData: dco_decode_log_entry, decodeErrorData: null)), + serializer); + } + + @protected + void sse_encode_String(String self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer); + } + + @protected + void sse_encode_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.description, serializer); + sse_encode_String(self.plaintext, serializer); + } + + @protected + void sse_encode_aes_success_action_data_result(AesSuccessActionDataResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case AesSuccessActionDataResult_Decrypted(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_aes_success_action_data_decrypted(data, serializer); + case AesSuccessActionDataResult_ErrorStatus(reason: final reason): + sse_encode_i_32(1, serializer); + sse_encode_String(reason, serializer); + } + } + + @protected + void sse_encode_backup_failed_data(BackupFailedData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.error, serializer); + } + + @protected + void sse_encode_backup_status(BackupStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bool(self.backedUp, serializer); + sse_encode_opt_box_autoadd_u_64(self.lastBackupTime, serializer); + } + + @protected + void sse_encode_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.address, serializer); + sse_encode_network(self.network, serializer); + sse_encode_opt_box_autoadd_u_64(self.amountSat, serializer); + sse_encode_opt_String(self.label, serializer); + sse_encode_opt_String(self.message, serializer); + } + + @protected + void sse_encode_bool(bool self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self ? 1 : 0); + } + + @protected + void sse_encode_box_autoadd_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_aes_success_action_data_decrypted(self, serializer); + } + + @protected + void sse_encode_box_autoadd_aes_success_action_data_result( + AesSuccessActionDataResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_aes_success_action_data_result(self, serializer); + } + + @protected + void sse_encode_box_autoadd_backup_failed_data(BackupFailedData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_backup_failed_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bitcoin_address_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bool(self, serializer); + } + + @protected + void sse_encode_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_buy_bitcoin_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_check_message_request(CheckMessageRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_check_message_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_closed_channel_payment_details( + ClosedChannelPaymentDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_closed_channel_payment_details(self, serializer); + } + + @protected + void sse_encode_box_autoadd_configure_node_request(ConfigureNodeRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_configure_node_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_connect_request(ConnectRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_connect_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_greenlight_credentials(GreenlightCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_greenlight_credentials(self, serializer); + } + + @protected + void sse_encode_box_autoadd_greenlight_node_config(GreenlightNodeConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_greenlight_node_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_64(self, serializer); + } + + @protected + void sse_encode_box_autoadd_invoice_paid_details(InvoicePaidDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_invoice_paid_details(self, serializer); + } + + @protected + void sse_encode_box_autoadd_list_payments_request(ListPaymentsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_payments_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_invoice(LNInvoice self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_invoice(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_payment_details(LnPaymentDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_payment_details(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_auth_request_data(LnUrlAuthRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_auth_request_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_error_data(LnUrlErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_error_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_error_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_pay_request_data(LnUrlPayRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_request_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_success_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_withdraw_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_request_data( + LnUrlWithdrawRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_withdraw_request_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_success_data( + LnUrlWithdrawSuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_withdraw_success_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_lsp_information(LspInformation self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_lsp_information(self, serializer); + } + + @protected + void sse_encode_box_autoadd_message_success_action_data( + MessageSuccessActionData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_message_success_action_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_node_config(NodeConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_node_config(self, serializer); + } + + @protected + void sse_encode_box_autoadd_node_credentials(NodeCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_node_credentials(self, serializer); + } + + @protected + void sse_encode_box_autoadd_open_channel_fee_request(OpenChannelFeeRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_open_channel_fee_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_opening_fee_params(OpeningFeeParams self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opening_fee_params(self, serializer); + } + + @protected + void sse_encode_box_autoadd_pay_onchain_request(PayOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_pay_onchain_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_payment(Payment self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_payment(self, serializer); + } + + @protected + void sse_encode_box_autoadd_payment_failed_data(PaymentFailedData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_payment_failed_data(self, serializer); + } + + @protected + void sse_encode_box_autoadd_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_prepare_onchain_payment_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_prepare_redeem_onchain_funds_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_prepare_refund_request(PrepareRefundRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_prepare_refund_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_receive_onchain_request(ReceiveOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_receive_onchain_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_receive_payment_request(ReceivePaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_receive_payment_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_redeem_onchain_funds_request( + RedeemOnchainFundsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_redeem_onchain_funds_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_refund_request(RefundRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_refund_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_report_issue_request(ReportIssueRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_report_issue_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_report_payment_failure_details( + ReportPaymentFailureDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_report_payment_failure_details(self, serializer); + } + + @protected + void sse_encode_box_autoadd_reverse_swap_fees_request( + ReverseSwapFeesRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_reverse_swap_fees_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_reverse_swap_info(ReverseSwapInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_reverse_swap_info(self, serializer); + } + + @protected + void sse_encode_box_autoadd_send_onchain_request(SendOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_send_onchain_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_send_payment_request(SendPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_send_payment_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_send_spontaneous_payment_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_sign_message_request(SignMessageRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_sign_message_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_static_backup_request(StaticBackupRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_static_backup_request(self, serializer); + } + + @protected + void sse_encode_box_autoadd_success_action_processed( + SuccessActionProcessed self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_success_action_processed(self, serializer); + } + + @protected + void sse_encode_box_autoadd_swap_info(SwapInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_swap_info(self, serializer); + } + + @protected + void sse_encode_box_autoadd_symbol(Symbol self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_symbol(self, serializer); + } + + @protected + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self, serializer); + } + + @protected + void sse_encode_box_autoadd_u_64(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self, serializer); + } + + @protected + void sse_encode_box_autoadd_url_success_action_data(UrlSuccessActionData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_url_success_action_data(self, serializer); + } + + @protected + void sse_encode_breez_event(BreezEvent self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case BreezEvent_NewBlock(block: final block): + sse_encode_i_32(0, serializer); + sse_encode_u_32(block, serializer); + case BreezEvent_InvoicePaid(details: final details): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_invoice_paid_details(details, serializer); + case BreezEvent_Synced(): + sse_encode_i_32(2, serializer); + case BreezEvent_PaymentSucceed(details: final details): + sse_encode_i_32(3, serializer); + sse_encode_box_autoadd_payment(details, serializer); + case BreezEvent_PaymentFailed(details: final details): + sse_encode_i_32(4, serializer); + sse_encode_box_autoadd_payment_failed_data(details, serializer); + case BreezEvent_BackupStarted(): + sse_encode_i_32(5, serializer); + case BreezEvent_BackupSucceeded(): + sse_encode_i_32(6, serializer); + case BreezEvent_BackupFailed(details: final details): + sse_encode_i_32(7, serializer); + sse_encode_box_autoadd_backup_failed_data(details, serializer); + case BreezEvent_SwapUpdated(details: final details): + sse_encode_i_32(8, serializer); + sse_encode_box_autoadd_swap_info(details, serializer); + } + } + + @protected + void sse_encode_buy_bitcoin_provider(BuyBitcoinProvider self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_buy_bitcoin_request(BuyBitcoinRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_buy_bitcoin_provider(self.provider, serializer); + sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + } + + @protected + void sse_encode_buy_bitcoin_response(BuyBitcoinResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.url, serializer); + sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + } + + @protected + void sse_encode_channel_state(ChannelState self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_check_message_request(CheckMessageRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.message, serializer); + sse_encode_String(self.pubkey, serializer); + sse_encode_String(self.signature, serializer); + } + + @protected + void sse_encode_check_message_response(CheckMessageResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_bool(self.isValid, serializer); + } + + @protected + void sse_encode_closed_channel_payment_details(ClosedChannelPaymentDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_channel_state(self.state, serializer); + sse_encode_String(self.fundingTxid, serializer); + sse_encode_opt_String(self.shortChannelId, serializer); + sse_encode_opt_String(self.closingTxid, serializer); + } + + @protected + void sse_encode_config(Config self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.breezserver, serializer); + sse_encode_String(self.chainnotifierUrl, serializer); + sse_encode_opt_String(self.mempoolspaceUrl, serializer); + sse_encode_String(self.workingDir, serializer); + sse_encode_network(self.network, serializer); + sse_encode_u_32(self.paymentTimeoutSec, serializer); + sse_encode_opt_String(self.defaultLspId, serializer); + sse_encode_opt_String(self.apiKey, serializer); + sse_encode_f_64(self.maxfeePercent, serializer); + sse_encode_u_64(self.exemptfeeMsat, serializer); + sse_encode_node_config(self.nodeConfig, serializer); + } + + @protected + void sse_encode_configure_node_request(ConfigureNodeRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_String(self.closeToAddress, serializer); + } + + @protected + void sse_encode_connect_request(ConnectRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_config(self.config, serializer); + sse_encode_list_prim_u_8_strict(self.seed, serializer); + sse_encode_opt_box_autoadd_bool(self.restoreOnly, serializer); + } + + @protected + void sse_encode_currency_info(CurrencyInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.name, serializer); + sse_encode_u_32(self.fractionSize, serializer); + sse_encode_opt_box_autoadd_u_32(self.spacing, serializer); + sse_encode_opt_box_autoadd_symbol(self.symbol, serializer); + sse_encode_opt_box_autoadd_symbol(self.uniqSymbol, serializer); + sse_encode_opt_list_localized_name(self.localizedName, serializer); + sse_encode_opt_list_locale_overrides(self.localeOverrides, serializer); + } + + @protected + void sse_encode_environment_type(EnvironmentType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_f_64(double self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putFloat64(self); + } + + @protected + void sse_encode_fiat_currency(FiatCurrency self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.id, serializer); + sse_encode_currency_info(self.info, serializer); + } + + @protected + void sse_encode_greenlight_credentials(GreenlightCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.deviceKey, serializer); + sse_encode_list_prim_u_8_strict(self.deviceCert, serializer); + } + + @protected + void sse_encode_greenlight_node_config(GreenlightNodeConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_greenlight_credentials(self.partnerCredentials, serializer); + sse_encode_opt_String(self.inviteCode, serializer); + } + + @protected + void sse_encode_health_check_status(HealthCheckStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_i_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putInt32(self); + } + + @protected + void sse_encode_i_64(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putInt64(self); + } + + @protected + void sse_encode_input_type(InputType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case InputType_BitcoinAddress(address: final address): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_bitcoin_address_data(address, serializer); + case InputType_Bolt11(invoice: final invoice): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_invoice(invoice, serializer); + case InputType_NodeId(nodeId: final nodeId): + sse_encode_i_32(2, serializer); + sse_encode_String(nodeId, serializer); + case InputType_Url(url: final url): + sse_encode_i_32(3, serializer); + sse_encode_String(url, serializer); + case InputType_LnUrlPay(data: final data): + sse_encode_i_32(4, serializer); + sse_encode_box_autoadd_ln_url_pay_request_data(data, serializer); + case InputType_LnUrlWithdraw(data: final data): + sse_encode_i_32(5, serializer); + sse_encode_box_autoadd_ln_url_withdraw_request_data(data, serializer); + case InputType_LnUrlAuth(data: final data): + sse_encode_i_32(6, serializer); + sse_encode_box_autoadd_ln_url_auth_request_data(data, serializer); + case InputType_LnUrlError(data: final data): + sse_encode_i_32(7, serializer); + sse_encode_box_autoadd_ln_url_error_data(data, serializer); + } + } + + @protected + void sse_encode_invoice_paid_details(InvoicePaidDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.paymentHash, serializer); + sse_encode_String(self.bolt11, serializer); + sse_encode_opt_box_autoadd_payment(self.payment, serializer); + } + + @protected + void sse_encode_list_String(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_String(item, serializer); + } + } + + @protected + void sse_encode_list_fiat_currency(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_fiat_currency(item, serializer); + } + } + + @protected + void sse_encode_list_locale_overrides(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_locale_overrides(item, serializer); + } + } + + @protected + void sse_encode_list_localized_name(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_localized_name(item, serializer); + } + } + + @protected + void sse_encode_list_lsp_information(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_lsp_information(item, serializer); + } + } + + @protected + void sse_encode_list_metadata_filter(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_metadata_filter(item, serializer); + } + } + + @protected + void sse_encode_list_opening_fee_params(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_opening_fee_params(item, serializer); + } + } + + @protected + void sse_encode_list_payment(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_payment(item, serializer); + } + } + + @protected + void sse_encode_list_payment_type_filter(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_payment_type_filter(item, serializer); + } + } + + @protected + void sse_encode_list_payments_request(ListPaymentsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_list_payment_type_filter(self.filters, serializer); + sse_encode_opt_list_metadata_filter(self.metadataFilters, serializer); + sse_encode_opt_box_autoadd_i_64(self.fromTimestamp, serializer); + sse_encode_opt_box_autoadd_i_64(self.toTimestamp, serializer); + sse_encode_opt_box_autoadd_bool(self.includeFailures, serializer); + sse_encode_opt_box_autoadd_u_32(self.offset, serializer); + sse_encode_opt_box_autoadd_u_32(self.limit, serializer); + } + + @protected + void sse_encode_list_prim_u_8_strict(Uint8List self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.length, serializer); + serializer.buffer.putUint8List(self); + } + + @protected + void sse_encode_list_rate(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_rate(item, serializer); + } + } + + @protected + void sse_encode_list_reverse_swap_info(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_reverse_swap_info(item, serializer); + } + } + + @protected + void sse_encode_list_route_hint(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_route_hint(item, serializer); + } + } + + @protected + void sse_encode_list_route_hint_hop(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_route_hint_hop(item, serializer); + } + } + + @protected + void sse_encode_list_swap_info(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_swap_info(item, serializer); + } + } + + @protected + void sse_encode_list_tlv_entry(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_tlv_entry(item, serializer); + } + } + + @protected + void sse_encode_list_unspent_transaction_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_unspent_transaction_output(item, serializer); + } + } + + @protected + void sse_encode_ln_invoice(LNInvoice self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.bolt11, serializer); + sse_encode_network(self.network, serializer); + sse_encode_String(self.payeePubkey, serializer); + sse_encode_String(self.paymentHash, serializer); + sse_encode_opt_String(self.description, serializer); + sse_encode_opt_String(self.descriptionHash, serializer); + sse_encode_opt_box_autoadd_u_64(self.amountMsat, serializer); + sse_encode_u_64(self.timestamp, serializer); + sse_encode_u_64(self.expiry, serializer); + sse_encode_list_route_hint(self.routingHints, serializer); + sse_encode_list_prim_u_8_strict(self.paymentSecret, serializer); + sse_encode_u_64(self.minFinalCltvExpiryDelta, serializer); + } + + @protected + void sse_encode_ln_payment_details(LnPaymentDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.paymentHash, serializer); + sse_encode_String(self.label, serializer); + sse_encode_String(self.destinationPubkey, serializer); + sse_encode_String(self.paymentPreimage, serializer); + sse_encode_bool(self.keysend, serializer); + sse_encode_String(self.bolt11, serializer); + sse_encode_opt_String(self.openChannelBolt11, serializer); + sse_encode_opt_box_autoadd_success_action_processed(self.lnurlSuccessAction, serializer); + sse_encode_opt_String(self.lnurlPayDomain, serializer); + sse_encode_opt_String(self.lnAddress, serializer); + sse_encode_opt_String(self.lnurlMetadata, serializer); + sse_encode_opt_String(self.lnurlWithdrawEndpoint, serializer); + sse_encode_opt_box_autoadd_swap_info(self.swapInfo, serializer); + sse_encode_opt_box_autoadd_reverse_swap_info(self.reverseSwapInfo, serializer); + sse_encode_opt_box_autoadd_u_32(self.pendingExpirationBlock, serializer); + } + + @protected + void sse_encode_ln_url_auth_request_data(LnUrlAuthRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.k1, serializer); + sse_encode_opt_String(self.action, serializer); + sse_encode_String(self.domain, serializer); + sse_encode_String(self.url, serializer); + } + + @protected + void sse_encode_ln_url_callback_status(LnUrlCallbackStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LnUrlCallbackStatus_Ok(): + sse_encode_i_32(0, serializer); + case LnUrlCallbackStatus_ErrorStatus(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_error_data(data, serializer); + } + } + + @protected + void sse_encode_ln_url_error_data(LnUrlErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.reason, serializer); + } + + @protected + void sse_encode_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.paymentHash, serializer); + sse_encode_String(self.reason, serializer); + } + + @protected + void sse_encode_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_request_data(self.data, serializer); + sse_encode_u_64(self.amountMsat, serializer); + sse_encode_opt_String(self.comment, serializer); + sse_encode_opt_String(self.paymentLabel, serializer); + } + + @protected + void sse_encode_ln_url_pay_request_data(LnUrlPayRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.callback, serializer); + sse_encode_u_64(self.minSendable, serializer); + sse_encode_u_64(self.maxSendable, serializer); + sse_encode_String(self.metadataStr, serializer); + sse_encode_u_16(self.commentAllowed, serializer); + sse_encode_String(self.domain, serializer); + sse_encode_bool(self.allowsNostr, serializer); + sse_encode_opt_String(self.nostrPubkey, serializer); + sse_encode_opt_String(self.lnAddress, serializer); + } + + @protected + void sse_encode_ln_url_pay_result(LnUrlPayResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LnUrlPayResult_EndpointSuccess(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_ln_url_pay_success_data(data, serializer); + case LnUrlPayResult_EndpointError(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_error_data(data, serializer); + case LnUrlPayResult_PayError(data: final data): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_ln_url_pay_error_data(data, serializer); + } + } + + @protected + void sse_encode_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_payment(self.payment, serializer); + sse_encode_opt_box_autoadd_success_action_processed(self.successAction, serializer); + } + + @protected + void sse_encode_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_withdraw_request_data(self.data, serializer); + sse_encode_u_64(self.amountMsat, serializer); + sse_encode_opt_String(self.description, serializer); + } + + @protected + void sse_encode_ln_url_withdraw_request_data(LnUrlWithdrawRequestData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.callback, serializer); + sse_encode_String(self.k1, serializer); + sse_encode_String(self.defaultDescription, serializer); + sse_encode_u_64(self.minWithdrawable, serializer); + sse_encode_u_64(self.maxWithdrawable, serializer); + } + + @protected + void sse_encode_ln_url_withdraw_result(LnUrlWithdrawResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LnUrlWithdrawResult_Ok(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_ln_url_withdraw_success_data(data, serializer); + case LnUrlWithdrawResult_ErrorStatus(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_error_data(data, serializer); + } + } + + @protected + void sse_encode_ln_url_withdraw_success_data(LnUrlWithdrawSuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_invoice(self.invoice, serializer); + } + + @protected + void sse_encode_locale_overrides(LocaleOverrides self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.locale, serializer); + sse_encode_opt_box_autoadd_u_32(self.spacing, serializer); + sse_encode_symbol(self.symbol, serializer); + } + + @protected + void sse_encode_localized_name(LocalizedName self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.locale, serializer); + sse_encode_String(self.name, serializer); + } + + @protected + void sse_encode_log_entry(LogEntry self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.line, serializer); + sse_encode_String(self.level, serializer); + } + + @protected + void sse_encode_lsp_information(LspInformation self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.id, serializer); + sse_encode_String(self.name, serializer); + sse_encode_String(self.widgetUrl, serializer); + sse_encode_String(self.pubkey, serializer); + sse_encode_String(self.host, serializer); + sse_encode_i_64(self.baseFeeMsat, serializer); + sse_encode_f_64(self.feeRate, serializer); + sse_encode_u_32(self.timeLockDelta, serializer); + sse_encode_i_64(self.minHtlcMsat, serializer); + sse_encode_list_prim_u_8_strict(self.lspPubkey, serializer); + sse_encode_opening_fee_params_menu(self.openingFeeParamsList, serializer); + } + + @protected + void sse_encode_max_reverse_swap_amount_response( + MaxReverseSwapAmountResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.totalSat, serializer); + } + + @protected + void sse_encode_message_success_action_data(MessageSuccessActionData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.message, serializer); + } + + @protected + void sse_encode_metadata_filter(MetadataFilter self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.jsonPath, serializer); + sse_encode_String(self.jsonValue, serializer); + } + + @protected + void sse_encode_network(Network self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_node_config(NodeConfig self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case NodeConfig_Greenlight(config: final config): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_greenlight_node_config(config, serializer); + } + } + + @protected + void sse_encode_node_credentials(NodeCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case NodeCredentials_Greenlight(credentials: final credentials): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_greenlight_credentials(credentials, serializer); + } + } + + @protected + void sse_encode_node_state(NodeState self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.id, serializer); + sse_encode_u_32(self.blockHeight, serializer); + sse_encode_u_64(self.channelsBalanceMsat, serializer); + sse_encode_u_64(self.onchainBalanceMsat, serializer); + sse_encode_u_64(self.pendingOnchainBalanceMsat, serializer); + sse_encode_list_unspent_transaction_output(self.utxos, serializer); + sse_encode_u_64(self.maxPayableMsat, serializer); + sse_encode_u_64(self.maxReceivableMsat, serializer); + sse_encode_u_64(self.maxSinglePaymentAmountMsat, serializer); + sse_encode_u_64(self.maxChanReserveMsats, serializer); + sse_encode_list_String(self.connectedPeers, serializer); + sse_encode_u_64(self.inboundLiquidityMsats, serializer); + } + + @protected + void sse_encode_onchain_payment_limits_response( + OnchainPaymentLimitsResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.minSat, serializer); + sse_encode_u_64(self.maxSat, serializer); + } + + @protected + void sse_encode_open_channel_fee_request(OpenChannelFeeRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_u_64(self.amountMsat, serializer); + sse_encode_opt_box_autoadd_u_32(self.expiry, serializer); + } + + @protected + void sse_encode_open_channel_fee_response(OpenChannelFeeResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_u_64(self.feeMsat, serializer); + sse_encode_opening_fee_params(self.feeParams, serializer); + } + + @protected + void sse_encode_opening_fee_params(OpeningFeeParams self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.minMsat, serializer); + sse_encode_u_32(self.proportional, serializer); + sse_encode_String(self.validUntil, serializer); + sse_encode_u_32(self.maxIdleTime, serializer); + sse_encode_u_32(self.maxClientToSelfDelay, serializer); + sse_encode_String(self.promise, serializer); + } + + @protected + void sse_encode_opening_fee_params_menu(OpeningFeeParamsMenu self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_opening_fee_params(self.values, serializer); + } + + @protected + void sse_encode_opt_String(String? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_String(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_bool(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_greenlight_credentials( + GreenlightCredentials? 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_greenlight_credentials(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_i_64(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_ln_invoice(LNInvoice? 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_ln_invoice(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_lsp_information(LspInformation? 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_lsp_information(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_node_credentials(NodeCredentials? 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_node_credentials(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_opening_fee_params(OpeningFeeParams? 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_opening_fee_params(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_payment(Payment? 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_payment(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_reverse_swap_info(ReverseSwapInfo? 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_reverse_swap_info(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_success_action_processed( + SuccessActionProcessed? 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_success_action_processed(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_swap_info(SwapInfo? 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_swap_info(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_symbol(Symbol? 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_symbol(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_32(self, serializer); + } + } + + @protected + void sse_encode_opt_box_autoadd_u_64(int? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_64(self, serializer); + } + } + + @protected + void sse_encode_opt_list_String(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_String(self, serializer); + } + } + + @protected + void sse_encode_opt_list_locale_overrides(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_locale_overrides(self, serializer); + } + } + + @protected + void sse_encode_opt_list_localized_name(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_localized_name(self, serializer); + } + } + + @protected + void sse_encode_opt_list_metadata_filter(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_metadata_filter(self, serializer); + } + } + + @protected + void sse_encode_opt_list_payment_type_filter(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_payment_type_filter(self, serializer); + } + } + + @protected + void sse_encode_opt_list_prim_u_8_strict(Uint8List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_prim_u_8_strict(self, serializer); + } + } + + @protected + void sse_encode_opt_list_tlv_entry(List? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_list_tlv_entry(self, serializer); + } + } + + @protected + void sse_encode_pay_onchain_request(PayOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.recipientAddress, serializer); + sse_encode_prepare_onchain_payment_response(self.prepareRes, serializer); + } + + @protected + void sse_encode_pay_onchain_response(PayOnchainResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_reverse_swap_info(self.reverseSwapInfo, serializer); + } + + @protected + void sse_encode_payment(Payment self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.id, serializer); + sse_encode_payment_type(self.paymentType, serializer); + sse_encode_i_64(self.paymentTime, serializer); + sse_encode_u_64(self.amountMsat, serializer); + sse_encode_u_64(self.feeMsat, serializer); + sse_encode_payment_status(self.status, serializer); + sse_encode_opt_String(self.error, serializer); + sse_encode_opt_String(self.description, serializer); + sse_encode_payment_details(self.details, serializer); + sse_encode_opt_String(self.metadata, serializer); + } + + @protected + void sse_encode_payment_details(PaymentDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case PaymentDetails_Ln(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_ln_payment_details(data, serializer); + case PaymentDetails_ClosedChannel(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_closed_channel_payment_details(data, serializer); + } + } + + @protected + void sse_encode_payment_failed_data(PaymentFailedData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.error, serializer); + sse_encode_String(self.nodeId, serializer); + sse_encode_opt_box_autoadd_ln_invoice(self.invoice, serializer); + } + + @protected + void sse_encode_payment_status(PaymentStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_payment_type(PaymentType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_payment_type_filter(PaymentTypeFilter self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.amountSat, serializer); + sse_encode_swap_amount_type(self.amountType, serializer); + sse_encode_u_32(self.claimTxFeerate, serializer); + } + + @protected + void sse_encode_prepare_onchain_payment_response( + PrepareOnchainPaymentResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.feesHash, serializer); + sse_encode_f_64(self.feesPercentage, serializer); + sse_encode_u_64(self.feesLockup, serializer); + sse_encode_u_64(self.feesClaim, serializer); + sse_encode_u_64(self.senderAmountSat, serializer); + sse_encode_u_64(self.recipientAmountSat, serializer); + sse_encode_u_64(self.totalFees, serializer); + } + + @protected + void sse_encode_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.toAddress, serializer); + sse_encode_u_32(self.satPerVbyte, serializer); + } + + @protected + void sse_encode_prepare_redeem_onchain_funds_response( + PrepareRedeemOnchainFundsResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.txWeight, serializer); + sse_encode_u_64(self.txFeeSat, serializer); + } + + @protected + void sse_encode_prepare_refund_request(PrepareRefundRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.swapAddress, serializer); + sse_encode_String(self.toAddress, serializer); + sse_encode_u_32(self.satPerVbyte, serializer); + } + + @protected + void sse_encode_prepare_refund_response(PrepareRefundResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_32(self.refundTxWeight, serializer); + sse_encode_u_64(self.refundTxFeeSat, serializer); + } + + @protected + void sse_encode_rate(Rate self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.coin, serializer); + sse_encode_f_64(self.value, serializer); + } + + @protected + void sse_encode_receive_onchain_request(ReceiveOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + } + + @protected + void sse_encode_receive_payment_request(ReceivePaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.amountMsat, serializer); + sse_encode_String(self.description, serializer); + sse_encode_opt_list_prim_u_8_strict(self.preimage, serializer); + sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + sse_encode_opt_box_autoadd_bool(self.useDescriptionHash, serializer); + sse_encode_opt_box_autoadd_u_32(self.expiry, serializer); + sse_encode_opt_box_autoadd_u_32(self.cltv, serializer); + } + + @protected + void sse_encode_receive_payment_response(ReceivePaymentResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_invoice(self.lnInvoice, serializer); + sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + sse_encode_opt_box_autoadd_u_64(self.openingFeeMsat, serializer); + } + + @protected + void sse_encode_recommended_fees(RecommendedFees self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.fastestFee, serializer); + sse_encode_u_64(self.halfHourFee, serializer); + sse_encode_u_64(self.hourFee, serializer); + sse_encode_u_64(self.economyFee, serializer); + sse_encode_u_64(self.minimumFee, serializer); + } + + @protected + void sse_encode_redeem_onchain_funds_request(RedeemOnchainFundsRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.toAddress, serializer); + sse_encode_u_32(self.satPerVbyte, serializer); + } + + @protected + void sse_encode_redeem_onchain_funds_response(RedeemOnchainFundsResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.txid, serializer); + } + + @protected + void sse_encode_refund_request(RefundRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.swapAddress, serializer); + sse_encode_String(self.toAddress, serializer); + sse_encode_u_32(self.satPerVbyte, serializer); + } + + @protected + void sse_encode_refund_response(RefundResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.refundTxId, serializer); + } + + @protected + void sse_encode_report_issue_request(ReportIssueRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case ReportIssueRequest_PaymentFailure(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_report_payment_failure_details(data, serializer); + } + } + + @protected + void sse_encode_report_payment_failure_details(ReportPaymentFailureDetails self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.paymentHash, serializer); + sse_encode_opt_String(self.comment, serializer); + } + + @protected + void sse_encode_reverse_swap_fees_request(ReverseSwapFeesRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_box_autoadd_u_64(self.sendAmountSat, serializer); + sse_encode_opt_box_autoadd_u_32(self.claimTxFeerate, serializer); + } + + @protected + void sse_encode_reverse_swap_info(ReverseSwapInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.id, serializer); + sse_encode_String(self.claimPubkey, serializer); + sse_encode_opt_String(self.lockupTxid, serializer); + sse_encode_opt_String(self.claimTxid, serializer); + sse_encode_u_64(self.onchainAmountSat, serializer); + sse_encode_reverse_swap_status(self.status, serializer); + } + + @protected + void sse_encode_reverse_swap_pair_info(ReverseSwapPairInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.min, serializer); + sse_encode_u_64(self.max, serializer); + sse_encode_String(self.feesHash, serializer); + sse_encode_f_64(self.feesPercentage, serializer); + sse_encode_u_64(self.feesLockup, serializer); + sse_encode_u_64(self.feesClaim, serializer); + sse_encode_opt_box_autoadd_u_64(self.totalFees, serializer); + } + + @protected + void sse_encode_reverse_swap_status(ReverseSwapStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_route_hint(RouteHint self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_route_hint_hop(self.hops, serializer); + } + + @protected + void sse_encode_route_hint_hop(RouteHintHop self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.srcNodeId, serializer); + sse_encode_u_64(self.shortChannelId, serializer); + sse_encode_u_32(self.feesBaseMsat, serializer); + sse_encode_u_32(self.feesProportionalMillionths, serializer); + sse_encode_u_64(self.cltvExpiryDelta, serializer); + sse_encode_opt_box_autoadd_u_64(self.htlcMinimumMsat, serializer); + sse_encode_opt_box_autoadd_u_64(self.htlcMaximumMsat, serializer); + } + + @protected + void sse_encode_send_onchain_request(SendOnchainRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.amountSat, serializer); + sse_encode_String(self.onchainRecipientAddress, serializer); + sse_encode_String(self.pairHash, serializer); + sse_encode_u_32(self.satPerVbyte, serializer); + } + + @protected + void sse_encode_send_onchain_response(SendOnchainResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_reverse_swap_info(self.reverseSwapInfo, serializer); + } + + @protected + void sse_encode_send_payment_request(SendPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.bolt11, serializer); + sse_encode_opt_box_autoadd_u_64(self.amountMsat, serializer); + sse_encode_opt_String(self.label, serializer); + } + + @protected + void sse_encode_send_payment_response(SendPaymentResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_payment(self.payment, serializer); + } + + @protected + void sse_encode_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.nodeId, serializer); + sse_encode_u_64(self.amountMsat, serializer); + sse_encode_opt_list_tlv_entry(self.extraTlvs, serializer); + sse_encode_opt_String(self.label, serializer); + } + + @protected + void sse_encode_service_health_check_response(ServiceHealthCheckResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_health_check_status(self.status, serializer); + } + + @protected + void sse_encode_sign_message_request(SignMessageRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.message, serializer); + } + + @protected + void sse_encode_sign_message_response(SignMessageResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.signature, serializer); + } + + @protected + void sse_encode_static_backup_request(StaticBackupRequest self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.workingDir, serializer); + } + + @protected + void sse_encode_static_backup_response(StaticBackupResponse self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_list_String(self.backup, serializer); + } + + @protected + void sse_encode_success_action_processed(SuccessActionProcessed self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case SuccessActionProcessed_Aes(result: final result): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_aes_success_action_data_result(result, serializer); + case SuccessActionProcessed_Message(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_message_success_action_data(data, serializer); + case SuccessActionProcessed_Url(data: final data): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_url_success_action_data(data, serializer); + } + } + + @protected + void sse_encode_swap_amount_type(SwapAmountType self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_swap_info(SwapInfo self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.bitcoinAddress, serializer); + sse_encode_i_64(self.createdAt, serializer); + sse_encode_i_64(self.lockHeight, serializer); + sse_encode_list_prim_u_8_strict(self.paymentHash, serializer); + sse_encode_list_prim_u_8_strict(self.preimage, serializer); + sse_encode_list_prim_u_8_strict(self.privateKey, serializer); + sse_encode_list_prim_u_8_strict(self.publicKey, serializer); + sse_encode_list_prim_u_8_strict(self.swapperPublicKey, serializer); + sse_encode_list_prim_u_8_strict(self.script, serializer); + sse_encode_opt_String(self.bolt11, serializer); + sse_encode_u_64(self.paidMsat, serializer); + sse_encode_u_64(self.totalIncomingTxs, serializer); + sse_encode_u_64(self.confirmedSats, serializer); + sse_encode_u_64(self.unconfirmedSats, serializer); + sse_encode_swap_status(self.status, serializer); + sse_encode_list_String(self.refundTxIds, serializer); + sse_encode_list_String(self.unconfirmedTxIds, serializer); + sse_encode_list_String(self.confirmedTxIds, serializer); + sse_encode_i_64(self.minAllowedDeposit, serializer); + sse_encode_i_64(self.maxAllowedDeposit, serializer); + sse_encode_i_64(self.maxSwapperPayable, serializer); + sse_encode_opt_String(self.lastRedeemError, serializer); + sse_encode_opt_box_autoadd_opening_fee_params(self.channelOpeningFees, serializer); + sse_encode_opt_box_autoadd_u_32(self.confirmedAt, serializer); + } + + @protected + void sse_encode_swap_status(SwapStatus self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_i_32(self.index, serializer); + } + + @protected + void sse_encode_symbol(Symbol self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_opt_String(self.grapheme, serializer); + sse_encode_opt_String(self.template, serializer); + sse_encode_opt_box_autoadd_bool(self.rtl, serializer); + sse_encode_opt_box_autoadd_u_32(self.position, serializer); + } + + @protected + void sse_encode_tlv_entry(TlvEntry self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self.fieldNumber, serializer); + sse_encode_list_prim_u_8_strict(self.value, serializer); + } + + @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 + void sse_encode_u_32(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint32(self); + } + + @protected + void sse_encode_u_64(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint64(self); + } + + @protected + void sse_encode_u_8(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self); + } + + @protected + void sse_encode_unit(void self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + + @protected + void sse_encode_unspent_transaction_output(UnspentTransactionOutput self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.txid, serializer); + sse_encode_u_32(self.outnum, serializer); + sse_encode_u_64(self.amountMillisatoshi, serializer); + sse_encode_String(self.address, serializer); + sse_encode_bool(self.reserved, serializer); + } + + @protected + void sse_encode_url_success_action_data(UrlSuccessActionData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.description, serializer); + sse_encode_String(self.url, serializer); + } +} diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart new file mode 100644 index 000000000..b8d5e4999 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -0,0 +1,7182 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// 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 'binding.dart'; +import 'breez_services.dart'; +import 'chain.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'dart:ffi' as ffi; +import 'fiat.dart'; +import 'frb_generated.dart'; +import 'input_parser.dart'; +import 'invoice.dart'; +import 'lnurl/pay/model.dart'; +import 'lsp.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; + +abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl { + BreezSdkBindingsApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw); + + @protected + RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw); + + @protected + RustStreamSink dco_decode_StreamSink_log_entry_Dco(dynamic raw); + + @protected + String dco_decode_String(dynamic raw); + + @protected + AesSuccessActionDataDecrypted dco_decode_aes_success_action_data_decrypted(dynamic raw); + + @protected + AesSuccessActionDataResult dco_decode_aes_success_action_data_result(dynamic raw); + + @protected + BackupFailedData dco_decode_backup_failed_data(dynamic raw); + + @protected + BackupStatus dco_decode_backup_status(dynamic raw); + + @protected + BitcoinAddressData dco_decode_bitcoin_address_data(dynamic raw); + + @protected + bool dco_decode_bool(dynamic raw); + + @protected + AesSuccessActionDataDecrypted dco_decode_box_autoadd_aes_success_action_data_decrypted(dynamic raw); + + @protected + AesSuccessActionDataResult dco_decode_box_autoadd_aes_success_action_data_result(dynamic raw); + + @protected + BackupFailedData dco_decode_box_autoadd_backup_failed_data(dynamic raw); + + @protected + BitcoinAddressData dco_decode_box_autoadd_bitcoin_address_data(dynamic raw); + + @protected + bool dco_decode_box_autoadd_bool(dynamic raw); + + @protected + BuyBitcoinRequest dco_decode_box_autoadd_buy_bitcoin_request(dynamic raw); + + @protected + CheckMessageRequest dco_decode_box_autoadd_check_message_request(dynamic raw); + + @protected + ClosedChannelPaymentDetails dco_decode_box_autoadd_closed_channel_payment_details(dynamic raw); + + @protected + ConfigureNodeRequest dco_decode_box_autoadd_configure_node_request(dynamic raw); + + @protected + ConnectRequest dco_decode_box_autoadd_connect_request(dynamic raw); + + @protected + GreenlightCredentials dco_decode_box_autoadd_greenlight_credentials(dynamic raw); + + @protected + GreenlightNodeConfig dco_decode_box_autoadd_greenlight_node_config(dynamic raw); + + @protected + int dco_decode_box_autoadd_i_64(dynamic raw); + + @protected + InvoicePaidDetails dco_decode_box_autoadd_invoice_paid_details(dynamic raw); + + @protected + ListPaymentsRequest dco_decode_box_autoadd_list_payments_request(dynamic raw); + + @protected + LNInvoice dco_decode_box_autoadd_ln_invoice(dynamic raw); + + @protected + LnPaymentDetails dco_decode_box_autoadd_ln_payment_details(dynamic raw); + + @protected + LnUrlAuthRequestData dco_decode_box_autoadd_ln_url_auth_request_data(dynamic raw); + + @protected + LnUrlErrorData dco_decode_box_autoadd_ln_url_error_data(dynamic raw); + + @protected + LnUrlPayErrorData dco_decode_box_autoadd_ln_url_pay_error_data(dynamic raw); + + @protected + LnUrlPayRequest dco_decode_box_autoadd_ln_url_pay_request(dynamic raw); + + @protected + LnUrlPayRequestData dco_decode_box_autoadd_ln_url_pay_request_data(dynamic raw); + + @protected + LnUrlPaySuccessData dco_decode_box_autoadd_ln_url_pay_success_data(dynamic raw); + + @protected + LnUrlWithdrawRequest dco_decode_box_autoadd_ln_url_withdraw_request(dynamic raw); + + @protected + LnUrlWithdrawRequestData dco_decode_box_autoadd_ln_url_withdraw_request_data(dynamic raw); + + @protected + LnUrlWithdrawSuccessData dco_decode_box_autoadd_ln_url_withdraw_success_data(dynamic raw); + + @protected + LspInformation dco_decode_box_autoadd_lsp_information(dynamic raw); + + @protected + MessageSuccessActionData dco_decode_box_autoadd_message_success_action_data(dynamic raw); + + @protected + NodeConfig dco_decode_box_autoadd_node_config(dynamic raw); + + @protected + NodeCredentials dco_decode_box_autoadd_node_credentials(dynamic raw); + + @protected + OpenChannelFeeRequest dco_decode_box_autoadd_open_channel_fee_request(dynamic raw); + + @protected + OpeningFeeParams dco_decode_box_autoadd_opening_fee_params(dynamic raw); + + @protected + PayOnchainRequest dco_decode_box_autoadd_pay_onchain_request(dynamic raw); + + @protected + Payment dco_decode_box_autoadd_payment(dynamic raw); + + @protected + PaymentFailedData dco_decode_box_autoadd_payment_failed_data(dynamic raw); + + @protected + PrepareOnchainPaymentRequest dco_decode_box_autoadd_prepare_onchain_payment_request(dynamic raw); + + @protected + PrepareRedeemOnchainFundsRequest dco_decode_box_autoadd_prepare_redeem_onchain_funds_request(dynamic raw); + + @protected + PrepareRefundRequest dco_decode_box_autoadd_prepare_refund_request(dynamic raw); + + @protected + ReceiveOnchainRequest dco_decode_box_autoadd_receive_onchain_request(dynamic raw); + + @protected + ReceivePaymentRequest dco_decode_box_autoadd_receive_payment_request(dynamic raw); + + @protected + RedeemOnchainFundsRequest dco_decode_box_autoadd_redeem_onchain_funds_request(dynamic raw); + + @protected + RefundRequest dco_decode_box_autoadd_refund_request(dynamic raw); + + @protected + ReportIssueRequest dco_decode_box_autoadd_report_issue_request(dynamic raw); + + @protected + ReportPaymentFailureDetails dco_decode_box_autoadd_report_payment_failure_details(dynamic raw); + + @protected + ReverseSwapFeesRequest dco_decode_box_autoadd_reverse_swap_fees_request(dynamic raw); + + @protected + ReverseSwapInfo dco_decode_box_autoadd_reverse_swap_info(dynamic raw); + + @protected + SendOnchainRequest dco_decode_box_autoadd_send_onchain_request(dynamic raw); + + @protected + SendPaymentRequest dco_decode_box_autoadd_send_payment_request(dynamic raw); + + @protected + SendSpontaneousPaymentRequest dco_decode_box_autoadd_send_spontaneous_payment_request(dynamic raw); + + @protected + SignMessageRequest dco_decode_box_autoadd_sign_message_request(dynamic raw); + + @protected + StaticBackupRequest dco_decode_box_autoadd_static_backup_request(dynamic raw); + + @protected + SuccessActionProcessed dco_decode_box_autoadd_success_action_processed(dynamic raw); + + @protected + SwapInfo dco_decode_box_autoadd_swap_info(dynamic raw); + + @protected + Symbol dco_decode_box_autoadd_symbol(dynamic raw); + + @protected + int dco_decode_box_autoadd_u_32(dynamic raw); + + @protected + int dco_decode_box_autoadd_u_64(dynamic raw); + + @protected + UrlSuccessActionData dco_decode_box_autoadd_url_success_action_data(dynamic raw); + + @protected + BreezEvent dco_decode_breez_event(dynamic raw); + + @protected + BuyBitcoinProvider dco_decode_buy_bitcoin_provider(dynamic raw); + + @protected + BuyBitcoinRequest dco_decode_buy_bitcoin_request(dynamic raw); + + @protected + BuyBitcoinResponse dco_decode_buy_bitcoin_response(dynamic raw); + + @protected + ChannelState dco_decode_channel_state(dynamic raw); + + @protected + CheckMessageRequest dco_decode_check_message_request(dynamic raw); + + @protected + CheckMessageResponse dco_decode_check_message_response(dynamic raw); + + @protected + ClosedChannelPaymentDetails dco_decode_closed_channel_payment_details(dynamic raw); + + @protected + Config dco_decode_config(dynamic raw); + + @protected + ConfigureNodeRequest dco_decode_configure_node_request(dynamic raw); + + @protected + ConnectRequest dco_decode_connect_request(dynamic raw); + + @protected + CurrencyInfo dco_decode_currency_info(dynamic raw); + + @protected + EnvironmentType dco_decode_environment_type(dynamic raw); + + @protected + double dco_decode_f_64(dynamic raw); + + @protected + FiatCurrency dco_decode_fiat_currency(dynamic raw); + + @protected + GreenlightCredentials dco_decode_greenlight_credentials(dynamic raw); + + @protected + GreenlightNodeConfig dco_decode_greenlight_node_config(dynamic raw); + + @protected + HealthCheckStatus dco_decode_health_check_status(dynamic raw); + + @protected + int dco_decode_i_32(dynamic raw); + + @protected + int dco_decode_i_64(dynamic raw); + + @protected + InputType dco_decode_input_type(dynamic raw); + + @protected + InvoicePaidDetails dco_decode_invoice_paid_details(dynamic raw); + + @protected + List dco_decode_list_String(dynamic raw); + + @protected + List dco_decode_list_fiat_currency(dynamic raw); + + @protected + List dco_decode_list_locale_overrides(dynamic raw); + + @protected + List dco_decode_list_localized_name(dynamic raw); + + @protected + List dco_decode_list_lsp_information(dynamic raw); + + @protected + List dco_decode_list_metadata_filter(dynamic raw); + + @protected + List dco_decode_list_opening_fee_params(dynamic raw); + + @protected + List dco_decode_list_payment(dynamic raw); + + @protected + List dco_decode_list_payment_type_filter(dynamic raw); + + @protected + ListPaymentsRequest dco_decode_list_payments_request(dynamic raw); + + @protected + Uint8List dco_decode_list_prim_u_8_strict(dynamic raw); + + @protected + List dco_decode_list_rate(dynamic raw); + + @protected + List dco_decode_list_reverse_swap_info(dynamic raw); + + @protected + List dco_decode_list_route_hint(dynamic raw); + + @protected + List dco_decode_list_route_hint_hop(dynamic raw); + + @protected + List dco_decode_list_swap_info(dynamic raw); + + @protected + List dco_decode_list_tlv_entry(dynamic raw); + + @protected + List dco_decode_list_unspent_transaction_output(dynamic raw); + + @protected + LNInvoice dco_decode_ln_invoice(dynamic raw); + + @protected + LnPaymentDetails dco_decode_ln_payment_details(dynamic raw); + + @protected + LnUrlAuthRequestData dco_decode_ln_url_auth_request_data(dynamic raw); + + @protected + LnUrlCallbackStatus dco_decode_ln_url_callback_status(dynamic raw); + + @protected + LnUrlErrorData dco_decode_ln_url_error_data(dynamic raw); + + @protected + LnUrlPayErrorData dco_decode_ln_url_pay_error_data(dynamic raw); + + @protected + LnUrlPayRequest dco_decode_ln_url_pay_request(dynamic raw); + + @protected + LnUrlPayRequestData dco_decode_ln_url_pay_request_data(dynamic raw); + + @protected + LnUrlPayResult dco_decode_ln_url_pay_result(dynamic raw); + + @protected + LnUrlPaySuccessData dco_decode_ln_url_pay_success_data(dynamic raw); + + @protected + LnUrlWithdrawRequest dco_decode_ln_url_withdraw_request(dynamic raw); + + @protected + LnUrlWithdrawRequestData dco_decode_ln_url_withdraw_request_data(dynamic raw); + + @protected + LnUrlWithdrawResult dco_decode_ln_url_withdraw_result(dynamic raw); + + @protected + LnUrlWithdrawSuccessData dco_decode_ln_url_withdraw_success_data(dynamic raw); + + @protected + LocaleOverrides dco_decode_locale_overrides(dynamic raw); + + @protected + LocalizedName dco_decode_localized_name(dynamic raw); + + @protected + LogEntry dco_decode_log_entry(dynamic raw); + + @protected + LspInformation dco_decode_lsp_information(dynamic raw); + + @protected + MaxReverseSwapAmountResponse dco_decode_max_reverse_swap_amount_response(dynamic raw); + + @protected + MessageSuccessActionData dco_decode_message_success_action_data(dynamic raw); + + @protected + MetadataFilter dco_decode_metadata_filter(dynamic raw); + + @protected + Network dco_decode_network(dynamic raw); + + @protected + NodeConfig dco_decode_node_config(dynamic raw); + + @protected + NodeCredentials dco_decode_node_credentials(dynamic raw); + + @protected + NodeState dco_decode_node_state(dynamic raw); + + @protected + OnchainPaymentLimitsResponse dco_decode_onchain_payment_limits_response(dynamic raw); + + @protected + OpenChannelFeeRequest dco_decode_open_channel_fee_request(dynamic raw); + + @protected + OpenChannelFeeResponse dco_decode_open_channel_fee_response(dynamic raw); + + @protected + OpeningFeeParams dco_decode_opening_fee_params(dynamic raw); + + @protected + OpeningFeeParamsMenu dco_decode_opening_fee_params_menu(dynamic raw); + + @protected + String? dco_decode_opt_String(dynamic raw); + + @protected + bool? dco_decode_opt_box_autoadd_bool(dynamic raw); + + @protected + GreenlightCredentials? dco_decode_opt_box_autoadd_greenlight_credentials(dynamic raw); + + @protected + int? dco_decode_opt_box_autoadd_i_64(dynamic raw); + + @protected + LNInvoice? dco_decode_opt_box_autoadd_ln_invoice(dynamic raw); + + @protected + LspInformation? dco_decode_opt_box_autoadd_lsp_information(dynamic raw); + + @protected + NodeCredentials? dco_decode_opt_box_autoadd_node_credentials(dynamic raw); + + @protected + OpeningFeeParams? dco_decode_opt_box_autoadd_opening_fee_params(dynamic raw); + + @protected + Payment? dco_decode_opt_box_autoadd_payment(dynamic raw); + + @protected + ReverseSwapInfo? dco_decode_opt_box_autoadd_reverse_swap_info(dynamic raw); + + @protected + SuccessActionProcessed? dco_decode_opt_box_autoadd_success_action_processed(dynamic raw); + + @protected + SwapInfo? dco_decode_opt_box_autoadd_swap_info(dynamic raw); + + @protected + Symbol? dco_decode_opt_box_autoadd_symbol(dynamic raw); + + @protected + int? dco_decode_opt_box_autoadd_u_32(dynamic raw); + + @protected + int? dco_decode_opt_box_autoadd_u_64(dynamic raw); + + @protected + List? dco_decode_opt_list_String(dynamic raw); + + @protected + List? dco_decode_opt_list_locale_overrides(dynamic raw); + + @protected + List? dco_decode_opt_list_localized_name(dynamic raw); + + @protected + List? dco_decode_opt_list_metadata_filter(dynamic raw); + + @protected + List? dco_decode_opt_list_payment_type_filter(dynamic raw); + + @protected + Uint8List? dco_decode_opt_list_prim_u_8_strict(dynamic raw); + + @protected + List? dco_decode_opt_list_tlv_entry(dynamic raw); + + @protected + PayOnchainRequest dco_decode_pay_onchain_request(dynamic raw); + + @protected + PayOnchainResponse dco_decode_pay_onchain_response(dynamic raw); + + @protected + Payment dco_decode_payment(dynamic raw); + + @protected + PaymentDetails dco_decode_payment_details(dynamic raw); + + @protected + PaymentFailedData dco_decode_payment_failed_data(dynamic raw); + + @protected + PaymentStatus dco_decode_payment_status(dynamic raw); + + @protected + PaymentType dco_decode_payment_type(dynamic raw); + + @protected + PaymentTypeFilter dco_decode_payment_type_filter(dynamic raw); + + @protected + PrepareOnchainPaymentRequest dco_decode_prepare_onchain_payment_request(dynamic raw); + + @protected + PrepareOnchainPaymentResponse dco_decode_prepare_onchain_payment_response(dynamic raw); + + @protected + PrepareRedeemOnchainFundsRequest dco_decode_prepare_redeem_onchain_funds_request(dynamic raw); + + @protected + PrepareRedeemOnchainFundsResponse dco_decode_prepare_redeem_onchain_funds_response(dynamic raw); + + @protected + PrepareRefundRequest dco_decode_prepare_refund_request(dynamic raw); + + @protected + PrepareRefundResponse dco_decode_prepare_refund_response(dynamic raw); + + @protected + Rate dco_decode_rate(dynamic raw); + + @protected + ReceiveOnchainRequest dco_decode_receive_onchain_request(dynamic raw); + + @protected + ReceivePaymentRequest dco_decode_receive_payment_request(dynamic raw); + + @protected + ReceivePaymentResponse dco_decode_receive_payment_response(dynamic raw); + + @protected + RecommendedFees dco_decode_recommended_fees(dynamic raw); + + @protected + RedeemOnchainFundsRequest dco_decode_redeem_onchain_funds_request(dynamic raw); + + @protected + RedeemOnchainFundsResponse dco_decode_redeem_onchain_funds_response(dynamic raw); + + @protected + RefundRequest dco_decode_refund_request(dynamic raw); + + @protected + RefundResponse dco_decode_refund_response(dynamic raw); + + @protected + ReportIssueRequest dco_decode_report_issue_request(dynamic raw); + + @protected + ReportPaymentFailureDetails dco_decode_report_payment_failure_details(dynamic raw); + + @protected + ReverseSwapFeesRequest dco_decode_reverse_swap_fees_request(dynamic raw); + + @protected + ReverseSwapInfo dco_decode_reverse_swap_info(dynamic raw); + + @protected + ReverseSwapPairInfo dco_decode_reverse_swap_pair_info(dynamic raw); + + @protected + ReverseSwapStatus dco_decode_reverse_swap_status(dynamic raw); + + @protected + RouteHint dco_decode_route_hint(dynamic raw); + + @protected + RouteHintHop dco_decode_route_hint_hop(dynamic raw); + + @protected + SendOnchainRequest dco_decode_send_onchain_request(dynamic raw); + + @protected + SendOnchainResponse dco_decode_send_onchain_response(dynamic raw); + + @protected + SendPaymentRequest dco_decode_send_payment_request(dynamic raw); + + @protected + SendPaymentResponse dco_decode_send_payment_response(dynamic raw); + + @protected + SendSpontaneousPaymentRequest dco_decode_send_spontaneous_payment_request(dynamic raw); + + @protected + ServiceHealthCheckResponse dco_decode_service_health_check_response(dynamic raw); + + @protected + SignMessageRequest dco_decode_sign_message_request(dynamic raw); + + @protected + SignMessageResponse dco_decode_sign_message_response(dynamic raw); + + @protected + StaticBackupRequest dco_decode_static_backup_request(dynamic raw); + + @protected + StaticBackupResponse dco_decode_static_backup_response(dynamic raw); + + @protected + SuccessActionProcessed dco_decode_success_action_processed(dynamic raw); + + @protected + SwapAmountType dco_decode_swap_amount_type(dynamic raw); + + @protected + SwapInfo dco_decode_swap_info(dynamic raw); + + @protected + SwapStatus dco_decode_swap_status(dynamic raw); + + @protected + Symbol dco_decode_symbol(dynamic raw); + + @protected + TlvEntry dco_decode_tlv_entry(dynamic raw); + + @protected + int dco_decode_u_16(dynamic raw); + + @protected + int dco_decode_u_32(dynamic raw); + + @protected + int dco_decode_u_64(dynamic raw); + + @protected + int dco_decode_u_8(dynamic raw); + + @protected + void dco_decode_unit(dynamic raw); + + @protected + UnspentTransactionOutput dco_decode_unspent_transaction_output(dynamic raw); + + @protected + UrlSuccessActionData dco_decode_url_success_action_data(dynamic raw); + + @protected + AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); + + @protected + RustStreamSink sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer); + + @protected + RustStreamSink sse_decode_StreamSink_log_entry_Dco(SseDeserializer deserializer); + + @protected + String sse_decode_String(SseDeserializer deserializer); + + @protected + AesSuccessActionDataDecrypted sse_decode_aes_success_action_data_decrypted(SseDeserializer deserializer); + + @protected + AesSuccessActionDataResult sse_decode_aes_success_action_data_result(SseDeserializer deserializer); + + @protected + BackupFailedData sse_decode_backup_failed_data(SseDeserializer deserializer); + + @protected + BackupStatus sse_decode_backup_status(SseDeserializer deserializer); + + @protected + BitcoinAddressData sse_decode_bitcoin_address_data(SseDeserializer deserializer); + + @protected + bool sse_decode_bool(SseDeserializer deserializer); + + @protected + AesSuccessActionDataDecrypted sse_decode_box_autoadd_aes_success_action_data_decrypted( + SseDeserializer deserializer); + + @protected + AesSuccessActionDataResult sse_decode_box_autoadd_aes_success_action_data_result( + SseDeserializer deserializer); + + @protected + BackupFailedData sse_decode_box_autoadd_backup_failed_data(SseDeserializer deserializer); + + @protected + BitcoinAddressData sse_decode_box_autoadd_bitcoin_address_data(SseDeserializer deserializer); + + @protected + bool sse_decode_box_autoadd_bool(SseDeserializer deserializer); + + @protected + BuyBitcoinRequest sse_decode_box_autoadd_buy_bitcoin_request(SseDeserializer deserializer); + + @protected + CheckMessageRequest sse_decode_box_autoadd_check_message_request(SseDeserializer deserializer); + + @protected + ClosedChannelPaymentDetails sse_decode_box_autoadd_closed_channel_payment_details( + SseDeserializer deserializer); + + @protected + ConfigureNodeRequest sse_decode_box_autoadd_configure_node_request(SseDeserializer deserializer); + + @protected + ConnectRequest sse_decode_box_autoadd_connect_request(SseDeserializer deserializer); + + @protected + GreenlightCredentials sse_decode_box_autoadd_greenlight_credentials(SseDeserializer deserializer); + + @protected + GreenlightNodeConfig sse_decode_box_autoadd_greenlight_node_config(SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_i_64(SseDeserializer deserializer); + + @protected + InvoicePaidDetails sse_decode_box_autoadd_invoice_paid_details(SseDeserializer deserializer); + + @protected + ListPaymentsRequest sse_decode_box_autoadd_list_payments_request(SseDeserializer deserializer); + + @protected + LNInvoice sse_decode_box_autoadd_ln_invoice(SseDeserializer deserializer); + + @protected + LnPaymentDetails sse_decode_box_autoadd_ln_payment_details(SseDeserializer deserializer); + + @protected + LnUrlAuthRequestData sse_decode_box_autoadd_ln_url_auth_request_data(SseDeserializer deserializer); + + @protected + LnUrlErrorData sse_decode_box_autoadd_ln_url_error_data(SseDeserializer deserializer); + + @protected + LnUrlPayErrorData sse_decode_box_autoadd_ln_url_pay_error_data(SseDeserializer deserializer); + + @protected + LnUrlPayRequest sse_decode_box_autoadd_ln_url_pay_request(SseDeserializer deserializer); + + @protected + LnUrlPayRequestData sse_decode_box_autoadd_ln_url_pay_request_data(SseDeserializer deserializer); + + @protected + LnUrlPaySuccessData sse_decode_box_autoadd_ln_url_pay_success_data(SseDeserializer deserializer); + + @protected + LnUrlWithdrawRequest sse_decode_box_autoadd_ln_url_withdraw_request(SseDeserializer deserializer); + + @protected + LnUrlWithdrawRequestData sse_decode_box_autoadd_ln_url_withdraw_request_data(SseDeserializer deserializer); + + @protected + LnUrlWithdrawSuccessData sse_decode_box_autoadd_ln_url_withdraw_success_data(SseDeserializer deserializer); + + @protected + LspInformation sse_decode_box_autoadd_lsp_information(SseDeserializer deserializer); + + @protected + MessageSuccessActionData sse_decode_box_autoadd_message_success_action_data(SseDeserializer deserializer); + + @protected + NodeConfig sse_decode_box_autoadd_node_config(SseDeserializer deserializer); + + @protected + NodeCredentials sse_decode_box_autoadd_node_credentials(SseDeserializer deserializer); + + @protected + OpenChannelFeeRequest sse_decode_box_autoadd_open_channel_fee_request(SseDeserializer deserializer); + + @protected + OpeningFeeParams sse_decode_box_autoadd_opening_fee_params(SseDeserializer deserializer); + + @protected + PayOnchainRequest sse_decode_box_autoadd_pay_onchain_request(SseDeserializer deserializer); + + @protected + Payment sse_decode_box_autoadd_payment(SseDeserializer deserializer); + + @protected + PaymentFailedData sse_decode_box_autoadd_payment_failed_data(SseDeserializer deserializer); + + @protected + PrepareOnchainPaymentRequest sse_decode_box_autoadd_prepare_onchain_payment_request( + SseDeserializer deserializer); + + @protected + PrepareRedeemOnchainFundsRequest sse_decode_box_autoadd_prepare_redeem_onchain_funds_request( + SseDeserializer deserializer); + + @protected + PrepareRefundRequest sse_decode_box_autoadd_prepare_refund_request(SseDeserializer deserializer); + + @protected + ReceiveOnchainRequest sse_decode_box_autoadd_receive_onchain_request(SseDeserializer deserializer); + + @protected + ReceivePaymentRequest sse_decode_box_autoadd_receive_payment_request(SseDeserializer deserializer); + + @protected + RedeemOnchainFundsRequest sse_decode_box_autoadd_redeem_onchain_funds_request(SseDeserializer deserializer); + + @protected + RefundRequest sse_decode_box_autoadd_refund_request(SseDeserializer deserializer); + + @protected + ReportIssueRequest sse_decode_box_autoadd_report_issue_request(SseDeserializer deserializer); + + @protected + ReportPaymentFailureDetails sse_decode_box_autoadd_report_payment_failure_details( + SseDeserializer deserializer); + + @protected + ReverseSwapFeesRequest sse_decode_box_autoadd_reverse_swap_fees_request(SseDeserializer deserializer); + + @protected + ReverseSwapInfo sse_decode_box_autoadd_reverse_swap_info(SseDeserializer deserializer); + + @protected + SendOnchainRequest sse_decode_box_autoadd_send_onchain_request(SseDeserializer deserializer); + + @protected + SendPaymentRequest sse_decode_box_autoadd_send_payment_request(SseDeserializer deserializer); + + @protected + SendSpontaneousPaymentRequest sse_decode_box_autoadd_send_spontaneous_payment_request( + SseDeserializer deserializer); + + @protected + SignMessageRequest sse_decode_box_autoadd_sign_message_request(SseDeserializer deserializer); + + @protected + StaticBackupRequest sse_decode_box_autoadd_static_backup_request(SseDeserializer deserializer); + + @protected + SuccessActionProcessed sse_decode_box_autoadd_success_action_processed(SseDeserializer deserializer); + + @protected + SwapInfo sse_decode_box_autoadd_swap_info(SseDeserializer deserializer); + + @protected + Symbol sse_decode_box_autoadd_symbol(SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + int sse_decode_box_autoadd_u_64(SseDeserializer deserializer); + + @protected + UrlSuccessActionData sse_decode_box_autoadd_url_success_action_data(SseDeserializer deserializer); + + @protected + BreezEvent sse_decode_breez_event(SseDeserializer deserializer); + + @protected + BuyBitcoinProvider sse_decode_buy_bitcoin_provider(SseDeserializer deserializer); + + @protected + BuyBitcoinRequest sse_decode_buy_bitcoin_request(SseDeserializer deserializer); + + @protected + BuyBitcoinResponse sse_decode_buy_bitcoin_response(SseDeserializer deserializer); + + @protected + ChannelState sse_decode_channel_state(SseDeserializer deserializer); + + @protected + CheckMessageRequest sse_decode_check_message_request(SseDeserializer deserializer); + + @protected + CheckMessageResponse sse_decode_check_message_response(SseDeserializer deserializer); + + @protected + ClosedChannelPaymentDetails sse_decode_closed_channel_payment_details(SseDeserializer deserializer); + + @protected + Config sse_decode_config(SseDeserializer deserializer); + + @protected + ConfigureNodeRequest sse_decode_configure_node_request(SseDeserializer deserializer); + + @protected + ConnectRequest sse_decode_connect_request(SseDeserializer deserializer); + + @protected + CurrencyInfo sse_decode_currency_info(SseDeserializer deserializer); + + @protected + EnvironmentType sse_decode_environment_type(SseDeserializer deserializer); + + @protected + double sse_decode_f_64(SseDeserializer deserializer); + + @protected + FiatCurrency sse_decode_fiat_currency(SseDeserializer deserializer); + + @protected + GreenlightCredentials sse_decode_greenlight_credentials(SseDeserializer deserializer); + + @protected + GreenlightNodeConfig sse_decode_greenlight_node_config(SseDeserializer deserializer); + + @protected + HealthCheckStatus sse_decode_health_check_status(SseDeserializer deserializer); + + @protected + int sse_decode_i_32(SseDeserializer deserializer); + + @protected + int sse_decode_i_64(SseDeserializer deserializer); + + @protected + InputType sse_decode_input_type(SseDeserializer deserializer); + + @protected + InvoicePaidDetails sse_decode_invoice_paid_details(SseDeserializer deserializer); + + @protected + List sse_decode_list_String(SseDeserializer deserializer); + + @protected + List sse_decode_list_fiat_currency(SseDeserializer deserializer); + + @protected + List sse_decode_list_locale_overrides(SseDeserializer deserializer); + + @protected + List sse_decode_list_localized_name(SseDeserializer deserializer); + + @protected + List sse_decode_list_lsp_information(SseDeserializer deserializer); + + @protected + List sse_decode_list_metadata_filter(SseDeserializer deserializer); + + @protected + List sse_decode_list_opening_fee_params(SseDeserializer deserializer); + + @protected + List sse_decode_list_payment(SseDeserializer deserializer); + + @protected + List sse_decode_list_payment_type_filter(SseDeserializer deserializer); + + @protected + ListPaymentsRequest sse_decode_list_payments_request(SseDeserializer deserializer); + + @protected + Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer); + + @protected + List sse_decode_list_rate(SseDeserializer deserializer); + + @protected + List sse_decode_list_reverse_swap_info(SseDeserializer deserializer); + + @protected + List sse_decode_list_route_hint(SseDeserializer deserializer); + + @protected + List sse_decode_list_route_hint_hop(SseDeserializer deserializer); + + @protected + List sse_decode_list_swap_info(SseDeserializer deserializer); + + @protected + List sse_decode_list_tlv_entry(SseDeserializer deserializer); + + @protected + List sse_decode_list_unspent_transaction_output(SseDeserializer deserializer); + + @protected + LNInvoice sse_decode_ln_invoice(SseDeserializer deserializer); + + @protected + LnPaymentDetails sse_decode_ln_payment_details(SseDeserializer deserializer); + + @protected + LnUrlAuthRequestData sse_decode_ln_url_auth_request_data(SseDeserializer deserializer); + + @protected + LnUrlCallbackStatus sse_decode_ln_url_callback_status(SseDeserializer deserializer); + + @protected + LnUrlErrorData sse_decode_ln_url_error_data(SseDeserializer deserializer); + + @protected + LnUrlPayErrorData sse_decode_ln_url_pay_error_data(SseDeserializer deserializer); + + @protected + LnUrlPayRequest sse_decode_ln_url_pay_request(SseDeserializer deserializer); + + @protected + LnUrlPayRequestData sse_decode_ln_url_pay_request_data(SseDeserializer deserializer); + + @protected + LnUrlPayResult sse_decode_ln_url_pay_result(SseDeserializer deserializer); + + @protected + LnUrlPaySuccessData sse_decode_ln_url_pay_success_data(SseDeserializer deserializer); + + @protected + LnUrlWithdrawRequest sse_decode_ln_url_withdraw_request(SseDeserializer deserializer); + + @protected + LnUrlWithdrawRequestData sse_decode_ln_url_withdraw_request_data(SseDeserializer deserializer); + + @protected + LnUrlWithdrawResult sse_decode_ln_url_withdraw_result(SseDeserializer deserializer); + + @protected + LnUrlWithdrawSuccessData sse_decode_ln_url_withdraw_success_data(SseDeserializer deserializer); + + @protected + LocaleOverrides sse_decode_locale_overrides(SseDeserializer deserializer); + + @protected + LocalizedName sse_decode_localized_name(SseDeserializer deserializer); + + @protected + LogEntry sse_decode_log_entry(SseDeserializer deserializer); + + @protected + LspInformation sse_decode_lsp_information(SseDeserializer deserializer); + + @protected + MaxReverseSwapAmountResponse sse_decode_max_reverse_swap_amount_response(SseDeserializer deserializer); + + @protected + MessageSuccessActionData sse_decode_message_success_action_data(SseDeserializer deserializer); + + @protected + MetadataFilter sse_decode_metadata_filter(SseDeserializer deserializer); + + @protected + Network sse_decode_network(SseDeserializer deserializer); + + @protected + NodeConfig sse_decode_node_config(SseDeserializer deserializer); + + @protected + NodeCredentials sse_decode_node_credentials(SseDeserializer deserializer); + + @protected + NodeState sse_decode_node_state(SseDeserializer deserializer); + + @protected + OnchainPaymentLimitsResponse sse_decode_onchain_payment_limits_response(SseDeserializer deserializer); + + @protected + OpenChannelFeeRequest sse_decode_open_channel_fee_request(SseDeserializer deserializer); + + @protected + OpenChannelFeeResponse sse_decode_open_channel_fee_response(SseDeserializer deserializer); + + @protected + OpeningFeeParams sse_decode_opening_fee_params(SseDeserializer deserializer); + + @protected + OpeningFeeParamsMenu sse_decode_opening_fee_params_menu(SseDeserializer deserializer); + + @protected + String? sse_decode_opt_String(SseDeserializer deserializer); + + @protected + bool? sse_decode_opt_box_autoadd_bool(SseDeserializer deserializer); + + @protected + GreenlightCredentials? sse_decode_opt_box_autoadd_greenlight_credentials(SseDeserializer deserializer); + + @protected + int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer); + + @protected + LNInvoice? sse_decode_opt_box_autoadd_ln_invoice(SseDeserializer deserializer); + + @protected + LspInformation? sse_decode_opt_box_autoadd_lsp_information(SseDeserializer deserializer); + + @protected + NodeCredentials? sse_decode_opt_box_autoadd_node_credentials(SseDeserializer deserializer); + + @protected + OpeningFeeParams? sse_decode_opt_box_autoadd_opening_fee_params(SseDeserializer deserializer); + + @protected + Payment? sse_decode_opt_box_autoadd_payment(SseDeserializer deserializer); + + @protected + ReverseSwapInfo? sse_decode_opt_box_autoadd_reverse_swap_info(SseDeserializer deserializer); + + @protected + SuccessActionProcessed? sse_decode_opt_box_autoadd_success_action_processed(SseDeserializer deserializer); + + @protected + SwapInfo? sse_decode_opt_box_autoadd_swap_info(SseDeserializer deserializer); + + @protected + Symbol? sse_decode_opt_box_autoadd_symbol(SseDeserializer deserializer); + + @protected + int? sse_decode_opt_box_autoadd_u_32(SseDeserializer deserializer); + + @protected + int? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_String(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_locale_overrides(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_localized_name(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_metadata_filter(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_payment_type_filter(SseDeserializer deserializer); + + @protected + Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer); + + @protected + List? sse_decode_opt_list_tlv_entry(SseDeserializer deserializer); + + @protected + PayOnchainRequest sse_decode_pay_onchain_request(SseDeserializer deserializer); + + @protected + PayOnchainResponse sse_decode_pay_onchain_response(SseDeserializer deserializer); + + @protected + Payment sse_decode_payment(SseDeserializer deserializer); + + @protected + PaymentDetails sse_decode_payment_details(SseDeserializer deserializer); + + @protected + PaymentFailedData sse_decode_payment_failed_data(SseDeserializer deserializer); + + @protected + PaymentStatus sse_decode_payment_status(SseDeserializer deserializer); + + @protected + PaymentType sse_decode_payment_type(SseDeserializer deserializer); + + @protected + PaymentTypeFilter sse_decode_payment_type_filter(SseDeserializer deserializer); + + @protected + PrepareOnchainPaymentRequest sse_decode_prepare_onchain_payment_request(SseDeserializer deserializer); + + @protected + PrepareOnchainPaymentResponse sse_decode_prepare_onchain_payment_response(SseDeserializer deserializer); + + @protected + PrepareRedeemOnchainFundsRequest sse_decode_prepare_redeem_onchain_funds_request( + SseDeserializer deserializer); + + @protected + PrepareRedeemOnchainFundsResponse sse_decode_prepare_redeem_onchain_funds_response( + SseDeserializer deserializer); + + @protected + PrepareRefundRequest sse_decode_prepare_refund_request(SseDeserializer deserializer); + + @protected + PrepareRefundResponse sse_decode_prepare_refund_response(SseDeserializer deserializer); + + @protected + Rate sse_decode_rate(SseDeserializer deserializer); + + @protected + ReceiveOnchainRequest sse_decode_receive_onchain_request(SseDeserializer deserializer); + + @protected + ReceivePaymentRequest sse_decode_receive_payment_request(SseDeserializer deserializer); + + @protected + ReceivePaymentResponse sse_decode_receive_payment_response(SseDeserializer deserializer); + + @protected + RecommendedFees sse_decode_recommended_fees(SseDeserializer deserializer); + + @protected + RedeemOnchainFundsRequest sse_decode_redeem_onchain_funds_request(SseDeserializer deserializer); + + @protected + RedeemOnchainFundsResponse sse_decode_redeem_onchain_funds_response(SseDeserializer deserializer); + + @protected + RefundRequest sse_decode_refund_request(SseDeserializer deserializer); + + @protected + RefundResponse sse_decode_refund_response(SseDeserializer deserializer); + + @protected + ReportIssueRequest sse_decode_report_issue_request(SseDeserializer deserializer); + + @protected + ReportPaymentFailureDetails sse_decode_report_payment_failure_details(SseDeserializer deserializer); + + @protected + ReverseSwapFeesRequest sse_decode_reverse_swap_fees_request(SseDeserializer deserializer); + + @protected + ReverseSwapInfo sse_decode_reverse_swap_info(SseDeserializer deserializer); + + @protected + ReverseSwapPairInfo sse_decode_reverse_swap_pair_info(SseDeserializer deserializer); + + @protected + ReverseSwapStatus sse_decode_reverse_swap_status(SseDeserializer deserializer); + + @protected + RouteHint sse_decode_route_hint(SseDeserializer deserializer); + + @protected + RouteHintHop sse_decode_route_hint_hop(SseDeserializer deserializer); + + @protected + SendOnchainRequest sse_decode_send_onchain_request(SseDeserializer deserializer); + + @protected + SendOnchainResponse sse_decode_send_onchain_response(SseDeserializer deserializer); + + @protected + SendPaymentRequest sse_decode_send_payment_request(SseDeserializer deserializer); + + @protected + SendPaymentResponse sse_decode_send_payment_response(SseDeserializer deserializer); + + @protected + SendSpontaneousPaymentRequest sse_decode_send_spontaneous_payment_request(SseDeserializer deserializer); + + @protected + ServiceHealthCheckResponse sse_decode_service_health_check_response(SseDeserializer deserializer); + + @protected + SignMessageRequest sse_decode_sign_message_request(SseDeserializer deserializer); + + @protected + SignMessageResponse sse_decode_sign_message_response(SseDeserializer deserializer); + + @protected + StaticBackupRequest sse_decode_static_backup_request(SseDeserializer deserializer); + + @protected + StaticBackupResponse sse_decode_static_backup_response(SseDeserializer deserializer); + + @protected + SuccessActionProcessed sse_decode_success_action_processed(SseDeserializer deserializer); + + @protected + SwapAmountType sse_decode_swap_amount_type(SseDeserializer deserializer); + + @protected + SwapInfo sse_decode_swap_info(SseDeserializer deserializer); + + @protected + SwapStatus sse_decode_swap_status(SseDeserializer deserializer); + + @protected + Symbol sse_decode_symbol(SseDeserializer deserializer); + + @protected + TlvEntry sse_decode_tlv_entry(SseDeserializer deserializer); + + @protected + int sse_decode_u_16(SseDeserializer deserializer); + + @protected + int sse_decode_u_32(SseDeserializer deserializer); + + @protected + int sse_decode_u_64(SseDeserializer deserializer); + + @protected + int sse_decode_u_8(SseDeserializer deserializer); + + @protected + void sse_decode_unit(SseDeserializer deserializer); + + @protected + UnspentTransactionOutput sse_decode_unspent_transaction_output(SseDeserializer deserializer); + + @protected + UrlSuccessActionData sse_decode_url_success_action_data(SseDeserializer deserializer); + + @protected + ffi.Pointer cst_encode_AnyhowException(AnyhowException raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + throw UnimplementedError(); + } + + @protected + ffi.Pointer cst_encode_StreamSink_breez_event_Dco( + RustStreamSink raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_String(raw.setupAndSerialize( + codec: DcoCodec(decodeSuccessData: dco_decode_breez_event, decodeErrorData: null))); + } + + @protected + ffi.Pointer cst_encode_StreamSink_log_entry_Dco( + RustStreamSink raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_String(raw.setupAndSerialize( + codec: DcoCodec(decodeSuccessData: dco_decode_log_entry, decodeErrorData: null))); + } + + @protected + ffi.Pointer cst_encode_String(String raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return cst_encode_list_prim_u_8_strict(utf8.encoder.convert(raw)); + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_aes_success_action_data_decrypted(AesSuccessActionDataDecrypted raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_aes_success_action_data_decrypted(); + cst_api_fill_to_wire_aes_success_action_data_decrypted(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_aes_success_action_data_result( + AesSuccessActionDataResult raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_aes_success_action_data_result(); + cst_api_fill_to_wire_aes_success_action_data_result(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_backup_failed_data(BackupFailedData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_backup_failed_data(); + cst_api_fill_to_wire_backup_failed_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bitcoin_address_data( + BitcoinAddressData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_bitcoin_address_data(); + cst_api_fill_to_wire_bitcoin_address_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_bool(cst_encode_bool(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_buy_bitcoin_request( + BuyBitcoinRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_buy_bitcoin_request(); + cst_api_fill_to_wire_buy_bitcoin_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_check_message_request( + CheckMessageRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_check_message_request(); + cst_api_fill_to_wire_check_message_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_closed_channel_payment_details( + ClosedChannelPaymentDetails raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_closed_channel_payment_details(); + cst_api_fill_to_wire_closed_channel_payment_details(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_configure_node_request( + ConfigureNodeRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_configure_node_request(); + cst_api_fill_to_wire_configure_node_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_connect_request(ConnectRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_connect_request(); + cst_api_fill_to_wire_connect_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_greenlight_credentials( + GreenlightCredentials raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_greenlight_credentials(); + cst_api_fill_to_wire_greenlight_credentials(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_greenlight_node_config( + GreenlightNodeConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_greenlight_node_config(); + cst_api_fill_to_wire_greenlight_node_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_i_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_i_64(cst_encode_i_64(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_invoice_paid_details( + InvoicePaidDetails raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_invoice_paid_details(); + cst_api_fill_to_wire_invoice_paid_details(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_list_payments_request( + ListPaymentsRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_list_payments_request(); + cst_api_fill_to_wire_list_payments_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_invoice(LNInvoice raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_invoice(); + cst_api_fill_to_wire_ln_invoice(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_payment_details(LnPaymentDetails raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_payment_details(); + cst_api_fill_to_wire_ln_payment_details(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_auth_request_data( + LnUrlAuthRequestData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_auth_request_data(); + cst_api_fill_to_wire_ln_url_auth_request_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_error_data(LnUrlErrorData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_error_data(); + cst_api_fill_to_wire_ln_url_error_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_pay_error_data( + LnUrlPayErrorData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_error_data(); + cst_api_fill_to_wire_ln_url_pay_error_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_request(); + cst_api_fill_to_wire_ln_url_pay_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_pay_request_data( + LnUrlPayRequestData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_request_data(); + cst_api_fill_to_wire_ln_url_pay_request_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_pay_success_data( + LnUrlPaySuccessData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_success_data(); + cst_api_fill_to_wire_ln_url_pay_success_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_withdraw_request( + LnUrlWithdrawRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_withdraw_request(); + cst_api_fill_to_wire_ln_url_withdraw_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_withdraw_request_data( + LnUrlWithdrawRequestData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_withdraw_request_data(); + cst_api_fill_to_wire_ln_url_withdraw_request_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_ln_url_withdraw_success_data( + LnUrlWithdrawSuccessData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_withdraw_success_data(); + cst_api_fill_to_wire_ln_url_withdraw_success_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_lsp_information(LspInformation raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_lsp_information(); + cst_api_fill_to_wire_lsp_information(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_message_success_action_data( + MessageSuccessActionData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_message_success_action_data(); + cst_api_fill_to_wire_message_success_action_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_node_config(NodeConfig raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_node_config(); + cst_api_fill_to_wire_node_config(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_node_credentials(NodeCredentials raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_node_credentials(); + cst_api_fill_to_wire_node_credentials(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_open_channel_fee_request( + OpenChannelFeeRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_open_channel_fee_request(); + cst_api_fill_to_wire_open_channel_fee_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_opening_fee_params(OpeningFeeParams raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_opening_fee_params(); + cst_api_fill_to_wire_opening_fee_params(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_pay_onchain_request( + PayOnchainRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_pay_onchain_request(); + cst_api_fill_to_wire_pay_onchain_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_payment(Payment raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_payment(); + cst_api_fill_to_wire_payment(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_payment_failed_data( + PaymentFailedData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_payment_failed_data(); + cst_api_fill_to_wire_payment_failed_data(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_prepare_onchain_payment_request(PrepareOnchainPaymentRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_prepare_onchain_payment_request(); + cst_api_fill_to_wire_prepare_onchain_payment_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(PrepareRedeemOnchainFundsRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_prepare_redeem_onchain_funds_request(); + cst_api_fill_to_wire_prepare_redeem_onchain_funds_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_prepare_refund_request( + PrepareRefundRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_prepare_refund_request(); + cst_api_fill_to_wire_prepare_refund_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_receive_onchain_request( + ReceiveOnchainRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_receive_onchain_request(); + cst_api_fill_to_wire_receive_onchain_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_receive_payment_request( + ReceivePaymentRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_receive_payment_request(); + cst_api_fill_to_wire_receive_payment_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_redeem_onchain_funds_request( + RedeemOnchainFundsRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_redeem_onchain_funds_request(); + cst_api_fill_to_wire_redeem_onchain_funds_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_refund_request(RefundRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_refund_request(); + cst_api_fill_to_wire_refund_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_report_issue_request( + ReportIssueRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_report_issue_request(); + cst_api_fill_to_wire_report_issue_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_report_payment_failure_details( + ReportPaymentFailureDetails raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_report_payment_failure_details(); + cst_api_fill_to_wire_report_payment_failure_details(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_reverse_swap_fees_request( + ReverseSwapFeesRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_reverse_swap_fees_request(); + cst_api_fill_to_wire_reverse_swap_fees_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_reverse_swap_info(ReverseSwapInfo raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_reverse_swap_info(); + cst_api_fill_to_wire_reverse_swap_info(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_send_onchain_request( + SendOnchainRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_send_onchain_request(); + cst_api_fill_to_wire_send_onchain_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_send_payment_request( + SendPaymentRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_send_payment_request(); + cst_api_fill_to_wire_send_payment_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer + cst_encode_box_autoadd_send_spontaneous_payment_request(SendSpontaneousPaymentRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_send_spontaneous_payment_request(); + cst_api_fill_to_wire_send_spontaneous_payment_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_sign_message_request( + SignMessageRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_sign_message_request(); + cst_api_fill_to_wire_sign_message_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_static_backup_request( + StaticBackupRequest raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_static_backup_request(); + cst_api_fill_to_wire_static_backup_request(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_success_action_processed( + SuccessActionProcessed raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_success_action_processed(); + cst_api_fill_to_wire_success_action_processed(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_swap_info(SwapInfo raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_swap_info(); + cst_api_fill_to_wire_swap_info(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_symbol(Symbol raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_symbol(); + cst_api_fill_to_wire_symbol(raw, ptr.ref); + return ptr; + } + + @protected + ffi.Pointer cst_encode_box_autoadd_u_32(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_32(cst_encode_u_32(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_u_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_64(cst_encode_u_64(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_url_success_action_data( + UrlSuccessActionData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_url_success_action_data(); + cst_api_fill_to_wire_url_success_action_data(raw, ptr.ref); + return ptr; + } + + @protected + int cst_encode_i_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toInt(); + } + + @protected + ffi.Pointer cst_encode_list_String(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_String(raw.length); + for (var i = 0; i < raw.length; ++i) { + ans.ref.ptr[i] = cst_encode_String(raw[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_fiat_currency(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_fiat_currency(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_fiat_currency(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_locale_overrides(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_locale_overrides(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_locale_overrides(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_localized_name(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_localized_name(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_localized_name(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_lsp_information(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_lsp_information(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_lsp_information(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_metadata_filter(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_metadata_filter(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_metadata_filter(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_opening_fee_params( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_opening_fee_params(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_opening_fee_params(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_payment(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_payment(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_payment(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_payment_type_filter( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_payment_type_filter(raw.length); + for (var i = 0; i < raw.length; ++i) { + ans.ref.ptr[i] = cst_encode_payment_type_filter(raw[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_prim_u_8_strict(Uint8List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_prim_u_8_strict(raw.length); + ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); + return ans; + } + + @protected + ffi.Pointer cst_encode_list_rate(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_rate(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_rate(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_reverse_swap_info(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_reverse_swap_info(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_reverse_swap_info(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_route_hint(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_route_hint(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_route_hint(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_route_hint_hop(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_route_hint_hop(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_route_hint_hop(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_swap_info(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_swap_info(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_swap_info(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_tlv_entry(List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_tlv_entry(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_tlv_entry(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_list_unspent_transaction_output( + List raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ans = wire.cst_new_list_unspent_transaction_output(raw.length); + for (var i = 0; i < raw.length; ++i) { + cst_api_fill_to_wire_unspent_transaction_output(raw[i], ans.ref.ptr[i]); + } + return ans; + } + + @protected + ffi.Pointer cst_encode_opt_String(String? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_String(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_bool(bool? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_bool(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_greenlight_credentials( + GreenlightCredentials? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_greenlight_credentials(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_i_64(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_i_64(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_ln_invoice(LNInvoice? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_ln_invoice(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_lsp_information(LspInformation? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_lsp_information(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_node_credentials(NodeCredentials? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_node_credentials(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_opening_fee_params( + OpeningFeeParams? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_opening_fee_params(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_payment(Payment? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_payment(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_reverse_swap_info(ReverseSwapInfo? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_reverse_swap_info(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_success_action_processed( + SuccessActionProcessed? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_success_action_processed(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_swap_info(SwapInfo? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_swap_info(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_symbol(Symbol? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_symbol(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_u_32(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_32(raw); + } + + @protected + ffi.Pointer cst_encode_opt_box_autoadd_u_64(int? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_String(List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_String(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_locale_overrides( + List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_locale_overrides(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_localized_name(List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_localized_name(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_metadata_filter(List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_metadata_filter(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_payment_type_filter( + List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_payment_type_filter(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_prim_u_8_strict(Uint8List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_prim_u_8_strict(raw); + } + + @protected + ffi.Pointer cst_encode_opt_list_tlv_entry(List? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_list_tlv_entry(raw); + } + + @protected + int cst_encode_u_64(int raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toInt(); + } + + @protected + void cst_api_fill_to_wire_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted apiObj, wire_cst_aes_success_action_data_decrypted wireObj) { + wireObj.description = cst_encode_String(apiObj.description); + wireObj.plaintext = cst_encode_String(apiObj.plaintext); + } + + @protected + void cst_api_fill_to_wire_aes_success_action_data_result( + AesSuccessActionDataResult apiObj, wire_cst_aes_success_action_data_result wireObj) { + if (apiObj is AesSuccessActionDataResult_Decrypted) { + var pre_data = cst_encode_box_autoadd_aes_success_action_data_decrypted(apiObj.data); + wireObj.tag = 0; + wireObj.kind.Decrypted.data = pre_data; + return; + } + if (apiObj is AesSuccessActionDataResult_ErrorStatus) { + var pre_reason = cst_encode_String(apiObj.reason); + wireObj.tag = 1; + wireObj.kind.ErrorStatus.reason = pre_reason; + return; + } + } + + @protected + void cst_api_fill_to_wire_backup_failed_data(BackupFailedData apiObj, wire_cst_backup_failed_data wireObj) { + wireObj.error = cst_encode_String(apiObj.error); + } + + @protected + void cst_api_fill_to_wire_backup_status(BackupStatus apiObj, wire_cst_backup_status wireObj) { + wireObj.backed_up = cst_encode_bool(apiObj.backedUp); + wireObj.last_backup_time = cst_encode_opt_box_autoadd_u_64(apiObj.lastBackupTime); + } + + @protected + void cst_api_fill_to_wire_bitcoin_address_data( + BitcoinAddressData apiObj, wire_cst_bitcoin_address_data wireObj) { + wireObj.address = cst_encode_String(apiObj.address); + wireObj.network = cst_encode_network(apiObj.network); + wireObj.amount_sat = cst_encode_opt_box_autoadd_u_64(apiObj.amountSat); + wireObj.label = cst_encode_opt_String(apiObj.label); + wireObj.message = cst_encode_opt_String(apiObj.message); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_aes_success_action_data_decrypted(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_aes_success_action_data_result( + AesSuccessActionDataResult apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_aes_success_action_data_result(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_backup_failed_data( + BackupFailedData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_backup_failed_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_bitcoin_address_data( + BitcoinAddressData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_bitcoin_address_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_buy_bitcoin_request( + BuyBitcoinRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_buy_bitcoin_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_check_message_request( + CheckMessageRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_check_message_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_closed_channel_payment_details( + ClosedChannelPaymentDetails apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_closed_channel_payment_details(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_configure_node_request( + ConfigureNodeRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_configure_node_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_connect_request( + ConnectRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_connect_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_greenlight_credentials( + GreenlightCredentials apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_greenlight_credentials(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_greenlight_node_config( + GreenlightNodeConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_greenlight_node_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_invoice_paid_details( + InvoicePaidDetails apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_invoice_paid_details(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_list_payments_request( + ListPaymentsRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_list_payments_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_invoice( + LNInvoice apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_invoice(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_payment_details( + LnPaymentDetails apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_payment_details(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_auth_request_data( + LnUrlAuthRequestData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_auth_request_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_error_data( + LnUrlErrorData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_error_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_pay_error_data( + LnUrlPayErrorData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_pay_error_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_pay_request( + LnUrlPayRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_pay_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_pay_request_data( + LnUrlPayRequestData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_pay_request_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_pay_success_data( + LnUrlPaySuccessData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_pay_success_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_withdraw_request( + LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_withdraw_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_withdraw_request_data( + LnUrlWithdrawRequestData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_withdraw_request_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_ln_url_withdraw_success_data( + LnUrlWithdrawSuccessData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_ln_url_withdraw_success_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_lsp_information( + LspInformation apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_lsp_information(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_message_success_action_data( + MessageSuccessActionData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_message_success_action_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_node_config( + NodeConfig apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_node_config(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_node_credentials( + NodeCredentials apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_node_credentials(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_open_channel_fee_request( + OpenChannelFeeRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_open_channel_fee_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_opening_fee_params( + OpeningFeeParams apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_opening_fee_params(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_pay_onchain_request( + PayOnchainRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_pay_onchain_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_payment(Payment apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_payment(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_payment_failed_data( + PaymentFailedData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_payment_failed_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_prepare_onchain_payment_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest apiObj, + ffi.Pointer wireObj) { + cst_api_fill_to_wire_prepare_redeem_onchain_funds_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_prepare_refund_request( + PrepareRefundRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_prepare_refund_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_receive_onchain_request( + ReceiveOnchainRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_receive_onchain_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_receive_payment_request( + ReceivePaymentRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_receive_payment_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_redeem_onchain_funds_request( + RedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_redeem_onchain_funds_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_refund_request( + RefundRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_refund_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_report_issue_request( + ReportIssueRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_report_issue_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_report_payment_failure_details( + ReportPaymentFailureDetails apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_report_payment_failure_details(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_reverse_swap_fees_request( + ReverseSwapFeesRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_reverse_swap_fees_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_reverse_swap_info( + ReverseSwapInfo apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_reverse_swap_info(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_send_onchain_request( + SendOnchainRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_send_onchain_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_send_payment_request( + SendPaymentRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_send_payment_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_send_spontaneous_payment_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_sign_message_request( + SignMessageRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_sign_message_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_static_backup_request( + StaticBackupRequest apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_static_backup_request(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_success_action_processed( + SuccessActionProcessed apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_success_action_processed(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_swap_info(SwapInfo apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_swap_info(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_symbol(Symbol apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_symbol(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_box_autoadd_url_success_action_data( + UrlSuccessActionData apiObj, ffi.Pointer wireObj) { + cst_api_fill_to_wire_url_success_action_data(apiObj, wireObj.ref); + } + + @protected + void cst_api_fill_to_wire_breez_event(BreezEvent apiObj, wire_cst_breez_event wireObj) { + if (apiObj is BreezEvent_NewBlock) { + var pre_block = cst_encode_u_32(apiObj.block); + wireObj.tag = 0; + wireObj.kind.NewBlock.block = pre_block; + return; + } + if (apiObj is BreezEvent_InvoicePaid) { + var pre_details = cst_encode_box_autoadd_invoice_paid_details(apiObj.details); + wireObj.tag = 1; + wireObj.kind.InvoicePaid.details = pre_details; + return; + } + if (apiObj is BreezEvent_Synced) { + wireObj.tag = 2; + return; + } + if (apiObj is BreezEvent_PaymentSucceed) { + var pre_details = cst_encode_box_autoadd_payment(apiObj.details); + wireObj.tag = 3; + wireObj.kind.PaymentSucceed.details = pre_details; + return; + } + if (apiObj is BreezEvent_PaymentFailed) { + var pre_details = cst_encode_box_autoadd_payment_failed_data(apiObj.details); + wireObj.tag = 4; + wireObj.kind.PaymentFailed.details = pre_details; + return; + } + if (apiObj is BreezEvent_BackupStarted) { + wireObj.tag = 5; + return; + } + if (apiObj is BreezEvent_BackupSucceeded) { + wireObj.tag = 6; + return; + } + if (apiObj is BreezEvent_BackupFailed) { + var pre_details = cst_encode_box_autoadd_backup_failed_data(apiObj.details); + wireObj.tag = 7; + wireObj.kind.BackupFailed.details = pre_details; + return; + } + if (apiObj is BreezEvent_SwapUpdated) { + var pre_details = cst_encode_box_autoadd_swap_info(apiObj.details); + wireObj.tag = 8; + wireObj.kind.SwapUpdated.details = pre_details; + return; + } + } + + @protected + void cst_api_fill_to_wire_buy_bitcoin_request( + BuyBitcoinRequest apiObj, wire_cst_buy_bitcoin_request wireObj) { + wireObj.provider = cst_encode_buy_bitcoin_provider(apiObj.provider); + wireObj.opening_fee_params = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); + } + + @protected + void cst_api_fill_to_wire_buy_bitcoin_response( + BuyBitcoinResponse apiObj, wire_cst_buy_bitcoin_response wireObj) { + wireObj.url = cst_encode_String(apiObj.url); + wireObj.opening_fee_params = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); + } + + @protected + void cst_api_fill_to_wire_check_message_request( + CheckMessageRequest apiObj, wire_cst_check_message_request wireObj) { + wireObj.message = cst_encode_String(apiObj.message); + wireObj.pubkey = cst_encode_String(apiObj.pubkey); + wireObj.signature = cst_encode_String(apiObj.signature); + } + + @protected + void cst_api_fill_to_wire_check_message_response( + CheckMessageResponse apiObj, wire_cst_check_message_response wireObj) { + wireObj.is_valid = cst_encode_bool(apiObj.isValid); + } + + @protected + void cst_api_fill_to_wire_closed_channel_payment_details( + ClosedChannelPaymentDetails apiObj, wire_cst_closed_channel_payment_details wireObj) { + wireObj.state = cst_encode_channel_state(apiObj.state); + wireObj.funding_txid = cst_encode_String(apiObj.fundingTxid); + wireObj.short_channel_id = cst_encode_opt_String(apiObj.shortChannelId); + wireObj.closing_txid = cst_encode_opt_String(apiObj.closingTxid); + } + + @protected + void cst_api_fill_to_wire_config(Config apiObj, wire_cst_config wireObj) { + wireObj.breezserver = cst_encode_String(apiObj.breezserver); + wireObj.chainnotifier_url = cst_encode_String(apiObj.chainnotifierUrl); + wireObj.mempoolspace_url = cst_encode_opt_String(apiObj.mempoolspaceUrl); + wireObj.working_dir = cst_encode_String(apiObj.workingDir); + wireObj.network = cst_encode_network(apiObj.network); + wireObj.payment_timeout_sec = cst_encode_u_32(apiObj.paymentTimeoutSec); + wireObj.default_lsp_id = cst_encode_opt_String(apiObj.defaultLspId); + wireObj.api_key = cst_encode_opt_String(apiObj.apiKey); + wireObj.maxfee_percent = cst_encode_f_64(apiObj.maxfeePercent); + wireObj.exemptfee_msat = cst_encode_u_64(apiObj.exemptfeeMsat); + cst_api_fill_to_wire_node_config(apiObj.nodeConfig, wireObj.node_config); + } + + @protected + void cst_api_fill_to_wire_configure_node_request( + ConfigureNodeRequest apiObj, wire_cst_configure_node_request wireObj) { + wireObj.close_to_address = cst_encode_opt_String(apiObj.closeToAddress); + } + + @protected + void cst_api_fill_to_wire_connect_request(ConnectRequest apiObj, wire_cst_connect_request wireObj) { + cst_api_fill_to_wire_config(apiObj.config, wireObj.config); + wireObj.seed = cst_encode_list_prim_u_8_strict(apiObj.seed); + wireObj.restore_only = cst_encode_opt_box_autoadd_bool(apiObj.restoreOnly); + } + + @protected + void cst_api_fill_to_wire_currency_info(CurrencyInfo apiObj, wire_cst_currency_info wireObj) { + wireObj.name = cst_encode_String(apiObj.name); + wireObj.fraction_size = cst_encode_u_32(apiObj.fractionSize); + wireObj.spacing = cst_encode_opt_box_autoadd_u_32(apiObj.spacing); + wireObj.symbol = cst_encode_opt_box_autoadd_symbol(apiObj.symbol); + wireObj.uniq_symbol = cst_encode_opt_box_autoadd_symbol(apiObj.uniqSymbol); + wireObj.localized_name = cst_encode_opt_list_localized_name(apiObj.localizedName); + wireObj.locale_overrides = cst_encode_opt_list_locale_overrides(apiObj.localeOverrides); + } + + @protected + void cst_api_fill_to_wire_fiat_currency(FiatCurrency apiObj, wire_cst_fiat_currency wireObj) { + wireObj.id = cst_encode_String(apiObj.id); + cst_api_fill_to_wire_currency_info(apiObj.info, wireObj.info); + } + + @protected + void cst_api_fill_to_wire_greenlight_credentials( + GreenlightCredentials apiObj, wire_cst_greenlight_credentials wireObj) { + wireObj.device_key = cst_encode_list_prim_u_8_strict(apiObj.deviceKey); + wireObj.device_cert = cst_encode_list_prim_u_8_strict(apiObj.deviceCert); + } + + @protected + void cst_api_fill_to_wire_greenlight_node_config( + GreenlightNodeConfig apiObj, wire_cst_greenlight_node_config wireObj) { + wireObj.partner_credentials = + cst_encode_opt_box_autoadd_greenlight_credentials(apiObj.partnerCredentials); + wireObj.invite_code = cst_encode_opt_String(apiObj.inviteCode); + } + + @protected + void cst_api_fill_to_wire_input_type(InputType apiObj, wire_cst_input_type wireObj) { + if (apiObj is InputType_BitcoinAddress) { + var pre_address = cst_encode_box_autoadd_bitcoin_address_data(apiObj.address); + wireObj.tag = 0; + wireObj.kind.BitcoinAddress.address = pre_address; + return; + } + if (apiObj is InputType_Bolt11) { + var pre_invoice = cst_encode_box_autoadd_ln_invoice(apiObj.invoice); + wireObj.tag = 1; + wireObj.kind.Bolt11.invoice = pre_invoice; + return; + } + if (apiObj is InputType_NodeId) { + var pre_node_id = cst_encode_String(apiObj.nodeId); + wireObj.tag = 2; + wireObj.kind.NodeId.node_id = pre_node_id; + return; + } + if (apiObj is InputType_Url) { + var pre_url = cst_encode_String(apiObj.url); + wireObj.tag = 3; + wireObj.kind.Url.url = pre_url; + return; + } + if (apiObj is InputType_LnUrlPay) { + var pre_data = cst_encode_box_autoadd_ln_url_pay_request_data(apiObj.data); + wireObj.tag = 4; + wireObj.kind.LnUrlPay.data = pre_data; + return; + } + if (apiObj is InputType_LnUrlWithdraw) { + var pre_data = cst_encode_box_autoadd_ln_url_withdraw_request_data(apiObj.data); + wireObj.tag = 5; + wireObj.kind.LnUrlWithdraw.data = pre_data; + return; + } + if (apiObj is InputType_LnUrlAuth) { + var pre_data = cst_encode_box_autoadd_ln_url_auth_request_data(apiObj.data); + wireObj.tag = 6; + wireObj.kind.LnUrlAuth.data = pre_data; + return; + } + if (apiObj is InputType_LnUrlError) { + var pre_data = cst_encode_box_autoadd_ln_url_error_data(apiObj.data); + wireObj.tag = 7; + wireObj.kind.LnUrlError.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_invoice_paid_details( + InvoicePaidDetails apiObj, wire_cst_invoice_paid_details wireObj) { + wireObj.payment_hash = cst_encode_String(apiObj.paymentHash); + wireObj.bolt11 = cst_encode_String(apiObj.bolt11); + wireObj.payment = cst_encode_opt_box_autoadd_payment(apiObj.payment); + } + + @protected + void cst_api_fill_to_wire_list_payments_request( + ListPaymentsRequest apiObj, wire_cst_list_payments_request wireObj) { + wireObj.filters = cst_encode_opt_list_payment_type_filter(apiObj.filters); + wireObj.metadata_filters = cst_encode_opt_list_metadata_filter(apiObj.metadataFilters); + wireObj.from_timestamp = cst_encode_opt_box_autoadd_i_64(apiObj.fromTimestamp); + wireObj.to_timestamp = cst_encode_opt_box_autoadd_i_64(apiObj.toTimestamp); + wireObj.include_failures = cst_encode_opt_box_autoadd_bool(apiObj.includeFailures); + wireObj.offset = cst_encode_opt_box_autoadd_u_32(apiObj.offset); + wireObj.limit = cst_encode_opt_box_autoadd_u_32(apiObj.limit); + } + + @protected + void cst_api_fill_to_wire_ln_invoice(LNInvoice apiObj, wire_cst_ln_invoice wireObj) { + wireObj.bolt11 = cst_encode_String(apiObj.bolt11); + wireObj.network = cst_encode_network(apiObj.network); + wireObj.payee_pubkey = cst_encode_String(apiObj.payeePubkey); + wireObj.payment_hash = cst_encode_String(apiObj.paymentHash); + wireObj.description = cst_encode_opt_String(apiObj.description); + wireObj.description_hash = cst_encode_opt_String(apiObj.descriptionHash); + wireObj.amount_msat = cst_encode_opt_box_autoadd_u_64(apiObj.amountMsat); + wireObj.timestamp = cst_encode_u_64(apiObj.timestamp); + wireObj.expiry = cst_encode_u_64(apiObj.expiry); + wireObj.routing_hints = cst_encode_list_route_hint(apiObj.routingHints); + wireObj.payment_secret = cst_encode_list_prim_u_8_strict(apiObj.paymentSecret); + wireObj.min_final_cltv_expiry_delta = cst_encode_u_64(apiObj.minFinalCltvExpiryDelta); + } + + @protected + void cst_api_fill_to_wire_ln_payment_details(LnPaymentDetails apiObj, wire_cst_ln_payment_details wireObj) { + wireObj.payment_hash = cst_encode_String(apiObj.paymentHash); + wireObj.label = cst_encode_String(apiObj.label); + wireObj.destination_pubkey = cst_encode_String(apiObj.destinationPubkey); + wireObj.payment_preimage = cst_encode_String(apiObj.paymentPreimage); + wireObj.keysend = cst_encode_bool(apiObj.keysend); + wireObj.bolt11 = cst_encode_String(apiObj.bolt11); + wireObj.open_channel_bolt11 = cst_encode_opt_String(apiObj.openChannelBolt11); + wireObj.lnurl_success_action = + cst_encode_opt_box_autoadd_success_action_processed(apiObj.lnurlSuccessAction); + wireObj.lnurl_pay_domain = cst_encode_opt_String(apiObj.lnurlPayDomain); + wireObj.ln_address = cst_encode_opt_String(apiObj.lnAddress); + wireObj.lnurl_metadata = cst_encode_opt_String(apiObj.lnurlMetadata); + wireObj.lnurl_withdraw_endpoint = cst_encode_opt_String(apiObj.lnurlWithdrawEndpoint); + wireObj.swap_info = cst_encode_opt_box_autoadd_swap_info(apiObj.swapInfo); + wireObj.reverse_swap_info = cst_encode_opt_box_autoadd_reverse_swap_info(apiObj.reverseSwapInfo); + wireObj.pending_expiration_block = cst_encode_opt_box_autoadd_u_32(apiObj.pendingExpirationBlock); + } + + @protected + void cst_api_fill_to_wire_ln_url_auth_request_data( + LnUrlAuthRequestData apiObj, wire_cst_ln_url_auth_request_data wireObj) { + wireObj.k1 = cst_encode_String(apiObj.k1); + wireObj.action = cst_encode_opt_String(apiObj.action); + wireObj.domain = cst_encode_String(apiObj.domain); + wireObj.url = cst_encode_String(apiObj.url); + } + + @protected + void cst_api_fill_to_wire_ln_url_callback_status( + LnUrlCallbackStatus apiObj, wire_cst_ln_url_callback_status wireObj) { + if (apiObj is LnUrlCallbackStatus_Ok) { + wireObj.tag = 0; + return; + } + if (apiObj is LnUrlCallbackStatus_ErrorStatus) { + var pre_data = cst_encode_box_autoadd_ln_url_error_data(apiObj.data); + wireObj.tag = 1; + wireObj.kind.ErrorStatus.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_ln_url_error_data(LnUrlErrorData apiObj, wire_cst_ln_url_error_data wireObj) { + wireObj.reason = cst_encode_String(apiObj.reason); + } + + @protected + void cst_api_fill_to_wire_ln_url_pay_error_data( + LnUrlPayErrorData apiObj, wire_cst_ln_url_pay_error_data wireObj) { + wireObj.payment_hash = cst_encode_String(apiObj.paymentHash); + wireObj.reason = cst_encode_String(apiObj.reason); + } + + @protected + void cst_api_fill_to_wire_ln_url_pay_request(LnUrlPayRequest apiObj, wire_cst_ln_url_pay_request wireObj) { + cst_api_fill_to_wire_ln_url_pay_request_data(apiObj.data, wireObj.data); + wireObj.amount_msat = cst_encode_u_64(apiObj.amountMsat); + wireObj.comment = cst_encode_opt_String(apiObj.comment); + wireObj.payment_label = cst_encode_opt_String(apiObj.paymentLabel); + } + + @protected + void cst_api_fill_to_wire_ln_url_pay_request_data( + LnUrlPayRequestData apiObj, wire_cst_ln_url_pay_request_data wireObj) { + wireObj.callback = cst_encode_String(apiObj.callback); + wireObj.min_sendable = cst_encode_u_64(apiObj.minSendable); + wireObj.max_sendable = cst_encode_u_64(apiObj.maxSendable); + wireObj.metadata_str = cst_encode_String(apiObj.metadataStr); + wireObj.comment_allowed = cst_encode_u_16(apiObj.commentAllowed); + wireObj.domain = cst_encode_String(apiObj.domain); + wireObj.allows_nostr = cst_encode_bool(apiObj.allowsNostr); + wireObj.nostr_pubkey = cst_encode_opt_String(apiObj.nostrPubkey); + wireObj.ln_address = cst_encode_opt_String(apiObj.lnAddress); + } + + @protected + void cst_api_fill_to_wire_ln_url_pay_result(LnUrlPayResult apiObj, wire_cst_ln_url_pay_result wireObj) { + if (apiObj is LnUrlPayResult_EndpointSuccess) { + var pre_data = cst_encode_box_autoadd_ln_url_pay_success_data(apiObj.data); + wireObj.tag = 0; + wireObj.kind.EndpointSuccess.data = pre_data; + return; + } + if (apiObj is LnUrlPayResult_EndpointError) { + var pre_data = cst_encode_box_autoadd_ln_url_error_data(apiObj.data); + wireObj.tag = 1; + wireObj.kind.EndpointError.data = pre_data; + return; + } + if (apiObj is LnUrlPayResult_PayError) { + var pre_data = cst_encode_box_autoadd_ln_url_pay_error_data(apiObj.data); + wireObj.tag = 2; + wireObj.kind.PayError.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_ln_url_pay_success_data( + LnUrlPaySuccessData apiObj, wire_cst_ln_url_pay_success_data wireObj) { + cst_api_fill_to_wire_payment(apiObj.payment, wireObj.payment); + wireObj.success_action = cst_encode_opt_box_autoadd_success_action_processed(apiObj.successAction); + } + + @protected + void cst_api_fill_to_wire_ln_url_withdraw_request( + LnUrlWithdrawRequest apiObj, wire_cst_ln_url_withdraw_request wireObj) { + cst_api_fill_to_wire_ln_url_withdraw_request_data(apiObj.data, wireObj.data); + wireObj.amount_msat = cst_encode_u_64(apiObj.amountMsat); + wireObj.description = cst_encode_opt_String(apiObj.description); + } + + @protected + void cst_api_fill_to_wire_ln_url_withdraw_request_data( + LnUrlWithdrawRequestData apiObj, wire_cst_ln_url_withdraw_request_data wireObj) { + wireObj.callback = cst_encode_String(apiObj.callback); + wireObj.k1 = cst_encode_String(apiObj.k1); + wireObj.default_description = cst_encode_String(apiObj.defaultDescription); + wireObj.min_withdrawable = cst_encode_u_64(apiObj.minWithdrawable); + wireObj.max_withdrawable = cst_encode_u_64(apiObj.maxWithdrawable); + } + + @protected + void cst_api_fill_to_wire_ln_url_withdraw_result( + LnUrlWithdrawResult apiObj, wire_cst_ln_url_withdraw_result wireObj) { + if (apiObj is LnUrlWithdrawResult_Ok) { + var pre_data = cst_encode_box_autoadd_ln_url_withdraw_success_data(apiObj.data); + wireObj.tag = 0; + wireObj.kind.Ok.data = pre_data; + return; + } + if (apiObj is LnUrlWithdrawResult_ErrorStatus) { + var pre_data = cst_encode_box_autoadd_ln_url_error_data(apiObj.data); + wireObj.tag = 1; + wireObj.kind.ErrorStatus.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_ln_url_withdraw_success_data( + LnUrlWithdrawSuccessData apiObj, wire_cst_ln_url_withdraw_success_data wireObj) { + cst_api_fill_to_wire_ln_invoice(apiObj.invoice, wireObj.invoice); + } + + @protected + void cst_api_fill_to_wire_locale_overrides(LocaleOverrides apiObj, wire_cst_locale_overrides wireObj) { + wireObj.locale = cst_encode_String(apiObj.locale); + wireObj.spacing = cst_encode_opt_box_autoadd_u_32(apiObj.spacing); + cst_api_fill_to_wire_symbol(apiObj.symbol, wireObj.symbol); + } + + @protected + void cst_api_fill_to_wire_localized_name(LocalizedName apiObj, wire_cst_localized_name wireObj) { + wireObj.locale = cst_encode_String(apiObj.locale); + wireObj.name = cst_encode_String(apiObj.name); + } + + @protected + void cst_api_fill_to_wire_log_entry(LogEntry apiObj, wire_cst_log_entry wireObj) { + wireObj.line = cst_encode_String(apiObj.line); + wireObj.level = cst_encode_String(apiObj.level); + } + + @protected + void cst_api_fill_to_wire_lsp_information(LspInformation apiObj, wire_cst_lsp_information wireObj) { + wireObj.id = cst_encode_String(apiObj.id); + wireObj.name = cst_encode_String(apiObj.name); + wireObj.widget_url = cst_encode_String(apiObj.widgetUrl); + wireObj.pubkey = cst_encode_String(apiObj.pubkey); + wireObj.host = cst_encode_String(apiObj.host); + wireObj.base_fee_msat = cst_encode_i_64(apiObj.baseFeeMsat); + wireObj.fee_rate = cst_encode_f_64(apiObj.feeRate); + wireObj.time_lock_delta = cst_encode_u_32(apiObj.timeLockDelta); + wireObj.min_htlc_msat = cst_encode_i_64(apiObj.minHtlcMsat); + wireObj.lsp_pubkey = cst_encode_list_prim_u_8_strict(apiObj.lspPubkey); + cst_api_fill_to_wire_opening_fee_params_menu( + apiObj.openingFeeParamsList, wireObj.opening_fee_params_list); + } + + @protected + void cst_api_fill_to_wire_max_reverse_swap_amount_response( + MaxReverseSwapAmountResponse apiObj, wire_cst_max_reverse_swap_amount_response wireObj) { + wireObj.total_sat = cst_encode_u_64(apiObj.totalSat); + } + + @protected + void cst_api_fill_to_wire_message_success_action_data( + MessageSuccessActionData apiObj, wire_cst_message_success_action_data wireObj) { + wireObj.message = cst_encode_String(apiObj.message); + } + + @protected + void cst_api_fill_to_wire_metadata_filter(MetadataFilter apiObj, wire_cst_metadata_filter wireObj) { + wireObj.json_path = cst_encode_String(apiObj.jsonPath); + wireObj.json_value = cst_encode_String(apiObj.jsonValue); + } + + @protected + void cst_api_fill_to_wire_node_config(NodeConfig apiObj, wire_cst_node_config wireObj) { + if (apiObj is NodeConfig_Greenlight) { + var pre_config = cst_encode_box_autoadd_greenlight_node_config(apiObj.config); + wireObj.tag = 0; + wireObj.kind.Greenlight.config = pre_config; + return; + } + } + + @protected + void cst_api_fill_to_wire_node_credentials(NodeCredentials apiObj, wire_cst_node_credentials wireObj) { + if (apiObj is NodeCredentials_Greenlight) { + var pre_credentials = cst_encode_box_autoadd_greenlight_credentials(apiObj.credentials); + wireObj.tag = 0; + wireObj.kind.Greenlight.credentials = pre_credentials; + return; + } + } + + @protected + void cst_api_fill_to_wire_node_state(NodeState apiObj, wire_cst_node_state wireObj) { + wireObj.id = cst_encode_String(apiObj.id); + wireObj.block_height = cst_encode_u_32(apiObj.blockHeight); + wireObj.channels_balance_msat = cst_encode_u_64(apiObj.channelsBalanceMsat); + wireObj.onchain_balance_msat = cst_encode_u_64(apiObj.onchainBalanceMsat); + wireObj.pending_onchain_balance_msat = cst_encode_u_64(apiObj.pendingOnchainBalanceMsat); + wireObj.utxos = cst_encode_list_unspent_transaction_output(apiObj.utxos); + wireObj.max_payable_msat = cst_encode_u_64(apiObj.maxPayableMsat); + wireObj.max_receivable_msat = cst_encode_u_64(apiObj.maxReceivableMsat); + wireObj.max_single_payment_amount_msat = cst_encode_u_64(apiObj.maxSinglePaymentAmountMsat); + wireObj.max_chan_reserve_msats = cst_encode_u_64(apiObj.maxChanReserveMsats); + wireObj.connected_peers = cst_encode_list_String(apiObj.connectedPeers); + wireObj.inbound_liquidity_msats = cst_encode_u_64(apiObj.inboundLiquidityMsats); + } + + @protected + void cst_api_fill_to_wire_onchain_payment_limits_response( + OnchainPaymentLimitsResponse apiObj, wire_cst_onchain_payment_limits_response wireObj) { + wireObj.min_sat = cst_encode_u_64(apiObj.minSat); + wireObj.max_sat = cst_encode_u_64(apiObj.maxSat); + } + + @protected + void cst_api_fill_to_wire_open_channel_fee_request( + OpenChannelFeeRequest apiObj, wire_cst_open_channel_fee_request wireObj) { + wireObj.amount_msat = cst_encode_opt_box_autoadd_u_64(apiObj.amountMsat); + wireObj.expiry = cst_encode_opt_box_autoadd_u_32(apiObj.expiry); + } + + @protected + void cst_api_fill_to_wire_open_channel_fee_response( + OpenChannelFeeResponse apiObj, wire_cst_open_channel_fee_response wireObj) { + wireObj.fee_msat = cst_encode_opt_box_autoadd_u_64(apiObj.feeMsat); + cst_api_fill_to_wire_opening_fee_params(apiObj.feeParams, wireObj.fee_params); + } + + @protected + void cst_api_fill_to_wire_opening_fee_params(OpeningFeeParams apiObj, wire_cst_opening_fee_params wireObj) { + wireObj.min_msat = cst_encode_u_64(apiObj.minMsat); + wireObj.proportional = cst_encode_u_32(apiObj.proportional); + wireObj.valid_until = cst_encode_String(apiObj.validUntil); + wireObj.max_idle_time = cst_encode_u_32(apiObj.maxIdleTime); + wireObj.max_client_to_self_delay = cst_encode_u_32(apiObj.maxClientToSelfDelay); + wireObj.promise = cst_encode_String(apiObj.promise); + } + + @protected + void cst_api_fill_to_wire_opening_fee_params_menu( + OpeningFeeParamsMenu apiObj, wire_cst_opening_fee_params_menu wireObj) { + wireObj.values = cst_encode_list_opening_fee_params(apiObj.values); + } + + @protected + void cst_api_fill_to_wire_pay_onchain_request( + PayOnchainRequest apiObj, wire_cst_pay_onchain_request wireObj) { + wireObj.recipient_address = cst_encode_String(apiObj.recipientAddress); + cst_api_fill_to_wire_prepare_onchain_payment_response(apiObj.prepareRes, wireObj.prepare_res); + } + + @protected + void cst_api_fill_to_wire_pay_onchain_response( + PayOnchainResponse apiObj, wire_cst_pay_onchain_response wireObj) { + cst_api_fill_to_wire_reverse_swap_info(apiObj.reverseSwapInfo, wireObj.reverse_swap_info); + } + + @protected + void cst_api_fill_to_wire_payment(Payment apiObj, wire_cst_payment wireObj) { + wireObj.id = cst_encode_String(apiObj.id); + wireObj.payment_type = cst_encode_payment_type(apiObj.paymentType); + wireObj.payment_time = cst_encode_i_64(apiObj.paymentTime); + wireObj.amount_msat = cst_encode_u_64(apiObj.amountMsat); + wireObj.fee_msat = cst_encode_u_64(apiObj.feeMsat); + wireObj.status = cst_encode_payment_status(apiObj.status); + wireObj.error = cst_encode_opt_String(apiObj.error); + wireObj.description = cst_encode_opt_String(apiObj.description); + cst_api_fill_to_wire_payment_details(apiObj.details, wireObj.details); + wireObj.metadata = cst_encode_opt_String(apiObj.metadata); + } + + @protected + void cst_api_fill_to_wire_payment_details(PaymentDetails apiObj, wire_cst_payment_details wireObj) { + if (apiObj is PaymentDetails_Ln) { + var pre_data = cst_encode_box_autoadd_ln_payment_details(apiObj.data); + wireObj.tag = 0; + wireObj.kind.Ln.data = pre_data; + return; + } + if (apiObj is PaymentDetails_ClosedChannel) { + var pre_data = cst_encode_box_autoadd_closed_channel_payment_details(apiObj.data); + wireObj.tag = 1; + wireObj.kind.ClosedChannel.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_payment_failed_data( + PaymentFailedData apiObj, wire_cst_payment_failed_data wireObj) { + wireObj.error = cst_encode_String(apiObj.error); + wireObj.node_id = cst_encode_String(apiObj.nodeId); + wireObj.invoice = cst_encode_opt_box_autoadd_ln_invoice(apiObj.invoice); + } + + @protected + void cst_api_fill_to_wire_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest apiObj, wire_cst_prepare_onchain_payment_request wireObj) { + wireObj.amount_sat = cst_encode_u_64(apiObj.amountSat); + wireObj.amount_type = cst_encode_swap_amount_type(apiObj.amountType); + wireObj.claim_tx_feerate = cst_encode_u_32(apiObj.claimTxFeerate); + } + + @protected + void cst_api_fill_to_wire_prepare_onchain_payment_response( + PrepareOnchainPaymentResponse apiObj, wire_cst_prepare_onchain_payment_response wireObj) { + wireObj.fees_hash = cst_encode_String(apiObj.feesHash); + wireObj.fees_percentage = cst_encode_f_64(apiObj.feesPercentage); + wireObj.fees_lockup = cst_encode_u_64(apiObj.feesLockup); + wireObj.fees_claim = cst_encode_u_64(apiObj.feesClaim); + wireObj.sender_amount_sat = cst_encode_u_64(apiObj.senderAmountSat); + wireObj.recipient_amount_sat = cst_encode_u_64(apiObj.recipientAmountSat); + wireObj.total_fees = cst_encode_u_64(apiObj.totalFees); + } + + @protected + void cst_api_fill_to_wire_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest apiObj, wire_cst_prepare_redeem_onchain_funds_request wireObj) { + wireObj.to_address = cst_encode_String(apiObj.toAddress); + wireObj.sat_per_vbyte = cst_encode_u_32(apiObj.satPerVbyte); + } + + @protected + void cst_api_fill_to_wire_prepare_redeem_onchain_funds_response( + PrepareRedeemOnchainFundsResponse apiObj, wire_cst_prepare_redeem_onchain_funds_response wireObj) { + wireObj.tx_weight = cst_encode_u_64(apiObj.txWeight); + wireObj.tx_fee_sat = cst_encode_u_64(apiObj.txFeeSat); + } + + @protected + void cst_api_fill_to_wire_prepare_refund_request( + PrepareRefundRequest apiObj, wire_cst_prepare_refund_request wireObj) { + wireObj.swap_address = cst_encode_String(apiObj.swapAddress); + wireObj.to_address = cst_encode_String(apiObj.toAddress); + wireObj.sat_per_vbyte = cst_encode_u_32(apiObj.satPerVbyte); + } + + @protected + void cst_api_fill_to_wire_prepare_refund_response( + PrepareRefundResponse apiObj, wire_cst_prepare_refund_response wireObj) { + wireObj.refund_tx_weight = cst_encode_u_32(apiObj.refundTxWeight); + wireObj.refund_tx_fee_sat = cst_encode_u_64(apiObj.refundTxFeeSat); + } + + @protected + void cst_api_fill_to_wire_rate(Rate apiObj, wire_cst_rate wireObj) { + wireObj.coin = cst_encode_String(apiObj.coin); + wireObj.value = cst_encode_f_64(apiObj.value); + } + + @protected + void cst_api_fill_to_wire_receive_onchain_request( + ReceiveOnchainRequest apiObj, wire_cst_receive_onchain_request wireObj) { + wireObj.opening_fee_params = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); + } + + @protected + void cst_api_fill_to_wire_receive_payment_request( + ReceivePaymentRequest apiObj, wire_cst_receive_payment_request wireObj) { + wireObj.amount_msat = cst_encode_u_64(apiObj.amountMsat); + wireObj.description = cst_encode_String(apiObj.description); + wireObj.preimage = cst_encode_opt_list_prim_u_8_strict(apiObj.preimage); + wireObj.opening_fee_params = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); + wireObj.use_description_hash = cst_encode_opt_box_autoadd_bool(apiObj.useDescriptionHash); + wireObj.expiry = cst_encode_opt_box_autoadd_u_32(apiObj.expiry); + wireObj.cltv = cst_encode_opt_box_autoadd_u_32(apiObj.cltv); + } + + @protected + void cst_api_fill_to_wire_receive_payment_response( + ReceivePaymentResponse apiObj, wire_cst_receive_payment_response wireObj) { + cst_api_fill_to_wire_ln_invoice(apiObj.lnInvoice, wireObj.ln_invoice); + wireObj.opening_fee_params = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); + wireObj.opening_fee_msat = cst_encode_opt_box_autoadd_u_64(apiObj.openingFeeMsat); + } + + @protected + void cst_api_fill_to_wire_recommended_fees(RecommendedFees apiObj, wire_cst_recommended_fees wireObj) { + wireObj.fastest_fee = cst_encode_u_64(apiObj.fastestFee); + wireObj.half_hour_fee = cst_encode_u_64(apiObj.halfHourFee); + wireObj.hour_fee = cst_encode_u_64(apiObj.hourFee); + wireObj.economy_fee = cst_encode_u_64(apiObj.economyFee); + wireObj.minimum_fee = cst_encode_u_64(apiObj.minimumFee); + } + + @protected + void cst_api_fill_to_wire_redeem_onchain_funds_request( + RedeemOnchainFundsRequest apiObj, wire_cst_redeem_onchain_funds_request wireObj) { + wireObj.to_address = cst_encode_String(apiObj.toAddress); + wireObj.sat_per_vbyte = cst_encode_u_32(apiObj.satPerVbyte); + } + + @protected + void cst_api_fill_to_wire_redeem_onchain_funds_response( + RedeemOnchainFundsResponse apiObj, wire_cst_redeem_onchain_funds_response wireObj) { + wireObj.txid = cst_encode_list_prim_u_8_strict(apiObj.txid); + } + + @protected + void cst_api_fill_to_wire_refund_request(RefundRequest apiObj, wire_cst_refund_request wireObj) { + wireObj.swap_address = cst_encode_String(apiObj.swapAddress); + wireObj.to_address = cst_encode_String(apiObj.toAddress); + wireObj.sat_per_vbyte = cst_encode_u_32(apiObj.satPerVbyte); + } + + @protected + void cst_api_fill_to_wire_refund_response(RefundResponse apiObj, wire_cst_refund_response wireObj) { + wireObj.refund_tx_id = cst_encode_String(apiObj.refundTxId); + } + + @protected + void cst_api_fill_to_wire_report_issue_request( + ReportIssueRequest apiObj, wire_cst_report_issue_request wireObj) { + if (apiObj is ReportIssueRequest_PaymentFailure) { + var pre_data = cst_encode_box_autoadd_report_payment_failure_details(apiObj.data); + wireObj.tag = 0; + wireObj.kind.PaymentFailure.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_report_payment_failure_details( + ReportPaymentFailureDetails apiObj, wire_cst_report_payment_failure_details wireObj) { + wireObj.payment_hash = cst_encode_String(apiObj.paymentHash); + wireObj.comment = cst_encode_opt_String(apiObj.comment); + } + + @protected + void cst_api_fill_to_wire_reverse_swap_fees_request( + ReverseSwapFeesRequest apiObj, wire_cst_reverse_swap_fees_request wireObj) { + wireObj.send_amount_sat = cst_encode_opt_box_autoadd_u_64(apiObj.sendAmountSat); + wireObj.claim_tx_feerate = cst_encode_opt_box_autoadd_u_32(apiObj.claimTxFeerate); + } + + @protected + void cst_api_fill_to_wire_reverse_swap_info(ReverseSwapInfo apiObj, wire_cst_reverse_swap_info wireObj) { + wireObj.id = cst_encode_String(apiObj.id); + wireObj.claim_pubkey = cst_encode_String(apiObj.claimPubkey); + wireObj.lockup_txid = cst_encode_opt_String(apiObj.lockupTxid); + wireObj.claim_txid = cst_encode_opt_String(apiObj.claimTxid); + wireObj.onchain_amount_sat = cst_encode_u_64(apiObj.onchainAmountSat); + wireObj.status = cst_encode_reverse_swap_status(apiObj.status); + } + + @protected + void cst_api_fill_to_wire_reverse_swap_pair_info( + ReverseSwapPairInfo apiObj, wire_cst_reverse_swap_pair_info wireObj) { + wireObj.min = cst_encode_u_64(apiObj.min); + wireObj.max = cst_encode_u_64(apiObj.max); + wireObj.fees_hash = cst_encode_String(apiObj.feesHash); + wireObj.fees_percentage = cst_encode_f_64(apiObj.feesPercentage); + wireObj.fees_lockup = cst_encode_u_64(apiObj.feesLockup); + wireObj.fees_claim = cst_encode_u_64(apiObj.feesClaim); + wireObj.total_fees = cst_encode_opt_box_autoadd_u_64(apiObj.totalFees); + } + + @protected + void cst_api_fill_to_wire_route_hint(RouteHint apiObj, wire_cst_route_hint wireObj) { + wireObj.hops = cst_encode_list_route_hint_hop(apiObj.hops); + } + + @protected + void cst_api_fill_to_wire_route_hint_hop(RouteHintHop apiObj, wire_cst_route_hint_hop wireObj) { + wireObj.src_node_id = cst_encode_String(apiObj.srcNodeId); + wireObj.short_channel_id = cst_encode_u_64(apiObj.shortChannelId); + wireObj.fees_base_msat = cst_encode_u_32(apiObj.feesBaseMsat); + wireObj.fees_proportional_millionths = cst_encode_u_32(apiObj.feesProportionalMillionths); + wireObj.cltv_expiry_delta = cst_encode_u_64(apiObj.cltvExpiryDelta); + wireObj.htlc_minimum_msat = cst_encode_opt_box_autoadd_u_64(apiObj.htlcMinimumMsat); + wireObj.htlc_maximum_msat = cst_encode_opt_box_autoadd_u_64(apiObj.htlcMaximumMsat); + } + + @protected + void cst_api_fill_to_wire_send_onchain_request( + SendOnchainRequest apiObj, wire_cst_send_onchain_request wireObj) { + wireObj.amount_sat = cst_encode_u_64(apiObj.amountSat); + wireObj.onchain_recipient_address = cst_encode_String(apiObj.onchainRecipientAddress); + wireObj.pair_hash = cst_encode_String(apiObj.pairHash); + wireObj.sat_per_vbyte = cst_encode_u_32(apiObj.satPerVbyte); + } + + @protected + void cst_api_fill_to_wire_send_onchain_response( + SendOnchainResponse apiObj, wire_cst_send_onchain_response wireObj) { + cst_api_fill_to_wire_reverse_swap_info(apiObj.reverseSwapInfo, wireObj.reverse_swap_info); + } + + @protected + void cst_api_fill_to_wire_send_payment_request( + SendPaymentRequest apiObj, wire_cst_send_payment_request wireObj) { + wireObj.bolt11 = cst_encode_String(apiObj.bolt11); + wireObj.amount_msat = cst_encode_opt_box_autoadd_u_64(apiObj.amountMsat); + wireObj.label = cst_encode_opt_String(apiObj.label); + } + + @protected + void cst_api_fill_to_wire_send_payment_response( + SendPaymentResponse apiObj, wire_cst_send_payment_response wireObj) { + cst_api_fill_to_wire_payment(apiObj.payment, wireObj.payment); + } + + @protected + void cst_api_fill_to_wire_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest apiObj, wire_cst_send_spontaneous_payment_request wireObj) { + wireObj.node_id = cst_encode_String(apiObj.nodeId); + wireObj.amount_msat = cst_encode_u_64(apiObj.amountMsat); + wireObj.extra_tlvs = cst_encode_opt_list_tlv_entry(apiObj.extraTlvs); + wireObj.label = cst_encode_opt_String(apiObj.label); + } + + @protected + void cst_api_fill_to_wire_service_health_check_response( + ServiceHealthCheckResponse apiObj, wire_cst_service_health_check_response wireObj) { + wireObj.status = cst_encode_health_check_status(apiObj.status); + } + + @protected + void cst_api_fill_to_wire_sign_message_request( + SignMessageRequest apiObj, wire_cst_sign_message_request wireObj) { + wireObj.message = cst_encode_String(apiObj.message); + } + + @protected + void cst_api_fill_to_wire_sign_message_response( + SignMessageResponse apiObj, wire_cst_sign_message_response wireObj) { + wireObj.signature = cst_encode_String(apiObj.signature); + } + + @protected + void cst_api_fill_to_wire_static_backup_request( + StaticBackupRequest apiObj, wire_cst_static_backup_request wireObj) { + wireObj.working_dir = cst_encode_String(apiObj.workingDir); + } + + @protected + void cst_api_fill_to_wire_static_backup_response( + StaticBackupResponse apiObj, wire_cst_static_backup_response wireObj) { + wireObj.backup = cst_encode_opt_list_String(apiObj.backup); + } + + @protected + void cst_api_fill_to_wire_success_action_processed( + SuccessActionProcessed apiObj, wire_cst_success_action_processed wireObj) { + if (apiObj is SuccessActionProcessed_Aes) { + var pre_result = cst_encode_box_autoadd_aes_success_action_data_result(apiObj.result); + wireObj.tag = 0; + wireObj.kind.Aes.result = pre_result; + return; + } + if (apiObj is SuccessActionProcessed_Message) { + var pre_data = cst_encode_box_autoadd_message_success_action_data(apiObj.data); + wireObj.tag = 1; + wireObj.kind.Message.data = pre_data; + return; + } + if (apiObj is SuccessActionProcessed_Url) { + var pre_data = cst_encode_box_autoadd_url_success_action_data(apiObj.data); + wireObj.tag = 2; + wireObj.kind.Url.data = pre_data; + return; + } + } + + @protected + void cst_api_fill_to_wire_swap_info(SwapInfo apiObj, wire_cst_swap_info wireObj) { + wireObj.bitcoin_address = cst_encode_String(apiObj.bitcoinAddress); + wireObj.created_at = cst_encode_i_64(apiObj.createdAt); + wireObj.lock_height = cst_encode_i_64(apiObj.lockHeight); + wireObj.payment_hash = cst_encode_list_prim_u_8_strict(apiObj.paymentHash); + wireObj.preimage = cst_encode_list_prim_u_8_strict(apiObj.preimage); + wireObj.private_key = cst_encode_list_prim_u_8_strict(apiObj.privateKey); + wireObj.public_key = cst_encode_list_prim_u_8_strict(apiObj.publicKey); + wireObj.swapper_public_key = cst_encode_list_prim_u_8_strict(apiObj.swapperPublicKey); + wireObj.script = cst_encode_list_prim_u_8_strict(apiObj.script); + wireObj.bolt11 = cst_encode_opt_String(apiObj.bolt11); + wireObj.paid_msat = cst_encode_u_64(apiObj.paidMsat); + wireObj.total_incoming_txs = cst_encode_u_64(apiObj.totalIncomingTxs); + wireObj.confirmed_sats = cst_encode_u_64(apiObj.confirmedSats); + wireObj.unconfirmed_sats = cst_encode_u_64(apiObj.unconfirmedSats); + wireObj.status = cst_encode_swap_status(apiObj.status); + wireObj.refund_tx_ids = cst_encode_list_String(apiObj.refundTxIds); + wireObj.unconfirmed_tx_ids = cst_encode_list_String(apiObj.unconfirmedTxIds); + wireObj.confirmed_tx_ids = cst_encode_list_String(apiObj.confirmedTxIds); + wireObj.min_allowed_deposit = cst_encode_i_64(apiObj.minAllowedDeposit); + wireObj.max_allowed_deposit = cst_encode_i_64(apiObj.maxAllowedDeposit); + wireObj.max_swapper_payable = cst_encode_i_64(apiObj.maxSwapperPayable); + wireObj.last_redeem_error = cst_encode_opt_String(apiObj.lastRedeemError); + wireObj.channel_opening_fees = cst_encode_opt_box_autoadd_opening_fee_params(apiObj.channelOpeningFees); + wireObj.confirmed_at = cst_encode_opt_box_autoadd_u_32(apiObj.confirmedAt); + } + + @protected + void cst_api_fill_to_wire_symbol(Symbol apiObj, wire_cst_symbol wireObj) { + wireObj.grapheme = cst_encode_opt_String(apiObj.grapheme); + wireObj.template = cst_encode_opt_String(apiObj.template); + wireObj.rtl = cst_encode_opt_box_autoadd_bool(apiObj.rtl); + wireObj.position = cst_encode_opt_box_autoadd_u_32(apiObj.position); + } + + @protected + void cst_api_fill_to_wire_tlv_entry(TlvEntry apiObj, wire_cst_tlv_entry wireObj) { + wireObj.field_number = cst_encode_u_64(apiObj.fieldNumber); + wireObj.value = cst_encode_list_prim_u_8_strict(apiObj.value); + } + + @protected + void cst_api_fill_to_wire_unspent_transaction_output( + UnspentTransactionOutput apiObj, wire_cst_unspent_transaction_output wireObj) { + wireObj.txid = cst_encode_list_prim_u_8_strict(apiObj.txid); + wireObj.outnum = cst_encode_u_32(apiObj.outnum); + wireObj.amount_millisatoshi = cst_encode_u_64(apiObj.amountMillisatoshi); + wireObj.address = cst_encode_String(apiObj.address); + wireObj.reserved = cst_encode_bool(apiObj.reserved); + } + + @protected + void cst_api_fill_to_wire_url_success_action_data( + UrlSuccessActionData apiObj, wire_cst_url_success_action_data wireObj) { + wireObj.description = cst_encode_String(apiObj.description); + wireObj.url = cst_encode_String(apiObj.url); + } + + @protected + bool cst_encode_bool(bool raw); + + @protected + int cst_encode_buy_bitcoin_provider(BuyBitcoinProvider raw); + + @protected + int cst_encode_channel_state(ChannelState raw); + + @protected + int cst_encode_environment_type(EnvironmentType raw); + + @protected + double cst_encode_f_64(double raw); + + @protected + int cst_encode_health_check_status(HealthCheckStatus raw); + + @protected + int cst_encode_i_32(int raw); + + @protected + int cst_encode_network(Network raw); + + @protected + int cst_encode_payment_status(PaymentStatus raw); + + @protected + int cst_encode_payment_type(PaymentType raw); + + @protected + int cst_encode_payment_type_filter(PaymentTypeFilter raw); + + @protected + int cst_encode_reverse_swap_status(ReverseSwapStatus raw); + + @protected + int cst_encode_swap_amount_type(SwapAmountType raw); + + @protected + int cst_encode_swap_status(SwapStatus raw); + + @protected + 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 + void sse_encode_AnyhowException(AnyhowException self, SseSerializer serializer); + + @protected + void sse_encode_StreamSink_breez_event_Dco(RustStreamSink self, SseSerializer serializer); + + @protected + void sse_encode_StreamSink_log_entry_Dco(RustStreamSink self, SseSerializer serializer); + + @protected + void sse_encode_String(String self, SseSerializer serializer); + + @protected + void sse_encode_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted self, SseSerializer serializer); + + @protected + void sse_encode_aes_success_action_data_result(AesSuccessActionDataResult self, SseSerializer serializer); + + @protected + void sse_encode_backup_failed_data(BackupFailedData self, SseSerializer serializer); + + @protected + void sse_encode_backup_status(BackupStatus self, SseSerializer serializer); + + @protected + void sse_encode_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer); + + @protected + void sse_encode_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_aes_success_action_data_decrypted( + AesSuccessActionDataDecrypted self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_aes_success_action_data_result( + AesSuccessActionDataResult self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_backup_failed_data(BackupFailedData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_check_message_request(CheckMessageRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_closed_channel_payment_details( + ClosedChannelPaymentDetails self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_configure_node_request(ConfigureNodeRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_connect_request(ConnectRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_greenlight_credentials(GreenlightCredentials self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_greenlight_node_config(GreenlightNodeConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_invoice_paid_details(InvoicePaidDetails self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_list_payments_request(ListPaymentsRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_invoice(LNInvoice self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_payment_details(LnPaymentDetails self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_auth_request_data(LnUrlAuthRequestData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_error_data(LnUrlErrorData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_pay_request_data(LnUrlPayRequestData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_request_data( + LnUrlWithdrawRequestData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_ln_url_withdraw_success_data( + LnUrlWithdrawSuccessData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_lsp_information(LspInformation self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_message_success_action_data( + MessageSuccessActionData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_node_config(NodeConfig self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_node_credentials(NodeCredentials self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_open_channel_fee_request(OpenChannelFeeRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_opening_fee_params(OpeningFeeParams self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_pay_onchain_request(PayOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_payment(Payment self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_payment_failed_data(PaymentFailedData self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_prepare_refund_request(PrepareRefundRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_receive_onchain_request(ReceiveOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_receive_payment_request(ReceivePaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_redeem_onchain_funds_request( + RedeemOnchainFundsRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_refund_request(RefundRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_report_issue_request(ReportIssueRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_report_payment_failure_details( + ReportPaymentFailureDetails self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_reverse_swap_fees_request( + ReverseSwapFeesRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_reverse_swap_info(ReverseSwapInfo self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_send_onchain_request(SendOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_send_payment_request(SendPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_sign_message_request(SignMessageRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_static_backup_request(StaticBackupRequest self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_success_action_processed(SuccessActionProcessed self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_swap_info(SwapInfo self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_symbol(Symbol self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_u_64(int self, SseSerializer serializer); + + @protected + void sse_encode_box_autoadd_url_success_action_data(UrlSuccessActionData self, SseSerializer serializer); + + @protected + void sse_encode_breez_event(BreezEvent self, SseSerializer serializer); + + @protected + void sse_encode_buy_bitcoin_provider(BuyBitcoinProvider self, SseSerializer serializer); + + @protected + void sse_encode_buy_bitcoin_request(BuyBitcoinRequest self, SseSerializer serializer); + + @protected + void sse_encode_buy_bitcoin_response(BuyBitcoinResponse self, SseSerializer serializer); + + @protected + void sse_encode_channel_state(ChannelState self, SseSerializer serializer); + + @protected + void sse_encode_check_message_request(CheckMessageRequest self, SseSerializer serializer); + + @protected + void sse_encode_check_message_response(CheckMessageResponse self, SseSerializer serializer); + + @protected + void sse_encode_closed_channel_payment_details(ClosedChannelPaymentDetails self, SseSerializer serializer); + + @protected + void sse_encode_config(Config self, SseSerializer serializer); + + @protected + void sse_encode_configure_node_request(ConfigureNodeRequest self, SseSerializer serializer); + + @protected + void sse_encode_connect_request(ConnectRequest self, SseSerializer serializer); + + @protected + void sse_encode_currency_info(CurrencyInfo self, SseSerializer serializer); + + @protected + void sse_encode_environment_type(EnvironmentType self, SseSerializer serializer); + + @protected + void sse_encode_f_64(double self, SseSerializer serializer); + + @protected + void sse_encode_fiat_currency(FiatCurrency self, SseSerializer serializer); + + @protected + void sse_encode_greenlight_credentials(GreenlightCredentials self, SseSerializer serializer); + + @protected + void sse_encode_greenlight_node_config(GreenlightNodeConfig self, SseSerializer serializer); + + @protected + void sse_encode_health_check_status(HealthCheckStatus self, SseSerializer serializer); + + @protected + void sse_encode_i_32(int self, SseSerializer serializer); + + @protected + void sse_encode_i_64(int self, SseSerializer serializer); + + @protected + void sse_encode_input_type(InputType self, SseSerializer serializer); + + @protected + void sse_encode_invoice_paid_details(InvoicePaidDetails self, SseSerializer serializer); + + @protected + void sse_encode_list_String(List self, SseSerializer serializer); + + @protected + void sse_encode_list_fiat_currency(List self, SseSerializer serializer); + + @protected + void sse_encode_list_locale_overrides(List self, SseSerializer serializer); + + @protected + void sse_encode_list_localized_name(List self, SseSerializer serializer); + + @protected + void sse_encode_list_lsp_information(List self, SseSerializer serializer); + + @protected + void sse_encode_list_metadata_filter(List self, SseSerializer serializer); + + @protected + void sse_encode_list_opening_fee_params(List self, SseSerializer serializer); + + @protected + void sse_encode_list_payment(List self, SseSerializer serializer); + + @protected + void sse_encode_list_payment_type_filter(List self, SseSerializer serializer); + + @protected + void sse_encode_list_payments_request(ListPaymentsRequest self, SseSerializer serializer); + + @protected + void sse_encode_list_prim_u_8_strict(Uint8List self, SseSerializer serializer); + + @protected + void sse_encode_list_rate(List self, SseSerializer serializer); + + @protected + void sse_encode_list_reverse_swap_info(List self, SseSerializer serializer); + + @protected + void sse_encode_list_route_hint(List self, SseSerializer serializer); + + @protected + void sse_encode_list_route_hint_hop(List self, SseSerializer serializer); + + @protected + void sse_encode_list_swap_info(List self, SseSerializer serializer); + + @protected + void sse_encode_list_tlv_entry(List self, SseSerializer serializer); + + @protected + void sse_encode_list_unspent_transaction_output( + List self, SseSerializer serializer); + + @protected + void sse_encode_ln_invoice(LNInvoice self, SseSerializer serializer); + + @protected + void sse_encode_ln_payment_details(LnPaymentDetails self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_auth_request_data(LnUrlAuthRequestData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_callback_status(LnUrlCallbackStatus self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_error_data(LnUrlErrorData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_pay_request_data(LnUrlPayRequestData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_pay_result(LnUrlPayResult self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_withdraw_request_data(LnUrlWithdrawRequestData self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_withdraw_result(LnUrlWithdrawResult self, SseSerializer serializer); + + @protected + void sse_encode_ln_url_withdraw_success_data(LnUrlWithdrawSuccessData self, SseSerializer serializer); + + @protected + void sse_encode_locale_overrides(LocaleOverrides self, SseSerializer serializer); + + @protected + void sse_encode_localized_name(LocalizedName self, SseSerializer serializer); + + @protected + void sse_encode_log_entry(LogEntry self, SseSerializer serializer); + + @protected + void sse_encode_lsp_information(LspInformation self, SseSerializer serializer); + + @protected + void sse_encode_max_reverse_swap_amount_response( + MaxReverseSwapAmountResponse self, SseSerializer serializer); + + @protected + void sse_encode_message_success_action_data(MessageSuccessActionData self, SseSerializer serializer); + + @protected + void sse_encode_metadata_filter(MetadataFilter self, SseSerializer serializer); + + @protected + void sse_encode_network(Network self, SseSerializer serializer); + + @protected + void sse_encode_node_config(NodeConfig self, SseSerializer serializer); + + @protected + void sse_encode_node_credentials(NodeCredentials self, SseSerializer serializer); + + @protected + void sse_encode_node_state(NodeState self, SseSerializer serializer); + + @protected + void sse_encode_onchain_payment_limits_response( + OnchainPaymentLimitsResponse self, SseSerializer serializer); + + @protected + void sse_encode_open_channel_fee_request(OpenChannelFeeRequest self, SseSerializer serializer); + + @protected + void sse_encode_open_channel_fee_response(OpenChannelFeeResponse self, SseSerializer serializer); + + @protected + void sse_encode_opening_fee_params(OpeningFeeParams self, SseSerializer serializer); + + @protected + void sse_encode_opening_fee_params_menu(OpeningFeeParamsMenu self, SseSerializer serializer); + + @protected + void sse_encode_opt_String(String? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_bool(bool? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_greenlight_credentials( + GreenlightCredentials? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_ln_invoice(LNInvoice? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_lsp_information(LspInformation? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_node_credentials(NodeCredentials? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_opening_fee_params(OpeningFeeParams? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_payment(Payment? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_reverse_swap_info(ReverseSwapInfo? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_success_action_processed( + SuccessActionProcessed? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_swap_info(SwapInfo? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_symbol(Symbol? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_u_32(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_box_autoadd_u_64(int? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_String(List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_locale_overrides(List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_localized_name(List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_metadata_filter(List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_payment_type_filter(List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_prim_u_8_strict(Uint8List? self, SseSerializer serializer); + + @protected + void sse_encode_opt_list_tlv_entry(List? self, SseSerializer serializer); + + @protected + void sse_encode_pay_onchain_request(PayOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_pay_onchain_response(PayOnchainResponse self, SseSerializer serializer); + + @protected + void sse_encode_payment(Payment self, SseSerializer serializer); + + @protected + void sse_encode_payment_details(PaymentDetails self, SseSerializer serializer); + + @protected + void sse_encode_payment_failed_data(PaymentFailedData self, SseSerializer serializer); + + @protected + void sse_encode_payment_status(PaymentStatus self, SseSerializer serializer); + + @protected + void sse_encode_payment_type(PaymentType self, SseSerializer serializer); + + @protected + void sse_encode_payment_type_filter(PaymentTypeFilter self, SseSerializer serializer); + + @protected + void sse_encode_prepare_onchain_payment_request( + PrepareOnchainPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_prepare_onchain_payment_response( + PrepareOnchainPaymentResponse self, SseSerializer serializer); + + @protected + void sse_encode_prepare_redeem_onchain_funds_request( + PrepareRedeemOnchainFundsRequest self, SseSerializer serializer); + + @protected + void sse_encode_prepare_redeem_onchain_funds_response( + PrepareRedeemOnchainFundsResponse self, SseSerializer serializer); + + @protected + void sse_encode_prepare_refund_request(PrepareRefundRequest self, SseSerializer serializer); + + @protected + void sse_encode_prepare_refund_response(PrepareRefundResponse self, SseSerializer serializer); + + @protected + void sse_encode_rate(Rate self, SseSerializer serializer); + + @protected + void sse_encode_receive_onchain_request(ReceiveOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_receive_payment_request(ReceivePaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_receive_payment_response(ReceivePaymentResponse self, SseSerializer serializer); + + @protected + void sse_encode_recommended_fees(RecommendedFees self, SseSerializer serializer); + + @protected + void sse_encode_redeem_onchain_funds_request(RedeemOnchainFundsRequest self, SseSerializer serializer); + + @protected + void sse_encode_redeem_onchain_funds_response(RedeemOnchainFundsResponse self, SseSerializer serializer); + + @protected + void sse_encode_refund_request(RefundRequest self, SseSerializer serializer); + + @protected + void sse_encode_refund_response(RefundResponse self, SseSerializer serializer); + + @protected + void sse_encode_report_issue_request(ReportIssueRequest self, SseSerializer serializer); + + @protected + void sse_encode_report_payment_failure_details(ReportPaymentFailureDetails self, SseSerializer serializer); + + @protected + void sse_encode_reverse_swap_fees_request(ReverseSwapFeesRequest self, SseSerializer serializer); + + @protected + void sse_encode_reverse_swap_info(ReverseSwapInfo self, SseSerializer serializer); + + @protected + void sse_encode_reverse_swap_pair_info(ReverseSwapPairInfo self, SseSerializer serializer); + + @protected + void sse_encode_reverse_swap_status(ReverseSwapStatus self, SseSerializer serializer); + + @protected + void sse_encode_route_hint(RouteHint self, SseSerializer serializer); + + @protected + void sse_encode_route_hint_hop(RouteHintHop self, SseSerializer serializer); + + @protected + void sse_encode_send_onchain_request(SendOnchainRequest self, SseSerializer serializer); + + @protected + void sse_encode_send_onchain_response(SendOnchainResponse self, SseSerializer serializer); + + @protected + void sse_encode_send_payment_request(SendPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_send_payment_response(SendPaymentResponse self, SseSerializer serializer); + + @protected + void sse_encode_send_spontaneous_payment_request( + SendSpontaneousPaymentRequest self, SseSerializer serializer); + + @protected + void sse_encode_service_health_check_response(ServiceHealthCheckResponse self, SseSerializer serializer); + + @protected + void sse_encode_sign_message_request(SignMessageRequest self, SseSerializer serializer); + + @protected + void sse_encode_sign_message_response(SignMessageResponse self, SseSerializer serializer); + + @protected + void sse_encode_static_backup_request(StaticBackupRequest self, SseSerializer serializer); + + @protected + void sse_encode_static_backup_response(StaticBackupResponse self, SseSerializer serializer); + + @protected + void sse_encode_success_action_processed(SuccessActionProcessed self, SseSerializer serializer); + + @protected + void sse_encode_swap_amount_type(SwapAmountType self, SseSerializer serializer); + + @protected + void sse_encode_swap_info(SwapInfo self, SseSerializer serializer); + + @protected + void sse_encode_swap_status(SwapStatus self, SseSerializer serializer); + + @protected + void sse_encode_symbol(Symbol self, SseSerializer serializer); + + @protected + void sse_encode_tlv_entry(TlvEntry self, SseSerializer serializer); + + @protected + void sse_encode_u_16(int self, SseSerializer serializer); + + @protected + void sse_encode_u_32(int self, SseSerializer serializer); + + @protected + void sse_encode_u_64(int self, SseSerializer serializer); + + @protected + void sse_encode_u_8(int self, SseSerializer serializer); + + @protected + void sse_encode_unit(void self, SseSerializer serializer); + + @protected + void sse_encode_unspent_transaction_output(UnspentTransactionOutput self, SseSerializer serializer); + + @protected + void sse_encode_url_success_action_data(UrlSuccessActionData self, SseSerializer serializer); +} + +// Section: wire_class + +// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint + +/// generated by flutter_rust_bridge +class BreezSdkBindingsWire implements BaseWire { + factory BreezSdkBindingsWire.fromExternalLibrary(ExternalLibrary lib) => + BreezSdkBindingsWire(lib.ffiDynamicLibrary); + + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + BreezSdkBindingsWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + BreezSdkBindingsWire.fromLookup(ffi.Pointer Function(String symbolName) lookup) + : _lookup = lookup; + + void store_dart_post_cobject( + DartPostCObjectFnType ptr, + ) { + return _store_dart_post_cobject( + ptr, + ); + } + + late final _store_dart_post_cobjectPtr = + _lookup>('store_dart_post_cobject'); + late final _store_dart_post_cobject = + _store_dart_post_cobjectPtr.asFunction(); + + void wire_backup( + int port_, + ) { + return _wire_backup( + port_, + ); + } + + late final _wire_backupPtr = + _lookup>('frbgen_breez_sdk_wire_backup'); + late final _wire_backup = _wire_backupPtr.asFunction(); + + void wire_backup_status( + int port_, + ) { + return _wire_backup_status( + port_, + ); + } + + late final _wire_backup_statusPtr = + _lookup>('frbgen_breez_sdk_wire_backup_status'); + late final _wire_backup_status = _wire_backup_statusPtr.asFunction(); + + void wire_breez_events_stream( + int port_, + ffi.Pointer s, + ) { + return _wire_breez_events_stream( + port_, + s, + ); + } + + late final _wire_breez_events_streamPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_breez_events_stream'); + late final _wire_breez_events_stream = _wire_breez_events_streamPtr + .asFunction)>(); + + void wire_breez_log_stream( + int port_, + ffi.Pointer s, + ) { + return _wire_breez_log_stream( + port_, + s, + ); + } + + late final _wire_breez_log_streamPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_breez_log_stream'); + late final _wire_breez_log_stream = + _wire_breez_log_streamPtr.asFunction)>(); + + void wire_buy_bitcoin( + int port_, + ffi.Pointer req, + ) { + return _wire_buy_bitcoin( + port_, + req, + ); + } + + late final _wire_buy_bitcoinPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_buy_bitcoin'); + late final _wire_buy_bitcoin = + _wire_buy_bitcoinPtr.asFunction)>(); + + void wire_check_message( + int port_, + ffi.Pointer req, + ) { + return _wire_check_message( + port_, + req, + ); + } + + late final _wire_check_messagePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_check_message'); + late final _wire_check_message = + _wire_check_messagePtr.asFunction)>(); + + void wire_close_lsp_channels( + int port_, + ) { + return _wire_close_lsp_channels( + port_, + ); + } + + late final _wire_close_lsp_channelsPtr = + _lookup>('frbgen_breez_sdk_wire_close_lsp_channels'); + late final _wire_close_lsp_channels = _wire_close_lsp_channelsPtr.asFunction(); + + void wire_configure_node( + int port_, + ffi.Pointer req, + ) { + return _wire_configure_node( + port_, + req, + ); + } + + late final _wire_configure_nodePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_configure_node'); + late final _wire_configure_node = + _wire_configure_nodePtr.asFunction)>(); + + void wire_connect( + int port_, + ffi.Pointer req, + ) { + return _wire_connect( + port_, + req, + ); + } + + late final _wire_connectPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_connect'); + late final _wire_connect = + _wire_connectPtr.asFunction)>(); + + void wire_connect_lsp( + int port_, + ffi.Pointer lsp_id, + ) { + return _wire_connect_lsp( + port_, + lsp_id, + ); + } + + late final _wire_connect_lspPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_connect_lsp'); + late final _wire_connect_lsp = + _wire_connect_lspPtr.asFunction)>(); + + void wire_default_config( + int port_, + int env_type, + ffi.Pointer api_key, + ffi.Pointer node_config, + ) { + return _wire_default_config( + port_, + env_type, + api_key, + node_config, + ); + } + + late final _wire_default_configPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, + ffi.Pointer)>>('frbgen_breez_sdk_wire_default_config'); + late final _wire_default_config = _wire_default_configPtr.asFunction< + void Function( + int, int, ffi.Pointer, ffi.Pointer)>(); + + void wire_disconnect( + int port_, + ) { + return _wire_disconnect( + port_, + ); + } + + late final _wire_disconnectPtr = + _lookup>('frbgen_breez_sdk_wire_disconnect'); + late final _wire_disconnect = _wire_disconnectPtr.asFunction(); + + void wire_execute_command( + int port_, + ffi.Pointer command, + ) { + return _wire_execute_command( + port_, + command, + ); + } + + late final _wire_execute_commandPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_execute_command'); + late final _wire_execute_command = + _wire_execute_commandPtr.asFunction)>(); + + void wire_fetch_fiat_rates( + int port_, + ) { + return _wire_fetch_fiat_rates( + port_, + ); + } + + late final _wire_fetch_fiat_ratesPtr = + _lookup>('frbgen_breez_sdk_wire_fetch_fiat_rates'); + late final _wire_fetch_fiat_rates = _wire_fetch_fiat_ratesPtr.asFunction(); + + void wire_fetch_lsp_info( + int port_, + ffi.Pointer id, + ) { + return _wire_fetch_lsp_info( + port_, + id, + ); + } + + late final _wire_fetch_lsp_infoPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_fetch_lsp_info'); + late final _wire_fetch_lsp_info = + _wire_fetch_lsp_infoPtr.asFunction)>(); + + void wire_fetch_reverse_swap_fees( + int port_, + ffi.Pointer req, + ) { + return _wire_fetch_reverse_swap_fees( + port_, + req, + ); + } + + late final _wire_fetch_reverse_swap_feesPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_fetch_reverse_swap_fees'); + late final _wire_fetch_reverse_swap_fees = _wire_fetch_reverse_swap_feesPtr + .asFunction)>(); + + void wire_generate_diagnostic_data( + int port_, + ) { + return _wire_generate_diagnostic_data( + port_, + ); + } + + late final _wire_generate_diagnostic_dataPtr = _lookup>( + 'frbgen_breez_sdk_wire_generate_diagnostic_data'); + late final _wire_generate_diagnostic_data = + _wire_generate_diagnostic_dataPtr.asFunction(); + + void wire_in_progress_onchain_payments( + int port_, + ) { + return _wire_in_progress_onchain_payments( + port_, + ); + } + + late final _wire_in_progress_onchain_paymentsPtr = + _lookup>( + 'frbgen_breez_sdk_wire_in_progress_onchain_payments'); + late final _wire_in_progress_onchain_payments = + _wire_in_progress_onchain_paymentsPtr.asFunction(); + + void wire_in_progress_reverse_swaps( + int port_, + ) { + return _wire_in_progress_reverse_swaps( + port_, + ); + } + + late final _wire_in_progress_reverse_swapsPtr = _lookup>( + 'frbgen_breez_sdk_wire_in_progress_reverse_swaps'); + late final _wire_in_progress_reverse_swaps = + _wire_in_progress_reverse_swapsPtr.asFunction(); + + void wire_in_progress_swap( + int port_, + ) { + return _wire_in_progress_swap( + port_, + ); + } + + late final _wire_in_progress_swapPtr = + _lookup>('frbgen_breez_sdk_wire_in_progress_swap'); + late final _wire_in_progress_swap = _wire_in_progress_swapPtr.asFunction(); + + void wire_is_initialized( + int port_, + ) { + return _wire_is_initialized( + port_, + ); + } + + late final _wire_is_initializedPtr = + _lookup>('frbgen_breez_sdk_wire_is_initialized'); + late final _wire_is_initialized = _wire_is_initializedPtr.asFunction(); + + void wire_list_fiat_currencies( + int port_, + ) { + return _wire_list_fiat_currencies( + port_, + ); + } + + late final _wire_list_fiat_currenciesPtr = + _lookup>('frbgen_breez_sdk_wire_list_fiat_currencies'); + late final _wire_list_fiat_currencies = _wire_list_fiat_currenciesPtr.asFunction(); + + void wire_list_lsps( + int port_, + ) { + return _wire_list_lsps( + port_, + ); + } + + late final _wire_list_lspsPtr = + _lookup>('frbgen_breez_sdk_wire_list_lsps'); + late final _wire_list_lsps = _wire_list_lspsPtr.asFunction(); + + void wire_list_payments( + int port_, + ffi.Pointer req, + ) { + return _wire_list_payments( + port_, + req, + ); + } + + late final _wire_list_paymentsPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_list_payments'); + late final _wire_list_payments = + _wire_list_paymentsPtr.asFunction)>(); + + void wire_list_refundables( + int port_, + ) { + return _wire_list_refundables( + port_, + ); + } + + late final _wire_list_refundablesPtr = + _lookup>('frbgen_breez_sdk_wire_list_refundables'); + late final _wire_list_refundables = _wire_list_refundablesPtr.asFunction(); + + void wire_lnurl_auth( + int port_, + ffi.Pointer req_data, + ) { + return _wire_lnurl_auth( + port_, + req_data, + ); + } + + late final _wire_lnurl_authPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_lnurl_auth'); + late final _wire_lnurl_auth = + _wire_lnurl_authPtr.asFunction)>(); + + void wire_lnurl_pay( + int port_, + ffi.Pointer req, + ) { + return _wire_lnurl_pay( + port_, + req, + ); + } + + late final _wire_lnurl_payPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_lnurl_pay'); + late final _wire_lnurl_pay = + _wire_lnurl_payPtr.asFunction)>(); + + void wire_lnurl_withdraw( + int port_, + ffi.Pointer req, + ) { + return _wire_lnurl_withdraw( + port_, + req, + ); + } + + late final _wire_lnurl_withdrawPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_lnurl_withdraw'); + late final _wire_lnurl_withdraw = + _wire_lnurl_withdrawPtr.asFunction)>(); + + void wire_lsp_id( + int port_, + ) { + return _wire_lsp_id( + port_, + ); + } + + late final _wire_lsp_idPtr = + _lookup>('frbgen_breez_sdk_wire_lsp_id'); + late final _wire_lsp_id = _wire_lsp_idPtr.asFunction(); + + void wire_lsp_info( + int port_, + ) { + return _wire_lsp_info( + port_, + ); + } + + late final _wire_lsp_infoPtr = + _lookup>('frbgen_breez_sdk_wire_lsp_info'); + late final _wire_lsp_info = _wire_lsp_infoPtr.asFunction(); + + void wire_max_reverse_swap_amount( + int port_, + ) { + return _wire_max_reverse_swap_amount( + port_, + ); + } + + late final _wire_max_reverse_swap_amountPtr = _lookup>( + 'frbgen_breez_sdk_wire_max_reverse_swap_amount'); + late final _wire_max_reverse_swap_amount = + _wire_max_reverse_swap_amountPtr.asFunction(); + + void wire_mnemonic_to_seed( + int port_, + ffi.Pointer phrase, + ) { + return _wire_mnemonic_to_seed( + port_, + phrase, + ); + } + + late final _wire_mnemonic_to_seedPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_mnemonic_to_seed'); + late final _wire_mnemonic_to_seed = + _wire_mnemonic_to_seedPtr.asFunction)>(); + + void wire_node_credentials( + int port_, + ) { + return _wire_node_credentials( + port_, + ); + } + + late final _wire_node_credentialsPtr = + _lookup>('frbgen_breez_sdk_wire_node_credentials'); + late final _wire_node_credentials = _wire_node_credentialsPtr.asFunction(); + + void wire_node_info( + int port_, + ) { + return _wire_node_info( + port_, + ); + } + + late final _wire_node_infoPtr = + _lookup>('frbgen_breez_sdk_wire_node_info'); + late final _wire_node_info = _wire_node_infoPtr.asFunction(); + + void wire_onchain_payment_limits( + int port_, + ) { + return _wire_onchain_payment_limits( + port_, + ); + } + + late final _wire_onchain_payment_limitsPtr = _lookup>( + 'frbgen_breez_sdk_wire_onchain_payment_limits'); + late final _wire_onchain_payment_limits = _wire_onchain_payment_limitsPtr.asFunction(); + + void wire_open_channel_fee( + int port_, + ffi.Pointer req, + ) { + return _wire_open_channel_fee( + port_, + req, + ); + } + + late final _wire_open_channel_feePtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_open_channel_fee'); + late final _wire_open_channel_fee = _wire_open_channel_feePtr + .asFunction)>(); + + void wire_parse_input( + int port_, + ffi.Pointer input, + ) { + return _wire_parse_input( + port_, + input, + ); + } + + late final _wire_parse_inputPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_parse_input'); + late final _wire_parse_input = + _wire_parse_inputPtr.asFunction)>(); + + void wire_parse_invoice( + int port_, + ffi.Pointer invoice, + ) { + return _wire_parse_invoice( + port_, + invoice, + ); + } + + late final _wire_parse_invoicePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_parse_invoice'); + late final _wire_parse_invoice = + _wire_parse_invoicePtr.asFunction)>(); + + void wire_pay_onchain( + int port_, + ffi.Pointer req, + ) { + return _wire_pay_onchain( + port_, + req, + ); + } + + late final _wire_pay_onchainPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_pay_onchain'); + late final _wire_pay_onchain = + _wire_pay_onchainPtr.asFunction)>(); + + void wire_payment_by_hash( + int port_, + ffi.Pointer hash, + ) { + return _wire_payment_by_hash( + port_, + hash, + ); + } + + late final _wire_payment_by_hashPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_payment_by_hash'); + late final _wire_payment_by_hash = + _wire_payment_by_hashPtr.asFunction)>(); + + void wire_prepare_onchain_payment( + int port_, + ffi.Pointer req, + ) { + return _wire_prepare_onchain_payment( + port_, + req, + ); + } + + late final _wire_prepare_onchain_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire_prepare_onchain_payment'); + late final _wire_prepare_onchain_payment = _wire_prepare_onchain_paymentPtr + .asFunction)>(); + + void wire_prepare_redeem_onchain_funds( + int port_, + ffi.Pointer req, + ) { + return _wire_prepare_redeem_onchain_funds( + port_, + req, + ); + } + + late final _wire_prepare_redeem_onchain_fundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire_prepare_redeem_onchain_funds'); + late final _wire_prepare_redeem_onchain_funds = _wire_prepare_redeem_onchain_fundsPtr + .asFunction)>(); + + void wire_prepare_refund( + int port_, + ffi.Pointer req, + ) { + return _wire_prepare_refund( + port_, + req, + ); + } + + late final _wire_prepare_refundPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_prepare_refund'); + late final _wire_prepare_refund = + _wire_prepare_refundPtr.asFunction)>(); + + void wire_receive_onchain( + int port_, + ffi.Pointer req, + ) { + return _wire_receive_onchain( + port_, + req, + ); + } + + late final _wire_receive_onchainPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_receive_onchain'); + late final _wire_receive_onchain = _wire_receive_onchainPtr + .asFunction)>(); + + void wire_receive_payment( + int port_, + ffi.Pointer req, + ) { + return _wire_receive_payment( + port_, + req, + ); + } + + late final _wire_receive_paymentPtr = _lookup< + ffi.NativeFunction)>>( + 'frbgen_breez_sdk_wire_receive_payment'); + late final _wire_receive_payment = _wire_receive_paymentPtr + .asFunction)>(); + + void wire_recommended_fees( + int port_, + ) { + return _wire_recommended_fees( + port_, + ); + } + + late final _wire_recommended_feesPtr = + _lookup>('frbgen_breez_sdk_wire_recommended_fees'); + late final _wire_recommended_fees = _wire_recommended_feesPtr.asFunction(); + + void wire_redeem_onchain_funds( + int port_, + ffi.Pointer req, + ) { + return _wire_redeem_onchain_funds( + port_, + req, + ); + } + + late final _wire_redeem_onchain_fundsPtr = _lookup< + ffi + .NativeFunction)>>( + 'frbgen_breez_sdk_wire_redeem_onchain_funds'); + late final _wire_redeem_onchain_funds = _wire_redeem_onchain_fundsPtr + .asFunction)>(); + + void wire_redeem_swap( + int port_, + ffi.Pointer swap_address, + ) { + return _wire_redeem_swap( + port_, + swap_address, + ); + } + + late final _wire_redeem_swapPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_redeem_swap'); + late final _wire_redeem_swap = + _wire_redeem_swapPtr.asFunction)>(); + + void wire_refund( + int port_, + ffi.Pointer req, + ) { + return _wire_refund( + port_, + req, + ); + } + + late final _wire_refundPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_refund'); + late final _wire_refund = + _wire_refundPtr.asFunction)>(); + + void wire_register_webhook( + int port_, + ffi.Pointer webhook_url, + ) { + return _wire_register_webhook( + port_, + webhook_url, + ); + } + + late final _wire_register_webhookPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_register_webhook'); + late final _wire_register_webhook = + _wire_register_webhookPtr.asFunction)>(); + + void wire_report_issue( + int port_, + ffi.Pointer req, + ) { + return _wire_report_issue( + port_, + req, + ); + } + + late final _wire_report_issuePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_report_issue'); + late final _wire_report_issue = + _wire_report_issuePtr.asFunction)>(); + + void wire_rescan_swaps( + int port_, + ) { + return _wire_rescan_swaps( + port_, + ); + } + + late final _wire_rescan_swapsPtr = + _lookup>('frbgen_breez_sdk_wire_rescan_swaps'); + late final _wire_rescan_swaps = _wire_rescan_swapsPtr.asFunction(); + + void wire_send_onchain( + int port_, + ffi.Pointer req, + ) { + return _wire_send_onchain( + port_, + req, + ); + } + + late final _wire_send_onchainPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_send_onchain'); + late final _wire_send_onchain = + _wire_send_onchainPtr.asFunction)>(); + + void wire_send_payment( + int port_, + ffi.Pointer req, + ) { + return _wire_send_payment( + port_, + req, + ); + } + + late final _wire_send_paymentPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_send_payment'); + late final _wire_send_payment = + _wire_send_paymentPtr.asFunction)>(); + + void wire_send_spontaneous_payment( + int port_, + ffi.Pointer req, + ) { + return _wire_send_spontaneous_payment( + port_, + req, + ); + } + + late final _wire_send_spontaneous_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire_send_spontaneous_payment'); + late final _wire_send_spontaneous_payment = _wire_send_spontaneous_paymentPtr + .asFunction)>(); + + void wire_service_health_check( + int port_, + ffi.Pointer api_key, + ) { + return _wire_service_health_check( + port_, + api_key, + ); + } + + late final _wire_service_health_checkPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_service_health_check'); + late final _wire_service_health_check = _wire_service_health_checkPtr + .asFunction)>(); + + void wire_set_payment_metadata( + int port_, + ffi.Pointer hash, + ffi.Pointer metadata, + ) { + return _wire_set_payment_metadata( + port_, + hash, + metadata, + ); + } + + late final _wire_set_payment_metadataPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>('frbgen_breez_sdk_wire_set_payment_metadata'); + late final _wire_set_payment_metadata = _wire_set_payment_metadataPtr.asFunction< + void Function( + int, ffi.Pointer, ffi.Pointer)>(); + + void wire_sign_message( + int port_, + ffi.Pointer req, + ) { + return _wire_sign_message( + port_, + req, + ); + } + + late final _wire_sign_messagePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_sign_message'); + late final _wire_sign_message = + _wire_sign_messagePtr.asFunction)>(); + + void wire_static_backup( + int port_, + ffi.Pointer req, + ) { + return _wire_static_backup( + port_, + req, + ); + } + + late final _wire_static_backupPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_static_backup'); + late final _wire_static_backup = + _wire_static_backupPtr.asFunction)>(); + + void wire_sync( + int port_, + ) { + return _wire_sync( + port_, + ); + } + + late final _wire_syncPtr = + _lookup>('frbgen_breez_sdk_wire_sync'); + late final _wire_sync = _wire_syncPtr.asFunction(); + + ffi.Pointer + cst_new_box_autoadd_aes_success_action_data_decrypted() { + return _cst_new_box_autoadd_aes_success_action_data_decrypted(); + } + + late final _cst_new_box_autoadd_aes_success_action_data_decryptedPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted'); + late final _cst_new_box_autoadd_aes_success_action_data_decrypted = + _cst_new_box_autoadd_aes_success_action_data_decryptedPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_aes_success_action_data_result() { + return _cst_new_box_autoadd_aes_success_action_data_result(); + } + + late final _cst_new_box_autoadd_aes_success_action_data_resultPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result'); + late final _cst_new_box_autoadd_aes_success_action_data_result = + _cst_new_box_autoadd_aes_success_action_data_resultPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_backup_failed_data() { + return _cst_new_box_autoadd_backup_failed_data(); + } + + late final _cst_new_box_autoadd_backup_failed_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data'); + late final _cst_new_box_autoadd_backup_failed_data = _cst_new_box_autoadd_backup_failed_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bitcoin_address_data() { + return _cst_new_box_autoadd_bitcoin_address_data(); + } + + late final _cst_new_box_autoadd_bitcoin_address_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data'); + late final _cst_new_box_autoadd_bitcoin_address_data = _cst_new_box_autoadd_bitcoin_address_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_bool( + bool value, + ) { + return _cst_new_box_autoadd_bool( + value, + ); + } + + late final _cst_new_box_autoadd_boolPtr = + _lookup Function(ffi.Bool)>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_bool'); + late final _cst_new_box_autoadd_bool = + _cst_new_box_autoadd_boolPtr.asFunction Function(bool)>(); + + ffi.Pointer cst_new_box_autoadd_buy_bitcoin_request() { + return _cst_new_box_autoadd_buy_bitcoin_request(); + } + + late final _cst_new_box_autoadd_buy_bitcoin_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request'); + late final _cst_new_box_autoadd_buy_bitcoin_request = _cst_new_box_autoadd_buy_bitcoin_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_check_message_request() { + return _cst_new_box_autoadd_check_message_request(); + } + + late final _cst_new_box_autoadd_check_message_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_check_message_request'); + late final _cst_new_box_autoadd_check_message_request = _cst_new_box_autoadd_check_message_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_closed_channel_payment_details() { + return _cst_new_box_autoadd_closed_channel_payment_details(); + } + + late final _cst_new_box_autoadd_closed_channel_payment_detailsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details'); + late final _cst_new_box_autoadd_closed_channel_payment_details = + _cst_new_box_autoadd_closed_channel_payment_detailsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_configure_node_request() { + return _cst_new_box_autoadd_configure_node_request(); + } + + late final _cst_new_box_autoadd_configure_node_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request'); + late final _cst_new_box_autoadd_configure_node_request = _cst_new_box_autoadd_configure_node_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_connect_request() { + return _cst_new_box_autoadd_connect_request(); + } + + late final _cst_new_box_autoadd_connect_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_connect_request'); + late final _cst_new_box_autoadd_connect_request = + _cst_new_box_autoadd_connect_requestPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_greenlight_credentials() { + return _cst_new_box_autoadd_greenlight_credentials(); + } + + late final _cst_new_box_autoadd_greenlight_credentialsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials'); + late final _cst_new_box_autoadd_greenlight_credentials = _cst_new_box_autoadd_greenlight_credentialsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_greenlight_node_config() { + return _cst_new_box_autoadd_greenlight_node_config(); + } + + late final _cst_new_box_autoadd_greenlight_node_configPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config'); + late final _cst_new_box_autoadd_greenlight_node_config = _cst_new_box_autoadd_greenlight_node_configPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_i_64( + int value, + ) { + return _cst_new_box_autoadd_i_64( + value, + ); + } + + late final _cst_new_box_autoadd_i_64Ptr = + _lookup Function(ffi.Int64)>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_i_64'); + late final _cst_new_box_autoadd_i_64 = + _cst_new_box_autoadd_i_64Ptr.asFunction Function(int)>(); + + ffi.Pointer cst_new_box_autoadd_invoice_paid_details() { + return _cst_new_box_autoadd_invoice_paid_details(); + } + + late final _cst_new_box_autoadd_invoice_paid_detailsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details'); + late final _cst_new_box_autoadd_invoice_paid_details = _cst_new_box_autoadd_invoice_paid_detailsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_list_payments_request() { + return _cst_new_box_autoadd_list_payments_request(); + } + + late final _cst_new_box_autoadd_list_payments_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request'); + late final _cst_new_box_autoadd_list_payments_request = _cst_new_box_autoadd_list_payments_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_invoice() { + return _cst_new_box_autoadd_ln_invoice(); + } + + late final _cst_new_box_autoadd_ln_invoicePtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice'); + late final _cst_new_box_autoadd_ln_invoice = + _cst_new_box_autoadd_ln_invoicePtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_payment_details() { + return _cst_new_box_autoadd_ln_payment_details(); + } + + late final _cst_new_box_autoadd_ln_payment_detailsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details'); + late final _cst_new_box_autoadd_ln_payment_details = _cst_new_box_autoadd_ln_payment_detailsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_auth_request_data() { + return _cst_new_box_autoadd_ln_url_auth_request_data(); + } + + late final _cst_new_box_autoadd_ln_url_auth_request_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data'); + late final _cst_new_box_autoadd_ln_url_auth_request_data = _cst_new_box_autoadd_ln_url_auth_request_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_error_data() { + return _cst_new_box_autoadd_ln_url_error_data(); + } + + late final _cst_new_box_autoadd_ln_url_error_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data'); + late final _cst_new_box_autoadd_ln_url_error_data = _cst_new_box_autoadd_ln_url_error_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_pay_error_data() { + return _cst_new_box_autoadd_ln_url_pay_error_data(); + } + + late final _cst_new_box_autoadd_ln_url_pay_error_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data'); + late final _cst_new_box_autoadd_ln_url_pay_error_data = _cst_new_box_autoadd_ln_url_pay_error_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_pay_request() { + return _cst_new_box_autoadd_ln_url_pay_request(); + } + + late final _cst_new_box_autoadd_ln_url_pay_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request'); + late final _cst_new_box_autoadd_ln_url_pay_request = _cst_new_box_autoadd_ln_url_pay_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_pay_request_data() { + return _cst_new_box_autoadd_ln_url_pay_request_data(); + } + + late final _cst_new_box_autoadd_ln_url_pay_request_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data'); + late final _cst_new_box_autoadd_ln_url_pay_request_data = _cst_new_box_autoadd_ln_url_pay_request_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_pay_success_data() { + return _cst_new_box_autoadd_ln_url_pay_success_data(); + } + + late final _cst_new_box_autoadd_ln_url_pay_success_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data'); + late final _cst_new_box_autoadd_ln_url_pay_success_data = _cst_new_box_autoadd_ln_url_pay_success_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_withdraw_request() { + return _cst_new_box_autoadd_ln_url_withdraw_request(); + } + + late final _cst_new_box_autoadd_ln_url_withdraw_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request'); + late final _cst_new_box_autoadd_ln_url_withdraw_request = _cst_new_box_autoadd_ln_url_withdraw_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_withdraw_request_data() { + return _cst_new_box_autoadd_ln_url_withdraw_request_data(); + } + + late final _cst_new_box_autoadd_ln_url_withdraw_request_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data'); + late final _cst_new_box_autoadd_ln_url_withdraw_request_data = + _cst_new_box_autoadd_ln_url_withdraw_request_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_ln_url_withdraw_success_data() { + return _cst_new_box_autoadd_ln_url_withdraw_success_data(); + } + + late final _cst_new_box_autoadd_ln_url_withdraw_success_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data'); + late final _cst_new_box_autoadd_ln_url_withdraw_success_data = + _cst_new_box_autoadd_ln_url_withdraw_success_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_lsp_information() { + return _cst_new_box_autoadd_lsp_information(); + } + + late final _cst_new_box_autoadd_lsp_informationPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_lsp_information'); + late final _cst_new_box_autoadd_lsp_information = + _cst_new_box_autoadd_lsp_informationPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_message_success_action_data() { + return _cst_new_box_autoadd_message_success_action_data(); + } + + late final _cst_new_box_autoadd_message_success_action_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data'); + late final _cst_new_box_autoadd_message_success_action_data = + _cst_new_box_autoadd_message_success_action_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_node_config() { + return _cst_new_box_autoadd_node_config(); + } + + late final _cst_new_box_autoadd_node_configPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_node_config'); + late final _cst_new_box_autoadd_node_config = + _cst_new_box_autoadd_node_configPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_node_credentials() { + return _cst_new_box_autoadd_node_credentials(); + } + + late final _cst_new_box_autoadd_node_credentialsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_node_credentials'); + late final _cst_new_box_autoadd_node_credentials = _cst_new_box_autoadd_node_credentialsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_open_channel_fee_request() { + return _cst_new_box_autoadd_open_channel_fee_request(); + } + + late final _cst_new_box_autoadd_open_channel_fee_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request'); + late final _cst_new_box_autoadd_open_channel_fee_request = _cst_new_box_autoadd_open_channel_fee_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_opening_fee_params() { + return _cst_new_box_autoadd_opening_fee_params(); + } + + late final _cst_new_box_autoadd_opening_fee_paramsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params'); + late final _cst_new_box_autoadd_opening_fee_params = _cst_new_box_autoadd_opening_fee_paramsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_pay_onchain_request() { + return _cst_new_box_autoadd_pay_onchain_request(); + } + + late final _cst_new_box_autoadd_pay_onchain_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request'); + late final _cst_new_box_autoadd_pay_onchain_request = _cst_new_box_autoadd_pay_onchain_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_payment() { + return _cst_new_box_autoadd_payment(); + } + + late final _cst_new_box_autoadd_paymentPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_payment'); + late final _cst_new_box_autoadd_payment = + _cst_new_box_autoadd_paymentPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_payment_failed_data() { + return _cst_new_box_autoadd_payment_failed_data(); + } + + late final _cst_new_box_autoadd_payment_failed_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data'); + late final _cst_new_box_autoadd_payment_failed_data = _cst_new_box_autoadd_payment_failed_dataPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_prepare_onchain_payment_request() { + return _cst_new_box_autoadd_prepare_onchain_payment_request(); + } + + late final _cst_new_box_autoadd_prepare_onchain_payment_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request'); + late final _cst_new_box_autoadd_prepare_onchain_payment_request = + _cst_new_box_autoadd_prepare_onchain_payment_requestPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_prepare_redeem_onchain_funds_request() { + return _cst_new_box_autoadd_prepare_redeem_onchain_funds_request(); + } + + late final _cst_new_box_autoadd_prepare_redeem_onchain_funds_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request'); + late final _cst_new_box_autoadd_prepare_redeem_onchain_funds_request = + _cst_new_box_autoadd_prepare_redeem_onchain_funds_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_prepare_refund_request() { + return _cst_new_box_autoadd_prepare_refund_request(); + } + + late final _cst_new_box_autoadd_prepare_refund_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request'); + late final _cst_new_box_autoadd_prepare_refund_request = _cst_new_box_autoadd_prepare_refund_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_receive_onchain_request() { + return _cst_new_box_autoadd_receive_onchain_request(); + } + + late final _cst_new_box_autoadd_receive_onchain_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request'); + late final _cst_new_box_autoadd_receive_onchain_request = _cst_new_box_autoadd_receive_onchain_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_receive_payment_request() { + return _cst_new_box_autoadd_receive_payment_request(); + } + + late final _cst_new_box_autoadd_receive_payment_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request'); + late final _cst_new_box_autoadd_receive_payment_request = _cst_new_box_autoadd_receive_payment_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_redeem_onchain_funds_request() { + return _cst_new_box_autoadd_redeem_onchain_funds_request(); + } + + late final _cst_new_box_autoadd_redeem_onchain_funds_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request'); + late final _cst_new_box_autoadd_redeem_onchain_funds_request = + _cst_new_box_autoadd_redeem_onchain_funds_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_refund_request() { + return _cst_new_box_autoadd_refund_request(); + } + + late final _cst_new_box_autoadd_refund_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_refund_request'); + late final _cst_new_box_autoadd_refund_request = + _cst_new_box_autoadd_refund_requestPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_report_issue_request() { + return _cst_new_box_autoadd_report_issue_request(); + } + + late final _cst_new_box_autoadd_report_issue_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request'); + late final _cst_new_box_autoadd_report_issue_request = _cst_new_box_autoadd_report_issue_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_report_payment_failure_details() { + return _cst_new_box_autoadd_report_payment_failure_details(); + } + + late final _cst_new_box_autoadd_report_payment_failure_detailsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details'); + late final _cst_new_box_autoadd_report_payment_failure_details = + _cst_new_box_autoadd_report_payment_failure_detailsPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_reverse_swap_fees_request() { + return _cst_new_box_autoadd_reverse_swap_fees_request(); + } + + late final _cst_new_box_autoadd_reverse_swap_fees_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request'); + late final _cst_new_box_autoadd_reverse_swap_fees_request = + _cst_new_box_autoadd_reverse_swap_fees_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_reverse_swap_info() { + return _cst_new_box_autoadd_reverse_swap_info(); + } + + late final _cst_new_box_autoadd_reverse_swap_infoPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info'); + late final _cst_new_box_autoadd_reverse_swap_info = _cst_new_box_autoadd_reverse_swap_infoPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_send_onchain_request() { + return _cst_new_box_autoadd_send_onchain_request(); + } + + late final _cst_new_box_autoadd_send_onchain_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request'); + late final _cst_new_box_autoadd_send_onchain_request = _cst_new_box_autoadd_send_onchain_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_send_payment_request() { + return _cst_new_box_autoadd_send_payment_request(); + } + + late final _cst_new_box_autoadd_send_payment_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request'); + late final _cst_new_box_autoadd_send_payment_request = _cst_new_box_autoadd_send_payment_requestPtr + .asFunction Function()>(); + + ffi.Pointer + cst_new_box_autoadd_send_spontaneous_payment_request() { + return _cst_new_box_autoadd_send_spontaneous_payment_request(); + } + + late final _cst_new_box_autoadd_send_spontaneous_payment_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request'); + late final _cst_new_box_autoadd_send_spontaneous_payment_request = + _cst_new_box_autoadd_send_spontaneous_payment_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_sign_message_request() { + return _cst_new_box_autoadd_sign_message_request(); + } + + late final _cst_new_box_autoadd_sign_message_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request'); + late final _cst_new_box_autoadd_sign_message_request = _cst_new_box_autoadd_sign_message_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_static_backup_request() { + return _cst_new_box_autoadd_static_backup_request(); + } + + late final _cst_new_box_autoadd_static_backup_requestPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request'); + late final _cst_new_box_autoadd_static_backup_request = _cst_new_box_autoadd_static_backup_requestPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_success_action_processed() { + return _cst_new_box_autoadd_success_action_processed(); + } + + late final _cst_new_box_autoadd_success_action_processedPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed'); + late final _cst_new_box_autoadd_success_action_processed = _cst_new_box_autoadd_success_action_processedPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_swap_info() { + return _cst_new_box_autoadd_swap_info(); + } + + late final _cst_new_box_autoadd_swap_infoPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_swap_info'); + late final _cst_new_box_autoadd_swap_info = + _cst_new_box_autoadd_swap_infoPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_symbol() { + return _cst_new_box_autoadd_symbol(); + } + + late final _cst_new_box_autoadd_symbolPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_symbol'); + late final _cst_new_box_autoadd_symbol = + _cst_new_box_autoadd_symbolPtr.asFunction Function()>(); + + ffi.Pointer cst_new_box_autoadd_u_32( + int value, + ) { + return _cst_new_box_autoadd_u_32( + value, + ); + } + + late final _cst_new_box_autoadd_u_32Ptr = + _lookup Function(ffi.Uint32)>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_u_32'); + late final _cst_new_box_autoadd_u_32 = + _cst_new_box_autoadd_u_32Ptr.asFunction Function(int)>(); + + ffi.Pointer cst_new_box_autoadd_u_64( + int value, + ) { + return _cst_new_box_autoadd_u_64( + value, + ); + } + + late final _cst_new_box_autoadd_u_64Ptr = + _lookup Function(ffi.Uint64)>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_u_64'); + late final _cst_new_box_autoadd_u_64 = + _cst_new_box_autoadd_u_64Ptr.asFunction Function(int)>(); + + ffi.Pointer cst_new_box_autoadd_url_success_action_data() { + return _cst_new_box_autoadd_url_success_action_data(); + } + + late final _cst_new_box_autoadd_url_success_action_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_url_success_action_data'); + late final _cst_new_box_autoadd_url_success_action_data = _cst_new_box_autoadd_url_success_action_dataPtr + .asFunction Function()>(); + + ffi.Pointer cst_new_list_String( + int len, + ) { + return _cst_new_list_String( + len, + ); + } + + late final _cst_new_list_StringPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_String'); + late final _cst_new_list_String = + _cst_new_list_StringPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_fiat_currency( + int len, + ) { + return _cst_new_list_fiat_currency( + len, + ); + } + + late final _cst_new_list_fiat_currencyPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_fiat_currency'); + late final _cst_new_list_fiat_currency = + _cst_new_list_fiat_currencyPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_locale_overrides( + int len, + ) { + return _cst_new_list_locale_overrides( + len, + ); + } + + late final _cst_new_list_locale_overridesPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_locale_overrides'); + late final _cst_new_list_locale_overrides = _cst_new_list_locale_overridesPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_localized_name( + int len, + ) { + return _cst_new_list_localized_name( + len, + ); + } + + late final _cst_new_list_localized_namePtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_localized_name'); + late final _cst_new_list_localized_name = + _cst_new_list_localized_namePtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_lsp_information( + int len, + ) { + return _cst_new_list_lsp_information( + len, + ); + } + + late final _cst_new_list_lsp_informationPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_lsp_information'); + late final _cst_new_list_lsp_information = + _cst_new_list_lsp_informationPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_metadata_filter( + int len, + ) { + return _cst_new_list_metadata_filter( + len, + ); + } + + late final _cst_new_list_metadata_filterPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_metadata_filter'); + late final _cst_new_list_metadata_filter = + _cst_new_list_metadata_filterPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_opening_fee_params( + int len, + ) { + return _cst_new_list_opening_fee_params( + len, + ); + } + + late final _cst_new_list_opening_fee_paramsPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_opening_fee_params'); + late final _cst_new_list_opening_fee_params = _cst_new_list_opening_fee_paramsPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_payment( + int len, + ) { + return _cst_new_list_payment( + len, + ); + } + + late final _cst_new_list_paymentPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_payment'); + late final _cst_new_list_payment = + _cst_new_list_paymentPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_payment_type_filter( + int len, + ) { + return _cst_new_list_payment_type_filter( + len, + ); + } + + late final _cst_new_list_payment_type_filterPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_payment_type_filter'); + late final _cst_new_list_payment_type_filter = _cst_new_list_payment_type_filterPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_prim_u_8_strict( + int len, + ) { + return _cst_new_list_prim_u_8_strict( + len, + ); + } + + late final _cst_new_list_prim_u_8_strictPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_prim_u_8_strict'); + late final _cst_new_list_prim_u_8_strict = + _cst_new_list_prim_u_8_strictPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_rate( + int len, + ) { + return _cst_new_list_rate( + len, + ); + } + + late final _cst_new_list_ratePtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_rate'); + late final _cst_new_list_rate = + _cst_new_list_ratePtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_reverse_swap_info( + int len, + ) { + return _cst_new_list_reverse_swap_info( + len, + ); + } + + late final _cst_new_list_reverse_swap_infoPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_reverse_swap_info'); + late final _cst_new_list_reverse_swap_info = _cst_new_list_reverse_swap_infoPtr + .asFunction Function(int)>(); + + ffi.Pointer cst_new_list_route_hint( + int len, + ) { + return _cst_new_list_route_hint( + len, + ); + } + + late final _cst_new_list_route_hintPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_route_hint'); + late final _cst_new_list_route_hint = + _cst_new_list_route_hintPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_route_hint_hop( + int len, + ) { + return _cst_new_list_route_hint_hop( + len, + ); + } + + late final _cst_new_list_route_hint_hopPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_route_hint_hop'); + late final _cst_new_list_route_hint_hop = + _cst_new_list_route_hint_hopPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_swap_info( + int len, + ) { + return _cst_new_list_swap_info( + len, + ); + } + + late final _cst_new_list_swap_infoPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_swap_info'); + late final _cst_new_list_swap_info = + _cst_new_list_swap_infoPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_tlv_entry( + int len, + ) { + return _cst_new_list_tlv_entry( + len, + ); + } + + late final _cst_new_list_tlv_entryPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_tlv_entry'); + late final _cst_new_list_tlv_entry = + _cst_new_list_tlv_entryPtr.asFunction Function(int)>(); + + ffi.Pointer cst_new_list_unspent_transaction_output( + int len, + ) { + return _cst_new_list_unspent_transaction_output( + len, + ); + } + + late final _cst_new_list_unspent_transaction_outputPtr = + _lookup Function(ffi.Int32)>>( + 'frbgen_breez_sdk_cst_new_list_unspent_transaction_output'); + late final _cst_new_list_unspent_transaction_output = _cst_new_list_unspent_transaction_outputPtr + .asFunction Function(int)>(); + + int dummy_method_to_enforce_bundling() { + return _dummy_method_to_enforce_bundling(); + } + + late final _dummy_method_to_enforce_bundlingPtr = + _lookup>('dummy_method_to_enforce_bundling'); + late final _dummy_method_to_enforce_bundling = + _dummy_method_to_enforce_bundlingPtr.asFunction(); +} + +typedef DartPostCObjectFnType = ffi.Pointer>; +typedef DartPostCObjectFnTypeFunction = ffi.Bool Function(DartPort port_id, ffi.Pointer message); +typedef DartDartPostCObjectFnTypeFunction = bool Function( + DartDartPort port_id, ffi.Pointer message); +typedef DartPort = ffi.Int64; +typedef DartDartPort = int; + +final class wire_cst_list_prim_u_8_strict extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_opening_fee_params extends ffi.Struct { + @ffi.Uint64() + external int min_msat; + + @ffi.Uint32() + external int proportional; + + external ffi.Pointer valid_until; + + @ffi.Uint32() + external int max_idle_time; + + @ffi.Uint32() + external int max_client_to_self_delay; + + external ffi.Pointer promise; +} + +final class wire_cst_buy_bitcoin_request extends ffi.Struct { + @ffi.Int32() + external int provider; + + external ffi.Pointer opening_fee_params; +} + +final class wire_cst_check_message_request extends ffi.Struct { + external ffi.Pointer message; + + external ffi.Pointer pubkey; + + external ffi.Pointer signature; +} + +final class wire_cst_configure_node_request extends ffi.Struct { + external ffi.Pointer close_to_address; +} + +final class wire_cst_greenlight_credentials extends ffi.Struct { + external ffi.Pointer device_key; + + external ffi.Pointer device_cert; +} + +final class wire_cst_greenlight_node_config extends ffi.Struct { + external ffi.Pointer partner_credentials; + + external ffi.Pointer invite_code; +} + +final class wire_cst_NodeConfig_Greenlight extends ffi.Struct { + external ffi.Pointer config; +} + +final class NodeConfigKind extends ffi.Union { + external wire_cst_NodeConfig_Greenlight Greenlight; +} + +final class wire_cst_node_config extends ffi.Struct { + @ffi.Int32() + external int tag; + + external NodeConfigKind kind; +} + +final class wire_cst_config extends ffi.Struct { + external ffi.Pointer breezserver; + + external ffi.Pointer chainnotifier_url; + + external ffi.Pointer mempoolspace_url; + + external ffi.Pointer working_dir; + + @ffi.Int32() + external int network; + + @ffi.Uint32() + external int payment_timeout_sec; + + external ffi.Pointer default_lsp_id; + + external ffi.Pointer api_key; + + @ffi.Double() + external double maxfee_percent; + + @ffi.Uint64() + external int exemptfee_msat; + + external wire_cst_node_config node_config; +} + +final class wire_cst_connect_request extends ffi.Struct { + external wire_cst_config config; + + external ffi.Pointer seed; + + external ffi.Pointer restore_only; +} + +final class wire_cst_reverse_swap_fees_request extends ffi.Struct { + external ffi.Pointer send_amount_sat; + + external ffi.Pointer claim_tx_feerate; +} + +final class wire_cst_list_payment_type_filter extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_metadata_filter extends ffi.Struct { + external ffi.Pointer json_path; + + external ffi.Pointer json_value; +} + +final class wire_cst_list_metadata_filter extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_payments_request extends ffi.Struct { + external ffi.Pointer filters; + + external ffi.Pointer metadata_filters; + + external ffi.Pointer from_timestamp; + + external ffi.Pointer to_timestamp; + + external ffi.Pointer include_failures; + + external ffi.Pointer offset; + + external ffi.Pointer limit; +} + +final class wire_cst_ln_url_auth_request_data extends ffi.Struct { + external ffi.Pointer k1; + + external ffi.Pointer action; + + external ffi.Pointer domain; + + external ffi.Pointer url; +} + +final class wire_cst_ln_url_pay_request_data extends ffi.Struct { + external ffi.Pointer callback; + + @ffi.Uint64() + external int min_sendable; + + @ffi.Uint64() + external int max_sendable; + + external ffi.Pointer metadata_str; + + @ffi.Uint16() + external int comment_allowed; + + external ffi.Pointer domain; + + @ffi.Bool() + external bool allows_nostr; + + external ffi.Pointer nostr_pubkey; + + external ffi.Pointer ln_address; +} + +final class wire_cst_ln_url_pay_request extends ffi.Struct { + external wire_cst_ln_url_pay_request_data data; + + @ffi.Uint64() + external int amount_msat; + + external ffi.Pointer comment; + + external ffi.Pointer payment_label; +} + +final class wire_cst_ln_url_withdraw_request_data extends ffi.Struct { + external ffi.Pointer callback; + + external ffi.Pointer k1; + + external ffi.Pointer default_description; + + @ffi.Uint64() + external int min_withdrawable; + + @ffi.Uint64() + external int max_withdrawable; +} + +final class wire_cst_ln_url_withdraw_request extends ffi.Struct { + external wire_cst_ln_url_withdraw_request_data data; + + @ffi.Uint64() + external int amount_msat; + + external ffi.Pointer description; +} + +final class wire_cst_open_channel_fee_request extends ffi.Struct { + external ffi.Pointer amount_msat; + + external ffi.Pointer expiry; +} + +final class wire_cst_prepare_onchain_payment_response extends ffi.Struct { + external ffi.Pointer fees_hash; + + @ffi.Double() + external double fees_percentage; + + @ffi.Uint64() + external int fees_lockup; + + @ffi.Uint64() + external int fees_claim; + + @ffi.Uint64() + external int sender_amount_sat; + + @ffi.Uint64() + external int recipient_amount_sat; + + @ffi.Uint64() + external int total_fees; +} + +final class wire_cst_pay_onchain_request extends ffi.Struct { + external ffi.Pointer recipient_address; + + external wire_cst_prepare_onchain_payment_response prepare_res; +} + +final class wire_cst_prepare_onchain_payment_request extends ffi.Struct { + @ffi.Uint64() + external int amount_sat; + + @ffi.Int32() + external int amount_type; + + @ffi.Uint32() + external int claim_tx_feerate; +} + +final class wire_cst_prepare_redeem_onchain_funds_request extends ffi.Struct { + external ffi.Pointer to_address; + + @ffi.Uint32() + external int sat_per_vbyte; +} + +final class wire_cst_prepare_refund_request extends ffi.Struct { + external ffi.Pointer swap_address; + + external ffi.Pointer to_address; + + @ffi.Uint32() + external int sat_per_vbyte; +} + +final class wire_cst_receive_onchain_request extends ffi.Struct { + external ffi.Pointer opening_fee_params; +} + +final class wire_cst_receive_payment_request extends ffi.Struct { + @ffi.Uint64() + external int amount_msat; + + external ffi.Pointer description; + + external ffi.Pointer preimage; + + external ffi.Pointer opening_fee_params; + + external ffi.Pointer use_description_hash; + + external ffi.Pointer expiry; + + external ffi.Pointer cltv; +} + +final class wire_cst_redeem_onchain_funds_request extends ffi.Struct { + external ffi.Pointer to_address; + + @ffi.Uint32() + external int sat_per_vbyte; +} + +final class wire_cst_refund_request extends ffi.Struct { + external ffi.Pointer swap_address; + + external ffi.Pointer to_address; + + @ffi.Uint32() + external int sat_per_vbyte; +} + +final class wire_cst_report_payment_failure_details extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer comment; +} + +final class wire_cst_ReportIssueRequest_PaymentFailure extends ffi.Struct { + external ffi.Pointer data; +} + +final class ReportIssueRequestKind extends ffi.Union { + external wire_cst_ReportIssueRequest_PaymentFailure PaymentFailure; +} + +final class wire_cst_report_issue_request extends ffi.Struct { + @ffi.Int32() + external int tag; + + external ReportIssueRequestKind kind; +} + +final class wire_cst_send_onchain_request extends ffi.Struct { + @ffi.Uint64() + external int amount_sat; + + external ffi.Pointer onchain_recipient_address; + + external ffi.Pointer pair_hash; + + @ffi.Uint32() + external int sat_per_vbyte; +} + +final class wire_cst_send_payment_request extends ffi.Struct { + external ffi.Pointer bolt11; + + external ffi.Pointer amount_msat; + + external ffi.Pointer label; +} + +final class wire_cst_tlv_entry extends ffi.Struct { + @ffi.Uint64() + external int field_number; + + external ffi.Pointer value; +} + +final class wire_cst_list_tlv_entry extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_send_spontaneous_payment_request extends ffi.Struct { + external ffi.Pointer node_id; + + @ffi.Uint64() + external int amount_msat; + + external ffi.Pointer extra_tlvs; + + external ffi.Pointer label; +} + +final class wire_cst_sign_message_request extends ffi.Struct { + external ffi.Pointer message; +} + +final class wire_cst_static_backup_request extends ffi.Struct { + external ffi.Pointer working_dir; +} + +final class wire_cst_aes_success_action_data_decrypted extends ffi.Struct { + external ffi.Pointer description; + + external ffi.Pointer plaintext; +} + +final class wire_cst_AesSuccessActionDataResult_Decrypted extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_AesSuccessActionDataResult_ErrorStatus extends ffi.Struct { + external ffi.Pointer reason; +} + +final class AesSuccessActionDataResultKind extends ffi.Union { + external wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; + + external wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; +} + +final class wire_cst_aes_success_action_data_result extends ffi.Struct { + @ffi.Int32() + external int tag; + + external AesSuccessActionDataResultKind kind; +} + +final class wire_cst_backup_failed_data extends ffi.Struct { + external ffi.Pointer error; +} + +final class wire_cst_bitcoin_address_data extends ffi.Struct { + external ffi.Pointer address; + + @ffi.Int32() + external int network; + + external ffi.Pointer amount_sat; + + external ffi.Pointer label; + + external ffi.Pointer message; +} + +final class wire_cst_closed_channel_payment_details extends ffi.Struct { + @ffi.Int32() + external int state; + + external ffi.Pointer funding_txid; + + external ffi.Pointer short_channel_id; + + external ffi.Pointer closing_txid; +} + +final class wire_cst_SuccessActionProcessed_Aes extends ffi.Struct { + external ffi.Pointer result; +} + +final class wire_cst_message_success_action_data extends ffi.Struct { + external ffi.Pointer message; +} + +final class wire_cst_SuccessActionProcessed_Message extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_url_success_action_data extends ffi.Struct { + external ffi.Pointer description; + + external ffi.Pointer url; +} + +final class wire_cst_SuccessActionProcessed_Url extends ffi.Struct { + external ffi.Pointer data; +} + +final class SuccessActionProcessedKind extends ffi.Union { + external wire_cst_SuccessActionProcessed_Aes Aes; + + external wire_cst_SuccessActionProcessed_Message Message; + + external wire_cst_SuccessActionProcessed_Url Url; +} + +final class wire_cst_success_action_processed extends ffi.Struct { + @ffi.Int32() + external int tag; + + external SuccessActionProcessedKind kind; +} + +final class wire_cst_list_String extends ffi.Struct { + external ffi.Pointer> ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_swap_info extends ffi.Struct { + external ffi.Pointer bitcoin_address; + + @ffi.Int64() + external int created_at; + + @ffi.Int64() + external int lock_height; + + external ffi.Pointer payment_hash; + + external ffi.Pointer preimage; + + external ffi.Pointer private_key; + + external ffi.Pointer public_key; + + external ffi.Pointer swapper_public_key; + + external ffi.Pointer script; + + external ffi.Pointer bolt11; + + @ffi.Uint64() + external int paid_msat; + + @ffi.Uint64() + external int total_incoming_txs; + + @ffi.Uint64() + external int confirmed_sats; + + @ffi.Uint64() + external int unconfirmed_sats; + + @ffi.Int32() + external int status; + + external ffi.Pointer refund_tx_ids; + + external ffi.Pointer unconfirmed_tx_ids; + + external ffi.Pointer confirmed_tx_ids; + + @ffi.Int64() + external int min_allowed_deposit; + + @ffi.Int64() + external int max_allowed_deposit; + + @ffi.Int64() + external int max_swapper_payable; + + external ffi.Pointer last_redeem_error; + + external ffi.Pointer channel_opening_fees; + + external ffi.Pointer confirmed_at; +} + +final class wire_cst_reverse_swap_info extends ffi.Struct { + external ffi.Pointer id; + + external ffi.Pointer claim_pubkey; + + external ffi.Pointer lockup_txid; + + external ffi.Pointer claim_txid; + + @ffi.Uint64() + external int onchain_amount_sat; + + @ffi.Int32() + external int status; +} + +final class wire_cst_ln_payment_details extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer label; + + external ffi.Pointer destination_pubkey; + + external ffi.Pointer payment_preimage; + + @ffi.Bool() + external bool keysend; + + external ffi.Pointer bolt11; + + external ffi.Pointer open_channel_bolt11; + + external ffi.Pointer lnurl_success_action; + + external ffi.Pointer lnurl_pay_domain; + + external ffi.Pointer ln_address; + + external ffi.Pointer lnurl_metadata; + + external ffi.Pointer lnurl_withdraw_endpoint; + + external ffi.Pointer swap_info; + + external ffi.Pointer reverse_swap_info; + + external ffi.Pointer pending_expiration_block; +} + +final class wire_cst_PaymentDetails_Ln extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_PaymentDetails_ClosedChannel extends ffi.Struct { + external ffi.Pointer data; +} + +final class PaymentDetailsKind extends ffi.Union { + external wire_cst_PaymentDetails_Ln Ln; + + external wire_cst_PaymentDetails_ClosedChannel ClosedChannel; +} + +final class wire_cst_payment_details extends ffi.Struct { + @ffi.Int32() + external int tag; + + external PaymentDetailsKind kind; +} + +final class wire_cst_payment extends ffi.Struct { + external ffi.Pointer id; + + @ffi.Int32() + external int payment_type; + + @ffi.Int64() + external int payment_time; + + @ffi.Uint64() + external int amount_msat; + + @ffi.Uint64() + external int fee_msat; + + @ffi.Int32() + external int status; + + external ffi.Pointer error; + + external ffi.Pointer description; + + external wire_cst_payment_details details; + + external ffi.Pointer metadata; +} + +final class wire_cst_invoice_paid_details extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer bolt11; + + external ffi.Pointer payment; +} + +final class wire_cst_route_hint_hop extends ffi.Struct { + external ffi.Pointer src_node_id; + + @ffi.Uint64() + external int short_channel_id; + + @ffi.Uint32() + external int fees_base_msat; + + @ffi.Uint32() + external int fees_proportional_millionths; + + @ffi.Uint64() + external int cltv_expiry_delta; + + external ffi.Pointer htlc_minimum_msat; + + external ffi.Pointer htlc_maximum_msat; +} + +final class wire_cst_list_route_hint_hop extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_route_hint extends ffi.Struct { + external ffi.Pointer hops; +} + +final class wire_cst_list_route_hint extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_ln_invoice extends ffi.Struct { + external ffi.Pointer bolt11; + + @ffi.Int32() + external int network; + + external ffi.Pointer payee_pubkey; + + external ffi.Pointer payment_hash; + + external ffi.Pointer description; + + external ffi.Pointer description_hash; + + external ffi.Pointer amount_msat; + + @ffi.Uint64() + external int timestamp; + + @ffi.Uint64() + external int expiry; + + external ffi.Pointer routing_hints; + + external ffi.Pointer payment_secret; + + @ffi.Uint64() + external int min_final_cltv_expiry_delta; +} + +final class wire_cst_ln_url_error_data extends ffi.Struct { + external ffi.Pointer reason; +} + +final class wire_cst_ln_url_pay_error_data extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer reason; +} + +final class wire_cst_ln_url_pay_success_data extends ffi.Struct { + external wire_cst_payment payment; + + external ffi.Pointer success_action; +} + +final class wire_cst_ln_url_withdraw_success_data extends ffi.Struct { + external wire_cst_ln_invoice invoice; +} + +final class wire_cst_list_opening_fee_params extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_opening_fee_params_menu extends ffi.Struct { + external ffi.Pointer values; +} + +final class wire_cst_lsp_information extends ffi.Struct { + external ffi.Pointer id; + + external ffi.Pointer name; + + external ffi.Pointer widget_url; + + external ffi.Pointer pubkey; + + external ffi.Pointer host; + + @ffi.Int64() + external int base_fee_msat; + + @ffi.Double() + external double fee_rate; + + @ffi.Uint32() + external int time_lock_delta; + + @ffi.Int64() + external int min_htlc_msat; + + external ffi.Pointer lsp_pubkey; + + external wire_cst_opening_fee_params_menu opening_fee_params_list; +} + +final class wire_cst_NodeCredentials_Greenlight extends ffi.Struct { + external ffi.Pointer credentials; +} + +final class NodeCredentialsKind extends ffi.Union { + external wire_cst_NodeCredentials_Greenlight Greenlight; +} + +final class wire_cst_node_credentials extends ffi.Struct { + @ffi.Int32() + external int tag; + + external NodeCredentialsKind kind; +} + +final class wire_cst_payment_failed_data extends ffi.Struct { + external ffi.Pointer error; + + external ffi.Pointer node_id; + + external ffi.Pointer invoice; +} + +final class wire_cst_symbol extends ffi.Struct { + external ffi.Pointer grapheme; + + external ffi.Pointer template; + + external ffi.Pointer rtl; + + external ffi.Pointer position; +} + +final class wire_cst_localized_name extends ffi.Struct { + external ffi.Pointer locale; + + external ffi.Pointer name; +} + +final class wire_cst_list_localized_name extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_locale_overrides extends ffi.Struct { + external ffi.Pointer locale; + + external ffi.Pointer spacing; + + external wire_cst_symbol symbol; +} + +final class wire_cst_list_locale_overrides extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_currency_info extends ffi.Struct { + external ffi.Pointer name; + + @ffi.Uint32() + external int fraction_size; + + external ffi.Pointer spacing; + + external ffi.Pointer symbol; + + external ffi.Pointer uniq_symbol; + + external ffi.Pointer localized_name; + + external ffi.Pointer locale_overrides; +} + +final class wire_cst_fiat_currency extends ffi.Struct { + external ffi.Pointer id; + + external wire_cst_currency_info info; +} + +final class wire_cst_list_fiat_currency extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_lsp_information extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_payment extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_rate extends ffi.Struct { + external ffi.Pointer coin; + + @ffi.Double() + external double value; +} + +final class wire_cst_list_rate extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_reverse_swap_info extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_list_swap_info extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_unspent_transaction_output extends ffi.Struct { + external ffi.Pointer txid; + + @ffi.Uint32() + external int outnum; + + @ffi.Uint64() + external int amount_millisatoshi; + + external ffi.Pointer address; + + @ffi.Bool() + external bool reserved; +} + +final class wire_cst_list_unspent_transaction_output extends ffi.Struct { + external ffi.Pointer ptr; + + @ffi.Int32() + external int len; +} + +final class wire_cst_backup_status extends ffi.Struct { + @ffi.Bool() + external bool backed_up; + + external ffi.Pointer last_backup_time; +} + +final class wire_cst_BreezEvent_NewBlock extends ffi.Struct { + @ffi.Uint32() + external int block; +} + +final class wire_cst_BreezEvent_InvoicePaid extends ffi.Struct { + external ffi.Pointer details; +} + +final class wire_cst_BreezEvent_PaymentSucceed extends ffi.Struct { + external ffi.Pointer details; +} + +final class wire_cst_BreezEvent_PaymentFailed extends ffi.Struct { + external ffi.Pointer details; +} + +final class wire_cst_BreezEvent_BackupFailed extends ffi.Struct { + external ffi.Pointer details; +} + +final class wire_cst_BreezEvent_SwapUpdated extends ffi.Struct { + external ffi.Pointer details; +} + +final class BreezEventKind extends ffi.Union { + external wire_cst_BreezEvent_NewBlock NewBlock; + + external wire_cst_BreezEvent_InvoicePaid InvoicePaid; + + external wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; + + external wire_cst_BreezEvent_PaymentFailed PaymentFailed; + + external wire_cst_BreezEvent_BackupFailed BackupFailed; + + external wire_cst_BreezEvent_SwapUpdated SwapUpdated; +} + +final class wire_cst_breez_event extends ffi.Struct { + @ffi.Int32() + external int tag; + + external BreezEventKind kind; +} + +final class wire_cst_buy_bitcoin_response extends ffi.Struct { + external ffi.Pointer url; + + external ffi.Pointer opening_fee_params; +} + +final class wire_cst_check_message_response extends ffi.Struct { + @ffi.Bool() + external bool is_valid; +} + +final class wire_cst_InputType_BitcoinAddress extends ffi.Struct { + external ffi.Pointer address; +} + +final class wire_cst_InputType_Bolt11 extends ffi.Struct { + external ffi.Pointer invoice; +} + +final class wire_cst_InputType_NodeId extends ffi.Struct { + external ffi.Pointer node_id; +} + +final class wire_cst_InputType_Url extends ffi.Struct { + external ffi.Pointer url; +} + +final class wire_cst_InputType_LnUrlPay extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_InputType_LnUrlWithdraw extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_InputType_LnUrlAuth extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_InputType_LnUrlError extends ffi.Struct { + external ffi.Pointer data; +} + +final class InputTypeKind extends ffi.Union { + external wire_cst_InputType_BitcoinAddress BitcoinAddress; + + external wire_cst_InputType_Bolt11 Bolt11; + + external wire_cst_InputType_NodeId NodeId; + + external wire_cst_InputType_Url Url; + + external wire_cst_InputType_LnUrlPay LnUrlPay; + + external wire_cst_InputType_LnUrlWithdraw LnUrlWithdraw; + + external wire_cst_InputType_LnUrlAuth LnUrlAuth; + + external wire_cst_InputType_LnUrlError LnUrlError; +} + +final class wire_cst_input_type extends ffi.Struct { + @ffi.Int32() + external int tag; + + external InputTypeKind kind; +} + +final class wire_cst_LnUrlCallbackStatus_ErrorStatus extends ffi.Struct { + external ffi.Pointer data; +} + +final class LnUrlCallbackStatusKind extends ffi.Union { + external wire_cst_LnUrlCallbackStatus_ErrorStatus ErrorStatus; +} + +final class wire_cst_ln_url_callback_status extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LnUrlCallbackStatusKind kind; +} + +final class wire_cst_LnUrlPayResult_EndpointSuccess extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_LnUrlPayResult_EndpointError extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_LnUrlPayResult_PayError extends ffi.Struct { + external ffi.Pointer data; +} + +final class LnUrlPayResultKind extends ffi.Union { + external wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; + + external wire_cst_LnUrlPayResult_EndpointError EndpointError; + + external wire_cst_LnUrlPayResult_PayError PayError; +} + +final class wire_cst_ln_url_pay_result extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LnUrlPayResultKind kind; +} + +final class wire_cst_LnUrlWithdrawResult_Ok extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_LnUrlWithdrawResult_ErrorStatus extends ffi.Struct { + external ffi.Pointer data; +} + +final class LnUrlWithdrawResultKind extends ffi.Union { + external wire_cst_LnUrlWithdrawResult_Ok Ok; + + external wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; +} + +final class wire_cst_ln_url_withdraw_result extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LnUrlWithdrawResultKind kind; +} + +final class wire_cst_log_entry extends ffi.Struct { + external ffi.Pointer line; + + external ffi.Pointer level; +} + +final class wire_cst_max_reverse_swap_amount_response extends ffi.Struct { + @ffi.Uint64() + external int total_sat; +} + +final class wire_cst_node_state extends ffi.Struct { + external ffi.Pointer id; + + @ffi.Uint32() + external int block_height; + + @ffi.Uint64() + external int channels_balance_msat; + + @ffi.Uint64() + external int onchain_balance_msat; + + @ffi.Uint64() + external int pending_onchain_balance_msat; + + external ffi.Pointer utxos; + + @ffi.Uint64() + external int max_payable_msat; + + @ffi.Uint64() + external int max_receivable_msat; + + @ffi.Uint64() + external int max_single_payment_amount_msat; + + @ffi.Uint64() + external int max_chan_reserve_msats; + + external ffi.Pointer connected_peers; + + @ffi.Uint64() + external int inbound_liquidity_msats; +} + +final class wire_cst_onchain_payment_limits_response extends ffi.Struct { + @ffi.Uint64() + external int min_sat; + + @ffi.Uint64() + external int max_sat; +} + +final class wire_cst_open_channel_fee_response extends ffi.Struct { + external ffi.Pointer fee_msat; + + external wire_cst_opening_fee_params fee_params; +} + +final class wire_cst_pay_onchain_response extends ffi.Struct { + external wire_cst_reverse_swap_info reverse_swap_info; +} + +final class wire_cst_prepare_redeem_onchain_funds_response extends ffi.Struct { + @ffi.Uint64() + external int tx_weight; + + @ffi.Uint64() + external int tx_fee_sat; +} + +final class wire_cst_prepare_refund_response extends ffi.Struct { + @ffi.Uint32() + external int refund_tx_weight; + + @ffi.Uint64() + external int refund_tx_fee_sat; +} + +final class wire_cst_receive_payment_response extends ffi.Struct { + external wire_cst_ln_invoice ln_invoice; + + external ffi.Pointer opening_fee_params; + + external ffi.Pointer opening_fee_msat; +} + +final class wire_cst_recommended_fees extends ffi.Struct { + @ffi.Uint64() + external int fastest_fee; + + @ffi.Uint64() + external int half_hour_fee; + + @ffi.Uint64() + external int hour_fee; + + @ffi.Uint64() + external int economy_fee; + + @ffi.Uint64() + external int minimum_fee; +} + +final class wire_cst_redeem_onchain_funds_response extends ffi.Struct { + external ffi.Pointer txid; +} + +final class wire_cst_refund_response extends ffi.Struct { + external ffi.Pointer refund_tx_id; +} + +final class wire_cst_reverse_swap_pair_info extends ffi.Struct { + @ffi.Uint64() + external int min; + + @ffi.Uint64() + external int max; + + external ffi.Pointer fees_hash; + + @ffi.Double() + external double fees_percentage; + + @ffi.Uint64() + external int fees_lockup; + + @ffi.Uint64() + external int fees_claim; + + external ffi.Pointer total_fees; +} + +final class wire_cst_send_onchain_response extends ffi.Struct { + external wire_cst_reverse_swap_info reverse_swap_info; +} + +final class wire_cst_send_payment_response extends ffi.Struct { + external wire_cst_payment payment; +} + +final class wire_cst_service_health_check_response extends ffi.Struct { + @ffi.Int32() + external int status; +} + +final class wire_cst_sign_message_response extends ffi.Struct { + external ffi.Pointer signature; +} + +final class wire_cst_static_backup_response extends ffi.Struct { + external ffi.Pointer backup; +} + +const int SWAP_PAYMENT_FEE_EXPIRY_SECONDS = 172800; + +const int INVOICE_PAYMENT_FEE_EXPIRY_SECONDS = 3600; + +const int ESTIMATED_CLAIM_TX_VSIZE = 138; + +const int ESTIMATED_LOCKUP_TX_VSIZE = 153; diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart new file mode 100644 index 000000000..20aab7c0d --- /dev/null +++ b/libs/sdk-flutter/lib/generated/input_parser.dart @@ -0,0 +1,290 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'invoice.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'input_parser.freezed.dart'; + +/// Wrapped in a [BitcoinAddress], this is the result of [parse] when given a plain or BIP-21 BTC address. +class BitcoinAddressData { + final String address; + final Network network; + final int? amountSat; + final String? label; + final String? message; + + const BitcoinAddressData({ + required this.address, + required this.network, + this.amountSat, + this.label, + this.message, + }); + + @override + int get hashCode => + address.hashCode ^ network.hashCode ^ amountSat.hashCode ^ label.hashCode ^ message.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BitcoinAddressData && + runtimeType == other.runtimeType && + address == other.address && + network == other.network && + amountSat == other.amountSat && + label == other.label && + message == other.message; +} + +@freezed +sealed class InputType with _$InputType { + const InputType._(); + + /// # Supported standards + /// + /// - plain on-chain BTC address + /// - BIP21 + const factory InputType.bitcoinAddress({ + required BitcoinAddressData address, + }) = InputType_BitcoinAddress; + + /// Also covers URIs like `bitcoin:...&lightning=bolt11`. In this case, it returns the BOLT11 + /// and discards all other data. + const factory InputType.bolt11({ + required LNInvoice invoice, + }) = InputType_Bolt11; + const factory InputType.nodeId({ + required String nodeId, + }) = InputType_NodeId; + const factory InputType.url({ + required String url, + }) = InputType_Url; + + /// # Supported standards + /// + /// - LUD-01 LNURL bech32 encoding + /// - LUD-06 `payRequest` spec + /// - LUD-16 LN Address + /// - LUD-17 Support for lnurlp prefix with non-bech32-encoded LNURL URLs + const factory InputType.lnUrlPay({ + required LnUrlPayRequestData data, + }) = InputType_LnUrlPay; + + /// # Supported standards + /// + /// - LUD-01 LNURL bech32 encoding + /// - LUD-03 `withdrawRequest` spec + /// - LUD-17 Support for lnurlw prefix with non-bech32-encoded LNURL URLs + /// + /// # Not supported (yet) + /// + /// - LUD-14 `balanceCheck`: reusable `withdrawRequest`s + /// - LUD-19 Pay link discoverable from withdraw link + const factory InputType.lnUrlWithdraw({ + required LnUrlWithdrawRequestData data, + }) = InputType_LnUrlWithdraw; + + /// # Supported standards + /// + /// - LUD-01 LNURL bech32 encoding + /// - LUD-04 `auth` base spec + /// - LUD-17 Support for keyauth prefix with non-bech32-encoded LNURL URLs + const factory InputType.lnUrlAuth({ + required LnUrlAuthRequestData data, + }) = InputType_LnUrlAuth; + const factory InputType.lnUrlError({ + required LnUrlErrorData data, + }) = InputType_LnUrlError; +} + +/// Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint. +/// +/// It represents the endpoint's parameters for the LNURL workflow. +/// +/// See +class LnUrlAuthRequestData { + /// Hex encoded 32 bytes of challenge + final String k1; + + /// When available, one of: register, login, link, auth + final String? action; + + /// Indicates the domain of the LNURL-auth service, to be shown to the user when asking for + /// auth confirmation, as per LUD-04 spec. + final String domain; + + /// Indicates the URL of the LNURL-auth service, including the query arguments. This will be + /// extended with the signed challenge and the linking key, then called in the second step of the workflow. + final String url; + + const LnUrlAuthRequestData({ + required this.k1, + this.action, + required this.domain, + required this.url, + }); + + @override + int get hashCode => k1.hashCode ^ action.hashCode ^ domain.hashCode ^ url.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlAuthRequestData && + runtimeType == other.runtimeType && + k1 == other.k1 && + action == other.action && + domain == other.domain && + url == other.url; +} + +/// Wrapped in a [LnUrlError], this represents a LNURL-endpoint error. +class LnUrlErrorData { + final String reason; + + const LnUrlErrorData({ + required this.reason, + }); + + @override + int get hashCode => reason.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlErrorData && runtimeType == other.runtimeType && reason == other.reason; +} + +/// Wrapped in a [LnUrlPay], this is the result of [parse] when given a LNURL-pay endpoint. +/// +/// It represents the endpoint's parameters for the LNURL workflow. +/// +/// See +class LnUrlPayRequestData { + final String callback; + + /// The minimum amount, in millisats, that this LNURL-pay endpoint accepts + final int minSendable; + + /// The maximum amount, in millisats, that this LNURL-pay endpoint accepts + final int maxSendable; + + /// As per LUD-06, `metadata` is a raw string (e.g. a json representation of the inner map). + /// Use `metadata_vec()` to get the parsed items. + final String metadataStr; + + /// The comment length accepted by this endpoint + /// + /// See + final int commentAllowed; + + /// Indicates the domain of the LNURL-pay service, to be shown to the user when asking for + /// payment input, as per LUD-06 spec. + /// + /// Note: this is not the domain of the callback, but the domain of the LNURL-pay endpoint. + final String domain; + + /// Value indicating whether the recipient supports Nostr Zaps through NIP-57. + /// + /// See + final bool allowsNostr; + + /// Optional recipient's lnurl provider's Nostr pubkey for NIP-57. If it exists it should be a + /// valid BIP 340 public key in hex. + /// + /// See + /// See + final String? nostrPubkey; + + /// If sending to a LN Address, this will be filled. + final String? lnAddress; + + const LnUrlPayRequestData({ + required this.callback, + required this.minSendable, + required this.maxSendable, + required this.metadataStr, + required this.commentAllowed, + required this.domain, + required this.allowsNostr, + this.nostrPubkey, + this.lnAddress, + }); + + @override + int get hashCode => + callback.hashCode ^ + minSendable.hashCode ^ + maxSendable.hashCode ^ + metadataStr.hashCode ^ + commentAllowed.hashCode ^ + domain.hashCode ^ + allowsNostr.hashCode ^ + nostrPubkey.hashCode ^ + lnAddress.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayRequestData && + runtimeType == other.runtimeType && + callback == other.callback && + minSendable == other.minSendable && + maxSendable == other.maxSendable && + metadataStr == other.metadataStr && + commentAllowed == other.commentAllowed && + domain == other.domain && + allowsNostr == other.allowsNostr && + nostrPubkey == other.nostrPubkey && + lnAddress == other.lnAddress; +} + +/// Wrapped in a [LnUrlWithdraw], this is the result of [parse] when given a LNURL-withdraw endpoint. +/// +/// It represents the endpoint's parameters for the LNURL workflow. +/// +/// See +class LnUrlWithdrawRequestData { + final String callback; + final String k1; + final String defaultDescription; + + /// The minimum amount, in millisats, that this LNURL-withdraw endpoint accepts + final int minWithdrawable; + + /// The maximum amount, in millisats, that this LNURL-withdraw endpoint accepts + final int maxWithdrawable; + + const LnUrlWithdrawRequestData({ + required this.callback, + required this.k1, + required this.defaultDescription, + required this.minWithdrawable, + required this.maxWithdrawable, + }); + + @override + int get hashCode => + callback.hashCode ^ + k1.hashCode ^ + defaultDescription.hashCode ^ + minWithdrawable.hashCode ^ + maxWithdrawable.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawRequestData && + runtimeType == other.runtimeType && + callback == other.callback && + k1 == other.k1 && + defaultDescription == other.defaultDescription && + minWithdrawable == other.minWithdrawable && + maxWithdrawable == other.maxWithdrawable; +} diff --git a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart new file mode 100644 index 000000000..bec050b19 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart @@ -0,0 +1,1492 @@ +// 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 'input_parser.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 _$InputType { + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $InputTypeCopyWith<$Res> { + factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = + _$InputTypeCopyWithImpl<$Res, InputType>; +} + +/// @nodoc +class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> + implements $InputTypeCopyWith<$Res> { + _$InputTypeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { + factory _$$InputType_BitcoinAddressImplCopyWith( + _$InputType_BitcoinAddressImpl value, + $Res Function(_$InputType_BitcoinAddressImpl) then) = + __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; + @useResult + $Res call({BitcoinAddressData address}); +} + +/// @nodoc +class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> + implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { + __$$InputType_BitcoinAddressImplCopyWithImpl( + _$InputType_BitcoinAddressImpl _value, + $Res Function(_$InputType_BitcoinAddressImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? address = null, + }) { + return _then(_$InputType_BitcoinAddressImpl( + address: null == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as BitcoinAddressData, + )); + } +} + +/// @nodoc + +class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { + const _$InputType_BitcoinAddressImpl({required this.address}) : super._(); + + @override + final BitcoinAddressData address; + + @override + String toString() { + return 'InputType.bitcoinAddress(address: $address)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_BitcoinAddressImpl && + (identical(other.address, address) || other.address == address)); + } + + @override + int get hashCode => Object.hash(runtimeType, address); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> + get copyWith => __$$InputType_BitcoinAddressImplCopyWithImpl< + _$InputType_BitcoinAddressImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return bitcoinAddress(address); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return bitcoinAddress?.call(address); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (bitcoinAddress != null) { + return bitcoinAddress(address); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return bitcoinAddress(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return bitcoinAddress?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (bitcoinAddress != null) { + return bitcoinAddress(this); + } + return orElse(); + } +} + +abstract class InputType_BitcoinAddress extends InputType { + const factory InputType_BitcoinAddress( + {required final BitcoinAddressData address}) = + _$InputType_BitcoinAddressImpl; + const InputType_BitcoinAddress._() : super._(); + + BitcoinAddressData get address; + @JsonKey(ignore: true) + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { + factory _$$InputType_Bolt11ImplCopyWith(_$InputType_Bolt11Impl value, + $Res Function(_$InputType_Bolt11Impl) then) = + __$$InputType_Bolt11ImplCopyWithImpl<$Res>; + @useResult + $Res call({LNInvoice invoice}); +} + +/// @nodoc +class __$$InputType_Bolt11ImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> + implements _$$InputType_Bolt11ImplCopyWith<$Res> { + __$$InputType_Bolt11ImplCopyWithImpl(_$InputType_Bolt11Impl _value, + $Res Function(_$InputType_Bolt11Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? invoice = null, + }) { + return _then(_$InputType_Bolt11Impl( + invoice: null == invoice + ? _value.invoice + : invoice // ignore: cast_nullable_to_non_nullable + as LNInvoice, + )); + } +} + +/// @nodoc + +class _$InputType_Bolt11Impl extends InputType_Bolt11 { + const _$InputType_Bolt11Impl({required this.invoice}) : super._(); + + @override + final LNInvoice invoice; + + @override + String toString() { + return 'InputType.bolt11(invoice: $invoice)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_Bolt11Impl && + (identical(other.invoice, invoice) || other.invoice == invoice)); + } + + @override + int get hashCode => Object.hash(runtimeType, invoice); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => + __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return bolt11(invoice); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return bolt11?.call(invoice); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (bolt11 != null) { + return bolt11(invoice); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return bolt11(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return bolt11?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (bolt11 != null) { + return bolt11(this); + } + return orElse(); + } +} + +abstract class InputType_Bolt11 extends InputType { + const factory InputType_Bolt11({required final LNInvoice invoice}) = + _$InputType_Bolt11Impl; + const InputType_Bolt11._() : super._(); + + LNInvoice get invoice; + @JsonKey(ignore: true) + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_NodeIdImplCopyWith<$Res> { + factory _$$InputType_NodeIdImplCopyWith(_$InputType_NodeIdImpl value, + $Res Function(_$InputType_NodeIdImpl) then) = + __$$InputType_NodeIdImplCopyWithImpl<$Res>; + @useResult + $Res call({String nodeId}); +} + +/// @nodoc +class __$$InputType_NodeIdImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> + implements _$$InputType_NodeIdImplCopyWith<$Res> { + __$$InputType_NodeIdImplCopyWithImpl(_$InputType_NodeIdImpl _value, + $Res Function(_$InputType_NodeIdImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? nodeId = null, + }) { + return _then(_$InputType_NodeIdImpl( + nodeId: null == nodeId + ? _value.nodeId + : nodeId // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$InputType_NodeIdImpl extends InputType_NodeId { + const _$InputType_NodeIdImpl({required this.nodeId}) : super._(); + + @override + final String nodeId; + + @override + String toString() { + return 'InputType.nodeId(nodeId: $nodeId)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_NodeIdImpl && + (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); + } + + @override + int get hashCode => Object.hash(runtimeType, nodeId); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => + __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return nodeId(this.nodeId); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return nodeId?.call(this.nodeId); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (nodeId != null) { + return nodeId(this.nodeId); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return nodeId(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return nodeId?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (nodeId != null) { + return nodeId(this); + } + return orElse(); + } +} + +abstract class InputType_NodeId extends InputType { + const factory InputType_NodeId({required final String nodeId}) = + _$InputType_NodeIdImpl; + const InputType_NodeId._() : super._(); + + String get nodeId; + @JsonKey(ignore: true) + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_UrlImplCopyWith<$Res> { + factory _$$InputType_UrlImplCopyWith( + _$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = + __$$InputType_UrlImplCopyWithImpl<$Res>; + @useResult + $Res call({String url}); +} + +/// @nodoc +class __$$InputType_UrlImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> + implements _$$InputType_UrlImplCopyWith<$Res> { + __$$InputType_UrlImplCopyWithImpl( + _$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? url = null, + }) { + return _then(_$InputType_UrlImpl( + url: null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$InputType_UrlImpl extends InputType_Url { + const _$InputType_UrlImpl({required this.url}) : super._(); + + @override + final String url; + + @override + String toString() { + return 'InputType.url(url: $url)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_UrlImpl && + (identical(other.url, url) || other.url == url)); + } + + @override + int get hashCode => Object.hash(runtimeType, url); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => + __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return url(this.url); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return url?.call(this.url); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (url != null) { + return url(this.url); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return url(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return url?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (url != null) { + return url(this); + } + return orElse(); + } +} + +abstract class InputType_Url extends InputType { + const factory InputType_Url({required final String url}) = + _$InputType_UrlImpl; + const InputType_Url._() : super._(); + + String get url; + @JsonKey(ignore: true) + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { + factory _$$InputType_LnUrlPayImplCopyWith(_$InputType_LnUrlPayImpl value, + $Res Function(_$InputType_LnUrlPayImpl) then) = + __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPayRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> + implements _$$InputType_LnUrlPayImplCopyWith<$Res> { + __$$InputType_LnUrlPayImplCopyWithImpl(_$InputType_LnUrlPayImpl _value, + $Res Function(_$InputType_LnUrlPayImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlPayImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPayRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { + const _$InputType_LnUrlPayImpl({required this.data}) : super._(); + + @override + final LnUrlPayRequestData data; + + @override + String toString() { + return 'InputType.lnUrlPay(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlPayImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => + __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlPay(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlPay?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlPay != null) { + return lnUrlPay(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlPay(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlPay?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlPay != null) { + return lnUrlPay(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlPay extends InputType { + const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = + _$InputType_LnUrlPayImpl; + const InputType_LnUrlPay._() : super._(); + + LnUrlPayRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { + factory _$$InputType_LnUrlWithdrawImplCopyWith( + _$InputType_LnUrlWithdrawImpl value, + $Res Function(_$InputType_LnUrlWithdrawImpl) then) = + __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> + implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { + __$$InputType_LnUrlWithdrawImplCopyWithImpl( + _$InputType_LnUrlWithdrawImpl _value, + $Res Function(_$InputType_LnUrlWithdrawImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlWithdrawImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { + const _$InputType_LnUrlWithdrawImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawRequestData data; + + @override + String toString() { + return 'InputType.lnUrlWithdraw(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlWithdrawImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> + get copyWith => __$$InputType_LnUrlWithdrawImplCopyWithImpl< + _$InputType_LnUrlWithdrawImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlWithdraw(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlWithdraw?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlWithdraw != null) { + return lnUrlWithdraw(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlWithdraw(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlWithdraw?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlWithdraw != null) { + return lnUrlWithdraw(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlWithdraw extends InputType { + const factory InputType_LnUrlWithdraw( + {required final LnUrlWithdrawRequestData data}) = + _$InputType_LnUrlWithdrawImpl; + const InputType_LnUrlWithdraw._() : super._(); + + LnUrlWithdrawRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { + factory _$$InputType_LnUrlAuthImplCopyWith(_$InputType_LnUrlAuthImpl value, + $Res Function(_$InputType_LnUrlAuthImpl) then) = + __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlAuthRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> + implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { + __$$InputType_LnUrlAuthImplCopyWithImpl(_$InputType_LnUrlAuthImpl _value, + $Res Function(_$InputType_LnUrlAuthImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlAuthImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlAuthRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { + const _$InputType_LnUrlAuthImpl({required this.data}) : super._(); + + @override + final LnUrlAuthRequestData data; + + @override + String toString() { + return 'InputType.lnUrlAuth(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlAuthImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => + __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlAuth(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlAuth?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlAuth != null) { + return lnUrlAuth(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlAuth(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlAuth?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlAuth != null) { + return lnUrlAuth(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlAuth extends InputType { + const factory InputType_LnUrlAuth( + {required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; + const InputType_LnUrlAuth._() : super._(); + + LnUrlAuthRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { + factory _$$InputType_LnUrlErrorImplCopyWith(_$InputType_LnUrlErrorImpl value, + $Res Function(_$InputType_LnUrlErrorImpl) then) = + __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> + implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { + __$$InputType_LnUrlErrorImplCopyWithImpl(_$InputType_LnUrlErrorImpl _value, + $Res Function(_$InputType_LnUrlErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { + const _$InputType_LnUrlErrorImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'InputType.lnUrlError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> + get copyWith => + __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlError != null) { + return lnUrlError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlError != null) { + return lnUrlError(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlError extends InputType { + const factory InputType_LnUrlError({required final LnUrlErrorData data}) = + _$InputType_LnUrlErrorImpl; + const InputType_LnUrlError._() : super._(); + + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart new file mode 100644 index 000000000..b6c3caddc --- /dev/null +++ b/libs/sdk-flutter/lib/generated/invoice.dart @@ -0,0 +1,143 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Wrapper for a BOLT11 LN invoice +class LNInvoice { + final String bolt11; + final Network network; + final String payeePubkey; + final String paymentHash; + final String? description; + final String? descriptionHash; + final int? amountMsat; + final int timestamp; + final int expiry; + final List routingHints; + final Uint8List paymentSecret; + final int minFinalCltvExpiryDelta; + + const LNInvoice({ + required this.bolt11, + required this.network, + required this.payeePubkey, + required this.paymentHash, + this.description, + this.descriptionHash, + this.amountMsat, + required this.timestamp, + required this.expiry, + required this.routingHints, + required this.paymentSecret, + required this.minFinalCltvExpiryDelta, + }); + + @override + int get hashCode => + bolt11.hashCode ^ + network.hashCode ^ + payeePubkey.hashCode ^ + paymentHash.hashCode ^ + description.hashCode ^ + descriptionHash.hashCode ^ + amountMsat.hashCode ^ + timestamp.hashCode ^ + expiry.hashCode ^ + routingHints.hashCode ^ + paymentSecret.hashCode ^ + minFinalCltvExpiryDelta.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LNInvoice && + runtimeType == other.runtimeType && + bolt11 == other.bolt11 && + network == other.network && + payeePubkey == other.payeePubkey && + paymentHash == other.paymentHash && + description == other.description && + descriptionHash == other.descriptionHash && + amountMsat == other.amountMsat && + timestamp == other.timestamp && + expiry == other.expiry && + routingHints == other.routingHints && + paymentSecret == other.paymentSecret && + minFinalCltvExpiryDelta == other.minFinalCltvExpiryDelta; +} + +/// A route hint for a LN payment +class RouteHint { + final List hops; + + const RouteHint({ + required this.hops, + }); + + @override + int get hashCode => hops.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || other is RouteHint && runtimeType == other.runtimeType && hops == other.hops; +} + +/// Details of a specific hop in a larger route hint +class RouteHintHop { + /// The node_id of the non-target end of the route + final String srcNodeId; + + /// The short_channel_id of this channel + final int shortChannelId; + + /// The fees which must be paid to use this channel + final int feesBaseMsat; + final int feesProportionalMillionths; + + /// The difference in CLTV values between this node and the next node. + final int cltvExpiryDelta; + + /// The minimum value, in msat, which must be relayed to the next hop. + final int? htlcMinimumMsat; + + /// The maximum value in msat available for routing with a single HTLC. + final int? htlcMaximumMsat; + + const RouteHintHop({ + required this.srcNodeId, + required this.shortChannelId, + required this.feesBaseMsat, + required this.feesProportionalMillionths, + required this.cltvExpiryDelta, + this.htlcMinimumMsat, + this.htlcMaximumMsat, + }); + + @override + int get hashCode => + srcNodeId.hashCode ^ + shortChannelId.hashCode ^ + feesBaseMsat.hashCode ^ + feesProportionalMillionths.hashCode ^ + cltvExpiryDelta.hashCode ^ + htlcMinimumMsat.hashCode ^ + htlcMaximumMsat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RouteHintHop && + runtimeType == other.runtimeType && + srcNodeId == other.srcNodeId && + shortChannelId == other.shortChannelId && + feesBaseMsat == other.feesBaseMsat && + feesProportionalMillionths == other.feesProportionalMillionths && + cltvExpiryDelta == other.cltvExpiryDelta && + htlcMinimumMsat == other.htlcMinimumMsat && + htlcMaximumMsat == other.htlcMaximumMsat; +} diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart new file mode 100644 index 000000000..86175b2ee --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart @@ -0,0 +1,164 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import '../../frb_generated.dart'; +import '../../input_parser.dart'; +import '../../models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'model.freezed.dart'; + +/// Wrapper for the decrypted [AesSuccessActionData] payload +class AesSuccessActionDataDecrypted { + /// Contents description, up to 144 characters + final String description; + + /// Decrypted content + final String plaintext; + + const AesSuccessActionDataDecrypted({ + required this.description, + required this.plaintext, + }); + + @override + int get hashCode => description.hashCode ^ plaintext.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AesSuccessActionDataDecrypted && + runtimeType == other.runtimeType && + description == other.description && + plaintext == other.plaintext; +} + +@freezed +sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { + const AesSuccessActionDataResult._(); + + const factory AesSuccessActionDataResult.decrypted({ + required AesSuccessActionDataDecrypted data, + }) = AesSuccessActionDataResult_Decrypted; + const factory AesSuccessActionDataResult.errorStatus({ + required String reason, + }) = AesSuccessActionDataResult_ErrorStatus; +} + +class LnUrlPayErrorData { + final String paymentHash; + final String reason; + + const LnUrlPayErrorData({ + required this.paymentHash, + required this.reason, + }); + + @override + int get hashCode => paymentHash.hashCode ^ reason.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayErrorData && + runtimeType == other.runtimeType && + paymentHash == other.paymentHash && + reason == other.reason; +} + +@freezed +sealed class LnUrlPayResult with _$LnUrlPayResult { + const LnUrlPayResult._(); + + const factory LnUrlPayResult.endpointSuccess({ + required LnUrlPaySuccessData data, + }) = LnUrlPayResult_EndpointSuccess; + const factory LnUrlPayResult.endpointError({ + required LnUrlErrorData data, + }) = LnUrlPayResult_EndpointError; + const factory LnUrlPayResult.payError({ + required LnUrlPayErrorData data, + }) = LnUrlPayResult_PayError; +} + +class LnUrlPaySuccessData { + final Payment payment; + final SuccessActionProcessed? successAction; + + const LnUrlPaySuccessData({ + required this.payment, + this.successAction, + }); + + @override + int get hashCode => payment.hashCode ^ successAction.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPaySuccessData && + runtimeType == other.runtimeType && + payment == other.payment && + successAction == other.successAction; +} + +class MessageSuccessActionData { + final String message; + + const MessageSuccessActionData({ + required this.message, + }); + + @override + int get hashCode => message.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MessageSuccessActionData && runtimeType == other.runtimeType && message == other.message; +} + +@freezed +sealed class SuccessActionProcessed with _$SuccessActionProcessed { + const SuccessActionProcessed._(); + + /// See [SuccessAction::Aes] for received payload + /// + /// See [AesSuccessActionDataDecrypted] for decrypted payload + const factory SuccessActionProcessed.aes({ + required AesSuccessActionDataResult result, + }) = SuccessActionProcessed_Aes; + + /// See [SuccessAction::Message] + const factory SuccessActionProcessed.message({ + required MessageSuccessActionData data, + }) = SuccessActionProcessed_Message; + + /// See [SuccessAction::Url] + const factory SuccessActionProcessed.url({ + required UrlSuccessActionData data, + }) = SuccessActionProcessed_Url; +} + +class UrlSuccessActionData { + final String description; + final String url; + + const UrlSuccessActionData({ + required this.description, + required this.url, + }); + + @override + int get hashCode => description.hashCode ^ url.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is UrlSuccessActionData && + runtimeType == other.runtimeType && + description == other.description && + url == other.url; +} diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart new file mode 100644 index 000000000..decac435a --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart @@ -0,0 +1,1410 @@ +// 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 'model.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 _$AesSuccessActionDataResult { + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) + decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) + errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? + errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AesSuccessActionDataResultCopyWith<$Res> { + factory $AesSuccessActionDataResultCopyWith(AesSuccessActionDataResult value, + $Res Function(AesSuccessActionDataResult) then) = + _$AesSuccessActionDataResultCopyWithImpl<$Res, + AesSuccessActionDataResult>; +} + +/// @nodoc +class _$AesSuccessActionDataResultCopyWithImpl<$Res, + $Val extends AesSuccessActionDataResult> + implements $AesSuccessActionDataResultCopyWith<$Res> { + _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { + factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( + _$AesSuccessActionDataResult_DecryptedImpl value, + $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = + __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; + @useResult + $Res call({AesSuccessActionDataDecrypted data}); +} + +/// @nodoc +class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, + _$AesSuccessActionDataResult_DecryptedImpl> + implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { + __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl( + _$AesSuccessActionDataResult_DecryptedImpl _value, + $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$AesSuccessActionDataResult_DecryptedImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as AesSuccessActionDataDecrypted, + )); + } +} + +/// @nodoc + +class _$AesSuccessActionDataResult_DecryptedImpl + extends AesSuccessActionDataResult_Decrypted { + const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}) + : super._(); + + @override + final AesSuccessActionDataDecrypted data; + + @override + String toString() { + return 'AesSuccessActionDataResult.decrypted(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AesSuccessActionDataResult_DecryptedImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AesSuccessActionDataResult_DecryptedImplCopyWith< + _$AesSuccessActionDataResult_DecryptedImpl> + get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< + _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) { + return decrypted(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) { + return decrypted?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) { + if (decrypted != null) { + return decrypted(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) + decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) + errorStatus, + }) { + return decrypted(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? + errorStatus, + }) { + return decrypted?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (decrypted != null) { + return decrypted(this); + } + return orElse(); + } +} + +abstract class AesSuccessActionDataResult_Decrypted + extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_Decrypted( + {required final AesSuccessActionDataDecrypted data}) = + _$AesSuccessActionDataResult_DecryptedImpl; + const AesSuccessActionDataResult_Decrypted._() : super._(); + + AesSuccessActionDataDecrypted get data; + @JsonKey(ignore: true) + _$$AesSuccessActionDataResult_DecryptedImplCopyWith< + _$AesSuccessActionDataResult_DecryptedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { + factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( + _$AesSuccessActionDataResult_ErrorStatusImpl value, + $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = + __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({String reason}); +} + +/// @nodoc +class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, + _$AesSuccessActionDataResult_ErrorStatusImpl> + implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { + __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( + _$AesSuccessActionDataResult_ErrorStatusImpl _value, + $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? reason = null, + }) { + return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( + reason: null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AesSuccessActionDataResult_ErrorStatusImpl + extends AesSuccessActionDataResult_ErrorStatus { + const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}) + : super._(); + + @override + final String reason; + + @override + String toString() { + return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AesSuccessActionDataResult_ErrorStatusImpl && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< + _$AesSuccessActionDataResult_ErrorStatusImpl> + get copyWith => + __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< + _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) { + return errorStatus(reason); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) { + return errorStatus?.call(reason); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(reason); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) + decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) + errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? + errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class AesSuccessActionDataResult_ErrorStatus + extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_ErrorStatus( + {required final String reason}) = + _$AesSuccessActionDataResult_ErrorStatusImpl; + const AesSuccessActionDataResult_ErrorStatus._() : super._(); + + String get reason; + @JsonKey(ignore: true) + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< + _$AesSuccessActionDataResult_ErrorStatusImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$LnUrlPayResult { + Object get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) + endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlPayResultCopyWith<$Res> { + factory $LnUrlPayResultCopyWith( + LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = + _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; +} + +/// @nodoc +class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> + implements $LnUrlPayResultCopyWith<$Res> { + _$LnUrlPayResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { + factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith( + _$LnUrlPayResult_EndpointSuccessImpl value, + $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPaySuccessData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, + _$LnUrlPayResult_EndpointSuccessImpl> + implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( + _$LnUrlPayResult_EndpointSuccessImpl _value, + $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_EndpointSuccessImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPaySuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_EndpointSuccessImpl + extends LnUrlPayResult_EndpointSuccess { + const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}) : super._(); + + @override + final LnUrlPaySuccessData data; + + @override + String toString() { + return 'LnUrlPayResult.endpointSuccess(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_EndpointSuccessImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_EndpointSuccessImplCopyWith< + _$LnUrlPayResult_EndpointSuccessImpl> + get copyWith => __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl< + _$LnUrlPayResult_EndpointSuccessImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return endpointSuccess(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return endpointSuccess?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (endpointSuccess != null) { + return endpointSuccess(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) + endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return endpointSuccess(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return endpointSuccess?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (endpointSuccess != null) { + return endpointSuccess(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_EndpointSuccess extends LnUrlPayResult { + const factory LnUrlPayResult_EndpointSuccess( + {required final LnUrlPaySuccessData data}) = + _$LnUrlPayResult_EndpointSuccessImpl; + const LnUrlPayResult_EndpointSuccess._() : super._(); + + @override + LnUrlPaySuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_EndpointSuccessImplCopyWith< + _$LnUrlPayResult_EndpointSuccessImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { + factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( + _$LnUrlPayResult_EndpointErrorImpl value, + $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, + _$LnUrlPayResult_EndpointErrorImpl> + implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( + _$LnUrlPayResult_EndpointErrorImpl _value, + $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_EndpointErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { + const _$LnUrlPayResult_EndpointErrorImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlPayResult.endpointError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_EndpointErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_EndpointErrorImplCopyWith< + _$LnUrlPayResult_EndpointErrorImpl> + get copyWith => __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl< + _$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return endpointError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return endpointError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (endpointError != null) { + return endpointError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) + endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return endpointError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return endpointError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (endpointError != null) { + return endpointError(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_EndpointError extends LnUrlPayResult { + const factory LnUrlPayResult_EndpointError( + {required final LnUrlErrorData data}) = + _$LnUrlPayResult_EndpointErrorImpl; + const LnUrlPayResult_EndpointError._() : super._(); + + @override + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_EndpointErrorImplCopyWith< + _$LnUrlPayResult_EndpointErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { + factory _$$LnUrlPayResult_PayErrorImplCopyWith( + _$LnUrlPayResult_PayErrorImpl value, + $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = + __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPayErrorData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> + implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { + __$$LnUrlPayResult_PayErrorImplCopyWithImpl( + _$LnUrlPayResult_PayErrorImpl _value, + $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_PayErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPayErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { + const _$LnUrlPayResult_PayErrorImpl({required this.data}) : super._(); + + @override + final LnUrlPayErrorData data; + + @override + String toString() { + return 'LnUrlPayResult.payError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_PayErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> + get copyWith => __$$LnUrlPayResult_PayErrorImplCopyWithImpl< + _$LnUrlPayResult_PayErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return payError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return payError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (payError != null) { + return payError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) + endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return payError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return payError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (payError != null) { + return payError(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_PayError extends LnUrlPayResult { + const factory LnUrlPayResult_PayError( + {required final LnUrlPayErrorData data}) = _$LnUrlPayResult_PayErrorImpl; + const LnUrlPayResult_PayError._() : super._(); + + @override + LnUrlPayErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$SuccessActionProcessed { + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SuccessActionProcessedCopyWith<$Res> { + factory $SuccessActionProcessedCopyWith(SuccessActionProcessed value, + $Res Function(SuccessActionProcessed) then) = + _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; +} + +/// @nodoc +class _$SuccessActionProcessedCopyWithImpl<$Res, + $Val extends SuccessActionProcessed> + implements $SuccessActionProcessedCopyWith<$Res> { + _$SuccessActionProcessedCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_AesImplCopyWith( + _$SuccessActionProcessed_AesImpl value, + $Res Function(_$SuccessActionProcessed_AesImpl) then) = + __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; + @useResult + $Res call({AesSuccessActionDataResult result}); + + $AesSuccessActionDataResultCopyWith<$Res> get result; +} + +/// @nodoc +class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, + _$SuccessActionProcessed_AesImpl> + implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { + __$$SuccessActionProcessed_AesImplCopyWithImpl( + _$SuccessActionProcessed_AesImpl _value, + $Res Function(_$SuccessActionProcessed_AesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? result = null, + }) { + return _then(_$SuccessActionProcessed_AesImpl( + result: null == result + ? _value.result + : result // ignore: cast_nullable_to_non_nullable + as AesSuccessActionDataResult, + )); + } + + @override + @pragma('vm:prefer-inline') + $AesSuccessActionDataResultCopyWith<$Res> get result { + return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { + return _then(_value.copyWith(result: value)); + }); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_AesImpl extends SuccessActionProcessed_Aes { + const _$SuccessActionProcessed_AesImpl({required this.result}) : super._(); + + @override + final AesSuccessActionDataResult result; + + @override + String toString() { + return 'SuccessActionProcessed.aes(result: $result)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_AesImpl && + (identical(other.result, result) || other.result == result)); + } + + @override + int get hashCode => Object.hash(runtimeType, result); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> + get copyWith => __$$SuccessActionProcessed_AesImplCopyWithImpl< + _$SuccessActionProcessed_AesImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return aes(result); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return aes?.call(result); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (aes != null) { + return aes(result); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return aes(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return aes?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (aes != null) { + return aes(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Aes extends SuccessActionProcessed { + const factory SuccessActionProcessed_Aes( + {required final AesSuccessActionDataResult result}) = + _$SuccessActionProcessed_AesImpl; + const SuccessActionProcessed_Aes._() : super._(); + + AesSuccessActionDataResult get result; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_MessageImplCopyWith( + _$SuccessActionProcessed_MessageImpl value, + $Res Function(_$SuccessActionProcessed_MessageImpl) then) = + __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; + @useResult + $Res call({MessageSuccessActionData data}); +} + +/// @nodoc +class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, + _$SuccessActionProcessed_MessageImpl> + implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { + __$$SuccessActionProcessed_MessageImplCopyWithImpl( + _$SuccessActionProcessed_MessageImpl _value, + $Res Function(_$SuccessActionProcessed_MessageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$SuccessActionProcessed_MessageImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as MessageSuccessActionData, + )); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_MessageImpl + extends SuccessActionProcessed_Message { + const _$SuccessActionProcessed_MessageImpl({required this.data}) : super._(); + + @override + final MessageSuccessActionData data; + + @override + String toString() { + return 'SuccessActionProcessed.message(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_MessageImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_MessageImplCopyWith< + _$SuccessActionProcessed_MessageImpl> + get copyWith => __$$SuccessActionProcessed_MessageImplCopyWithImpl< + _$SuccessActionProcessed_MessageImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return message(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return message?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (message != null) { + return message(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return message(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return message?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (message != null) { + return message(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Message extends SuccessActionProcessed { + const factory SuccessActionProcessed_Message( + {required final MessageSuccessActionData data}) = + _$SuccessActionProcessed_MessageImpl; + const SuccessActionProcessed_Message._() : super._(); + + MessageSuccessActionData get data; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_MessageImplCopyWith< + _$SuccessActionProcessed_MessageImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_UrlImplCopyWith( + _$SuccessActionProcessed_UrlImpl value, + $Res Function(_$SuccessActionProcessed_UrlImpl) then) = + __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; + @useResult + $Res call({UrlSuccessActionData data}); +} + +/// @nodoc +class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, + _$SuccessActionProcessed_UrlImpl> + implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { + __$$SuccessActionProcessed_UrlImplCopyWithImpl( + _$SuccessActionProcessed_UrlImpl _value, + $Res Function(_$SuccessActionProcessed_UrlImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$SuccessActionProcessed_UrlImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as UrlSuccessActionData, + )); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_UrlImpl extends SuccessActionProcessed_Url { + const _$SuccessActionProcessed_UrlImpl({required this.data}) : super._(); + + @override + final UrlSuccessActionData data; + + @override + String toString() { + return 'SuccessActionProcessed.url(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_UrlImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> + get copyWith => __$$SuccessActionProcessed_UrlImplCopyWithImpl< + _$SuccessActionProcessed_UrlImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return url(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return url?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (url != null) { + return url(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return url(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return url?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (url != null) { + return url(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Url extends SuccessActionProcessed { + const factory SuccessActionProcessed_Url( + {required final UrlSuccessActionData data}) = + _$SuccessActionProcessed_UrlImpl; + const SuccessActionProcessed_Url._() : super._(); + + UrlSuccessActionData get data; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart new file mode 100644 index 000000000..cb1055661 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -0,0 +1,84 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; + +/// Details of supported LSP +class LspInformation { + final String id; + + /// The name of of LSP + final String name; + + /// The URL of the LSP + final String widgetUrl; + + /// The identity pubkey of the Lightning node + final String pubkey; + + /// The network location of the lightning node, e.g. `12.34.56.78:9012` or `localhost:10011` + final String host; + + /// The base fee charged regardless of the number of milli-satoshis sent + final int baseFeeMsat; + + /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. + final double feeRate; + + /// The required timelock delta for HTLCs forwarded over the channel + final int timeLockDelta; + + /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel + final int minHtlcMsat; + final Uint8List lspPubkey; + final OpeningFeeParamsMenu openingFeeParamsList; + + const LspInformation({ + required this.id, + required this.name, + required this.widgetUrl, + required this.pubkey, + required this.host, + required this.baseFeeMsat, + required this.feeRate, + required this.timeLockDelta, + required this.minHtlcMsat, + required this.lspPubkey, + required this.openingFeeParamsList, + }); + + @override + int get hashCode => + id.hashCode ^ + name.hashCode ^ + widgetUrl.hashCode ^ + pubkey.hashCode ^ + host.hashCode ^ + baseFeeMsat.hashCode ^ + feeRate.hashCode ^ + timeLockDelta.hashCode ^ + minHtlcMsat.hashCode ^ + lspPubkey.hashCode ^ + openingFeeParamsList.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LspInformation && + runtimeType == other.runtimeType && + id == other.id && + name == other.name && + widgetUrl == other.widgetUrl && + pubkey == other.pubkey && + host == other.host && + baseFeeMsat == other.baseFeeMsat && + feeRate == other.feeRate && + timeLockDelta == other.timeLockDelta && + minHtlcMsat == other.minHtlcMsat && + lspPubkey == other.lspPubkey && + openingFeeParamsList == other.openingFeeParamsList; +} diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart new file mode 100644 index 000000000..c381be374 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -0,0 +1,1954 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'input_parser.dart'; +import 'invoice.dart'; +import 'lnurl/pay/model.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'models.freezed.dart'; + +class BackupStatus { + final bool backedUp; + + /// Epoch time, in seconds + final int? lastBackupTime; + + const BackupStatus({ + required this.backedUp, + this.lastBackupTime, + }); + + @override + int get hashCode => backedUp.hashCode ^ lastBackupTime.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BackupStatus && + runtimeType == other.runtimeType && + backedUp == other.backedUp && + lastBackupTime == other.lastBackupTime; +} + +/// Different providers will demand different behaviours when the user is trying to buy bitcoin. +enum BuyBitcoinProvider { + Moonpay, + ; +} + +class BuyBitcoinRequest { + final BuyBitcoinProvider provider; + final OpeningFeeParams? openingFeeParams; + + const BuyBitcoinRequest({ + required this.provider, + this.openingFeeParams, + }); + + @override + int get hashCode => provider.hashCode ^ openingFeeParams.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BuyBitcoinRequest && + runtimeType == other.runtimeType && + provider == other.provider && + openingFeeParams == other.openingFeeParams; +} + +class BuyBitcoinResponse { + final String url; + final OpeningFeeParams? openingFeeParams; + + const BuyBitcoinResponse({ + required this.url, + this.openingFeeParams, + }); + + @override + int get hashCode => url.hashCode ^ openingFeeParams.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BuyBitcoinResponse && + runtimeType == other.runtimeType && + url == other.url && + openingFeeParams == other.openingFeeParams; +} + +/// State of a Lightning channel +enum ChannelState { + PendingOpen, + Opened, + PendingClose, + Closed, + ; +} + +/// Represents the funds that were on the user side of the channel at the time it was closed. +class ClosedChannelPaymentDetails { + final ChannelState state; + final String fundingTxid; + final String? shortChannelId; + + /// Can be empty for older closed channels. + final String? closingTxid; + + const ClosedChannelPaymentDetails({ + required this.state, + required this.fundingTxid, + this.shortChannelId, + this.closingTxid, + }); + + @override + int get hashCode => state.hashCode ^ fundingTxid.hashCode ^ shortChannelId.hashCode ^ closingTxid.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ClosedChannelPaymentDetails && + runtimeType == other.runtimeType && + state == other.state && + fundingTxid == other.fundingTxid && + shortChannelId == other.shortChannelId && + closingTxid == other.closingTxid; +} + +/// Configuration for the Breez Services +/// +/// Use [Config::production] or [Config::staging] for default configs of the different supported +/// environments. +class Config { + final String breezserver; + final String chainnotifierUrl; + + /// If set, this is the mempool.space URL that will be used. + /// + /// If not set, a list of mempool.space URLs will be used to provide fault-tolerance. If calls + /// to the first URL fail, then the call will be repeated to the next URL, and so on. + /// + /// Note that, if specified, the URL has to be in the format: `https://mempool.space/api` + final String? mempoolspaceUrl; + + /// Directory in which all SDK files (DB, log) are stored. Defaults to ".", otherwise if it's customized, + /// the folder should exist before starting the SDK. + final String workingDir; + final Network network; + final int paymentTimeoutSec; + final String? defaultLspId; + final String? apiKey; + + /// Maps to the CLN `maxfeepercent` config when paying invoices (`lightning-pay`) + final double maxfeePercent; + + /// Maps to the CLN `exemptfee` config when paying invoices (`lightning-pay`) + final int exemptfeeMsat; + final NodeConfig nodeConfig; + + const Config({ + required this.breezserver, + required this.chainnotifierUrl, + this.mempoolspaceUrl, + required this.workingDir, + required this.network, + required this.paymentTimeoutSec, + this.defaultLspId, + this.apiKey, + required this.maxfeePercent, + required this.exemptfeeMsat, + required this.nodeConfig, + }); + + @override + int get hashCode => + breezserver.hashCode ^ + chainnotifierUrl.hashCode ^ + mempoolspaceUrl.hashCode ^ + workingDir.hashCode ^ + network.hashCode ^ + paymentTimeoutSec.hashCode ^ + defaultLspId.hashCode ^ + apiKey.hashCode ^ + maxfeePercent.hashCode ^ + exemptfeeMsat.hashCode ^ + nodeConfig.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Config && + runtimeType == other.runtimeType && + breezserver == other.breezserver && + chainnotifierUrl == other.chainnotifierUrl && + mempoolspaceUrl == other.mempoolspaceUrl && + workingDir == other.workingDir && + network == other.network && + paymentTimeoutSec == other.paymentTimeoutSec && + defaultLspId == other.defaultLspId && + apiKey == other.apiKey && + maxfeePercent == other.maxfeePercent && + exemptfeeMsat == other.exemptfeeMsat && + nodeConfig == other.nodeConfig; +} + +/// Represents a configure node request. +class ConfigureNodeRequest { + final String? closeToAddress; + + const ConfigureNodeRequest({ + this.closeToAddress, + }); + + @override + int get hashCode => closeToAddress.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ConfigureNodeRequest && + runtimeType == other.runtimeType && + closeToAddress == other.closeToAddress; +} + +/// Represents a connect request. +class ConnectRequest { + final Config config; + final Uint8List seed; + + /// If true, only restores an existing node and otherwise result in an error + final bool? restoreOnly; + + const ConnectRequest({ + required this.config, + required this.seed, + this.restoreOnly, + }); + + @override + int get hashCode => config.hashCode ^ seed.hashCode ^ restoreOnly.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ConnectRequest && + runtimeType == other.runtimeType && + config == other.config && + seed == other.seed && + restoreOnly == other.restoreOnly; +} + +/// Indicates the different kinds of supported environments for [crate::BreezServices]. +enum EnvironmentType { + Production, + Staging, + ; +} + +/// Client-specific credentials to connect to and manage a Greenlight node in the cloud +class GreenlightCredentials { + final Uint8List deviceKey; + final Uint8List deviceCert; + + const GreenlightCredentials({ + required this.deviceKey, + required this.deviceCert, + }); + + @override + int get hashCode => deviceKey.hashCode ^ deviceCert.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GreenlightCredentials && + runtimeType == other.runtimeType && + deviceKey == other.deviceKey && + deviceCert == other.deviceCert; +} + +class GreenlightNodeConfig { + final GreenlightCredentials? partnerCredentials; + final String? inviteCode; + + const GreenlightNodeConfig({ + this.partnerCredentials, + this.inviteCode, + }); + + @override + int get hashCode => partnerCredentials.hashCode ^ inviteCode.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GreenlightNodeConfig && + runtimeType == other.runtimeType && + partnerCredentials == other.partnerCredentials && + inviteCode == other.inviteCode; +} + +/// Indicates the different service health check statuses. +enum HealthCheckStatus { + Operational, + Maintenance, + ServiceDisruption, + ; +} + +/// Represents a list payments request. +class ListPaymentsRequest { + final List? filters; + final List? metadataFilters; + + /// Epoch time, in seconds + final int? fromTimestamp; + + /// Epoch time, in seconds + final int? toTimestamp; + final bool? includeFailures; + final int? offset; + final int? limit; + + const ListPaymentsRequest({ + this.filters, + this.metadataFilters, + this.fromTimestamp, + this.toTimestamp, + this.includeFailures, + this.offset, + this.limit, + }); + + @override + int get hashCode => + filters.hashCode ^ + metadataFilters.hashCode ^ + fromTimestamp.hashCode ^ + toTimestamp.hashCode ^ + includeFailures.hashCode ^ + offset.hashCode ^ + limit.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ListPaymentsRequest && + runtimeType == other.runtimeType && + filters == other.filters && + metadataFilters == other.metadataFilters && + fromTimestamp == other.fromTimestamp && + toTimestamp == other.toTimestamp && + includeFailures == other.includeFailures && + offset == other.offset && + limit == other.limit; +} + +/// Details of a LN payment, as included in a [Payment] +class LnPaymentDetails { + final String paymentHash; + final String label; + final String destinationPubkey; + final String paymentPreimage; + final bool keysend; + final String bolt11; + + /// Only set for [PaymentType::Received], payments which require to open a channel. + /// Represents the actual invoice paid by the sender + final String? openChannelBolt11; + + /// Only set for [PaymentType::Sent] payments that are part of a LNURL-pay workflow where + /// the endpoint returns a success action + final SuccessActionProcessed? lnurlSuccessAction; + + /// Only set for [PaymentType::Sent] payments if it is not a payment to a Lightning Address + final String? lnurlPayDomain; + + /// Only set for [PaymentType::Sent] payments that are sent to a Lightning Address + final String? lnAddress; + + /// Only set for [PaymentType::Sent] payments where the receiver endpoint returned LNURL metadata + final String? lnurlMetadata; + + /// Only set for [PaymentType::Received] payments that were received as part of LNURL-withdraw + final String? lnurlWithdrawEndpoint; + + /// Only set for [PaymentType::Received] payments that were received in the context of a swap + final SwapInfo? swapInfo; + + /// Only set for [PaymentType::Sent] payments that were sent in the context of a reverse swap + final ReverseSwapInfo? reverseSwapInfo; + + /// Only set for [PaymentStatus::Pending] payments that are inflight. + final int? pendingExpirationBlock; + + const LnPaymentDetails({ + required this.paymentHash, + required this.label, + required this.destinationPubkey, + required this.paymentPreimage, + required this.keysend, + required this.bolt11, + this.openChannelBolt11, + this.lnurlSuccessAction, + this.lnurlPayDomain, + this.lnAddress, + this.lnurlMetadata, + this.lnurlWithdrawEndpoint, + this.swapInfo, + this.reverseSwapInfo, + this.pendingExpirationBlock, + }); + + @override + int get hashCode => + paymentHash.hashCode ^ + label.hashCode ^ + destinationPubkey.hashCode ^ + paymentPreimage.hashCode ^ + keysend.hashCode ^ + bolt11.hashCode ^ + openChannelBolt11.hashCode ^ + lnurlSuccessAction.hashCode ^ + lnurlPayDomain.hashCode ^ + lnAddress.hashCode ^ + lnurlMetadata.hashCode ^ + lnurlWithdrawEndpoint.hashCode ^ + swapInfo.hashCode ^ + reverseSwapInfo.hashCode ^ + pendingExpirationBlock.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnPaymentDetails && + runtimeType == other.runtimeType && + paymentHash == other.paymentHash && + label == other.label && + destinationPubkey == other.destinationPubkey && + paymentPreimage == other.paymentPreimage && + keysend == other.keysend && + bolt11 == other.bolt11 && + openChannelBolt11 == other.openChannelBolt11 && + lnurlSuccessAction == other.lnurlSuccessAction && + lnurlPayDomain == other.lnurlPayDomain && + lnAddress == other.lnAddress && + lnurlMetadata == other.lnurlMetadata && + lnurlWithdrawEndpoint == other.lnurlWithdrawEndpoint && + swapInfo == other.swapInfo && + reverseSwapInfo == other.reverseSwapInfo && + pendingExpirationBlock == other.pendingExpirationBlock; +} + +@freezed +sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { + const LnUrlCallbackStatus._(); + + /// On-wire format is: `{"status": "OK"}` + const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; + + /// On-wire format is: `{"status": "ERROR", "reason": "error details..."}` + const factory LnUrlCallbackStatus.errorStatus({ + required LnUrlErrorData data, + }) = LnUrlCallbackStatus_ErrorStatus; +} + +/// Represents a LNURL-pay request. +class LnUrlPayRequest { + /// The [LnUrlPayRequestData] returned by [crate::input_parser::parse] + final LnUrlPayRequestData data; + + /// The amount in millisatoshis for this payment + final int amountMsat; + + /// An optional comment for this payment + final String? comment; + + /// The external label or identifier of the [Payment] + final String? paymentLabel; + + const LnUrlPayRequest({ + required this.data, + required this.amountMsat, + this.comment, + this.paymentLabel, + }); + + @override + int get hashCode => data.hashCode ^ amountMsat.hashCode ^ comment.hashCode ^ paymentLabel.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayRequest && + runtimeType == other.runtimeType && + data == other.data && + amountMsat == other.amountMsat && + comment == other.comment && + paymentLabel == other.paymentLabel; +} + +class LnUrlWithdrawRequest { + /// Request data containing information on how to call the lnurl withdraw + /// endpoint. Typically retrieved by calling `parse()` on a lnurl withdraw + /// input. + final LnUrlWithdrawRequestData data; + + /// The amount to withdraw from the lnurl withdraw endpoint. Must be between + /// `min_withdrawable` and `max_withdrawable`. + final int amountMsat; + + /// Optional description that will be put in the payment request for the + /// lnurl withdraw endpoint. + final String? description; + + const LnUrlWithdrawRequest({ + required this.data, + required this.amountMsat, + this.description, + }); + + @override + int get hashCode => data.hashCode ^ amountMsat.hashCode ^ description.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawRequest && + runtimeType == other.runtimeType && + data == other.data && + amountMsat == other.amountMsat && + description == other.description; +} + +@freezed +sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { + const LnUrlWithdrawResult._(); + + const factory LnUrlWithdrawResult.ok({ + required LnUrlWithdrawSuccessData data, + }) = LnUrlWithdrawResult_Ok; + const factory LnUrlWithdrawResult.errorStatus({ + required LnUrlErrorData data, + }) = LnUrlWithdrawResult_ErrorStatus; +} + +class LnUrlWithdrawSuccessData { + final LNInvoice invoice; + + const LnUrlWithdrawSuccessData({ + required this.invoice, + }); + + @override + int get hashCode => invoice.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawSuccessData && runtimeType == other.runtimeType && invoice == other.invoice; +} + +/// Internal SDK log entry +class LogEntry { + final String line; + final String level; + + const LogEntry({ + required this.line, + required this.level, + }); + + @override + int get hashCode => line.hashCode ^ level.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LogEntry && runtimeType == other.runtimeType && line == other.line && level == other.level; +} + +class MaxReverseSwapAmountResponse { + /// The total sats that can be sent onchain. + final int totalSat; + + const MaxReverseSwapAmountResponse({ + required this.totalSat, + }); + + @override + int get hashCode => totalSat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MaxReverseSwapAmountResponse && runtimeType == other.runtimeType && totalSat == other.totalSat; +} + +/// A metadata filter which can be applied when retrieving the transaction list +class MetadataFilter { + /// Specifies which field to apply the filter on, using the JSON path format + final String jsonPath; + + /// Specifies which JSON value to filter for. + /// As such, strings must be wrapped with quotes ("") in order to be properly filtered + final String jsonValue; + + const MetadataFilter({ + required this.jsonPath, + required this.jsonValue, + }); + + @override + int get hashCode => jsonPath.hashCode ^ jsonValue.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MetadataFilter && + runtimeType == other.runtimeType && + jsonPath == other.jsonPath && + jsonValue == other.jsonValue; +} + +/// The different supported bitcoin networks +enum Network { + /// Mainnet + Bitcoin, + Testnet, + Signet, + Regtest, + ; +} + +@freezed +sealed class NodeConfig with _$NodeConfig { + const NodeConfig._(); + + const factory NodeConfig.greenlight({ + required GreenlightNodeConfig config, + }) = NodeConfig_Greenlight; +} + +@freezed +sealed class NodeCredentials with _$NodeCredentials { + const NodeCredentials._(); + + const factory NodeCredentials.greenlight({ + required GreenlightCredentials credentials, + }) = NodeCredentials_Greenlight; +} + +/// The node state of a Greenlight LN node running in the cloud. +/// +/// Note: The implementation attempts to provide the most up-to-date values, +/// which may result in some short-lived inconsistencies +/// (e.g., `channels_balance_msat` may be updated before `inbound_liquidity_msats`). +class NodeState { + final String id; + final int blockHeight; + final int channelsBalanceMsat; + final int onchainBalanceMsat; + final int pendingOnchainBalanceMsat; + final List utxos; + final int maxPayableMsat; + final int maxReceivableMsat; + final int maxSinglePaymentAmountMsat; + final int maxChanReserveMsats; + final List connectedPeers; + final int inboundLiquidityMsats; + + const NodeState({ + required this.id, + required this.blockHeight, + required this.channelsBalanceMsat, + required this.onchainBalanceMsat, + required this.pendingOnchainBalanceMsat, + required this.utxos, + required this.maxPayableMsat, + required this.maxReceivableMsat, + required this.maxSinglePaymentAmountMsat, + required this.maxChanReserveMsats, + required this.connectedPeers, + required this.inboundLiquidityMsats, + }); + + @override + int get hashCode => + id.hashCode ^ + blockHeight.hashCode ^ + channelsBalanceMsat.hashCode ^ + onchainBalanceMsat.hashCode ^ + pendingOnchainBalanceMsat.hashCode ^ + utxos.hashCode ^ + maxPayableMsat.hashCode ^ + maxReceivableMsat.hashCode ^ + maxSinglePaymentAmountMsat.hashCode ^ + maxChanReserveMsats.hashCode ^ + connectedPeers.hashCode ^ + inboundLiquidityMsats.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is NodeState && + runtimeType == other.runtimeType && + id == other.id && + blockHeight == other.blockHeight && + channelsBalanceMsat == other.channelsBalanceMsat && + onchainBalanceMsat == other.onchainBalanceMsat && + pendingOnchainBalanceMsat == other.pendingOnchainBalanceMsat && + utxos == other.utxos && + maxPayableMsat == other.maxPayableMsat && + maxReceivableMsat == other.maxReceivableMsat && + maxSinglePaymentAmountMsat == other.maxSinglePaymentAmountMsat && + maxChanReserveMsats == other.maxChanReserveMsats && + connectedPeers == other.connectedPeers && + inboundLiquidityMsats == other.inboundLiquidityMsats; +} + +class OnchainPaymentLimitsResponse { + /// Minimum amount that can be sent. This value is influenced by + /// - what can be sent given the available channels and balance + /// - the lower limit of what the reverse swap service accepts as a send amount + final int minSat; + + /// Maximum amount that can be sent. This value is influenced by + /// - what can be sent given the available channels and balance + /// - the upper limit of what the reverse swap service accepts as a send amount + final int maxSat; + + const OnchainPaymentLimitsResponse({ + required this.minSat, + required this.maxSat, + }); + + @override + int get hashCode => minSat.hashCode ^ maxSat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OnchainPaymentLimitsResponse && + runtimeType == other.runtimeType && + minSat == other.minSat && + maxSat == other.maxSat; +} + +class OpenChannelFeeRequest { + final int? amountMsat; + final int? expiry; + + const OpenChannelFeeRequest({ + this.amountMsat, + this.expiry, + }); + + @override + int get hashCode => amountMsat.hashCode ^ expiry.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OpenChannelFeeRequest && + runtimeType == other.runtimeType && + amountMsat == other.amountMsat && + expiry == other.expiry; +} + +class OpenChannelFeeResponse { + /// Opening fee for receiving the amount set in the [OpenChannelFeeRequest], in case it was set. + /// It may be zero if no new channel needs to be opened. + final int? feeMsat; + + /// The fee params for receiving more than the current inbound liquidity. + final OpeningFeeParams feeParams; + + const OpenChannelFeeResponse({ + this.feeMsat, + required this.feeParams, + }); + + @override + int get hashCode => feeMsat.hashCode ^ feeParams.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OpenChannelFeeResponse && + runtimeType == other.runtimeType && + feeMsat == other.feeMsat && + feeParams == other.feeParams; +} + +/// Dynamic fee parameters offered by the LSP for opening a new channel. +/// +/// After they are received, the client shouldn't change them when calling LSP methods, +/// otherwise the LSP may reject the call. +class OpeningFeeParams { + /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel + final int minMsat; + + /// The fee in ppm charged over liquidity when buying a channel + final int proportional; + + /// The date and time this opening fee params promise expires, in RFC 3339 / ISO 8601 format + final String validUntil; + + /// The channel can be closed if not used within this duration in blocks + final int maxIdleTime; + final int maxClientToSelfDelay; + final String promise; + + const OpeningFeeParams({ + required this.minMsat, + required this.proportional, + required this.validUntil, + required this.maxIdleTime, + required this.maxClientToSelfDelay, + required this.promise, + }); + + @override + int get hashCode => + minMsat.hashCode ^ + proportional.hashCode ^ + validUntil.hashCode ^ + maxIdleTime.hashCode ^ + maxClientToSelfDelay.hashCode ^ + promise.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OpeningFeeParams && + runtimeType == other.runtimeType && + minMsat == other.minMsat && + proportional == other.proportional && + validUntil == other.validUntil && + maxIdleTime == other.maxIdleTime && + maxClientToSelfDelay == other.maxClientToSelfDelay && + promise == other.promise; +} + +/// See [OpeningFeeParamsMenu::try_from] +class OpeningFeeParamsMenu { + final List values; + + const OpeningFeeParamsMenu({ + required this.values, + }); + + @override + int get hashCode => values.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is OpeningFeeParamsMenu && runtimeType == other.runtimeType && values == other.values; +} + +class PayOnchainRequest { + final String recipientAddress; + final PrepareOnchainPaymentResponse prepareRes; + + const PayOnchainRequest({ + required this.recipientAddress, + required this.prepareRes, + }); + + @override + int get hashCode => recipientAddress.hashCode ^ prepareRes.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PayOnchainRequest && + runtimeType == other.runtimeType && + recipientAddress == other.recipientAddress && + prepareRes == other.prepareRes; +} + +class PayOnchainResponse { + final ReverseSwapInfo reverseSwapInfo; + + const PayOnchainResponse({ + required this.reverseSwapInfo, + }); + + @override + int get hashCode => reverseSwapInfo.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PayOnchainResponse && + runtimeType == other.runtimeType && + reverseSwapInfo == other.reverseSwapInfo; +} + +/// Represents a payment, including its [PaymentType] and [PaymentDetails] +class Payment { + final String id; + final PaymentType paymentType; + + /// Epoch time, in seconds + final int paymentTime; + final int amountMsat; + final int feeMsat; + final PaymentStatus status; + final String? error; + final String? description; + final PaymentDetails details; + final String? metadata; + + const Payment({ + required this.id, + required this.paymentType, + required this.paymentTime, + required this.amountMsat, + required this.feeMsat, + required this.status, + this.error, + this.description, + required this.details, + this.metadata, + }); + + @override + int get hashCode => + id.hashCode ^ + paymentType.hashCode ^ + paymentTime.hashCode ^ + amountMsat.hashCode ^ + feeMsat.hashCode ^ + status.hashCode ^ + error.hashCode ^ + description.hashCode ^ + details.hashCode ^ + metadata.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Payment && + runtimeType == other.runtimeType && + id == other.id && + paymentType == other.paymentType && + paymentTime == other.paymentTime && + amountMsat == other.amountMsat && + feeMsat == other.feeMsat && + status == other.status && + error == other.error && + description == other.description && + details == other.details && + metadata == other.metadata; +} + +@freezed +sealed class PaymentDetails with _$PaymentDetails { + const PaymentDetails._(); + + const factory PaymentDetails.ln({ + required LnPaymentDetails data, + }) = PaymentDetails_Ln; + const factory PaymentDetails.closedChannel({ + required ClosedChannelPaymentDetails data, + }) = PaymentDetails_ClosedChannel; +} + +/// The status of a payment +enum PaymentStatus { + Pending, + Complete, + Failed, + ; +} + +/// Different types of supported payments +enum PaymentType { + Sent, + Received, + ClosedChannel, + ; +} + +/// Different types of supported filters which can be applied when retrieving the transaction list +enum PaymentTypeFilter { + Sent, + Received, + ClosedChannel, + ; +} + +/// See [ReverseSwapFeesRequest] +class PrepareOnchainPaymentRequest { + /// Depending on `amount_type`, this may be the desired send amount or the desired receive amount. + final int amountSat; + final SwapAmountType amountType; + + /// Feerate (sat / vByte) for the claim transaction + final int claimTxFeerate; + + const PrepareOnchainPaymentRequest({ + required this.amountSat, + required this.amountType, + required this.claimTxFeerate, + }); + + @override + int get hashCode => amountSat.hashCode ^ amountType.hashCode ^ claimTxFeerate.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareOnchainPaymentRequest && + runtimeType == other.runtimeType && + amountSat == other.amountSat && + amountType == other.amountType && + claimTxFeerate == other.claimTxFeerate; +} + +/// Contains fields describing the reverse swap parameters (see [ReverseSwapPairInfo]), as well as +/// the resulting send and receive amounts. +class PrepareOnchainPaymentResponse { + final String feesHash; + final double feesPercentage; + final int feesLockup; + final int feesClaim; + final int senderAmountSat; + final int recipientAmountSat; + final int totalFees; + + const PrepareOnchainPaymentResponse({ + required this.feesHash, + required this.feesPercentage, + required this.feesLockup, + required this.feesClaim, + required this.senderAmountSat, + required this.recipientAmountSat, + required this.totalFees, + }); + + @override + int get hashCode => + feesHash.hashCode ^ + feesPercentage.hashCode ^ + feesLockup.hashCode ^ + feesClaim.hashCode ^ + senderAmountSat.hashCode ^ + recipientAmountSat.hashCode ^ + totalFees.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareOnchainPaymentResponse && + runtimeType == other.runtimeType && + feesHash == other.feesHash && + feesPercentage == other.feesPercentage && + feesLockup == other.feesLockup && + feesClaim == other.feesClaim && + senderAmountSat == other.senderAmountSat && + recipientAmountSat == other.recipientAmountSat && + totalFees == other.totalFees; +} + +/// We need to prepare a redeem_onchain_funds transaction to know what fee will be charged in satoshis. +/// This model holds the request data which consists of the address to redeem on-chain funds to and the fee rate in. +/// satoshis per vbyte which will be converted to absolute satoshis. +class PrepareRedeemOnchainFundsRequest { + final String toAddress; + final int satPerVbyte; + + const PrepareRedeemOnchainFundsRequest({ + required this.toAddress, + required this.satPerVbyte, + }); + + @override + int get hashCode => toAddress.hashCode ^ satPerVbyte.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareRedeemOnchainFundsRequest && + runtimeType == other.runtimeType && + toAddress == other.toAddress && + satPerVbyte == other.satPerVbyte; +} + +/// We need to prepare a redeem_onchain_funds transaction to know what a fee it will be charged in satoshis +/// this model holds the response data, which consists of the weight and the absolute fee in sats +class PrepareRedeemOnchainFundsResponse { + final int txWeight; + final int txFeeSat; + + const PrepareRedeemOnchainFundsResponse({ + required this.txWeight, + required this.txFeeSat, + }); + + @override + int get hashCode => txWeight.hashCode ^ txFeeSat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareRedeemOnchainFundsResponse && + runtimeType == other.runtimeType && + txWeight == other.txWeight && + txFeeSat == other.txFeeSat; +} + +class PrepareRefundRequest { + final String swapAddress; + final String toAddress; + final int satPerVbyte; + + const PrepareRefundRequest({ + required this.swapAddress, + required this.toAddress, + required this.satPerVbyte, + }); + + @override + int get hashCode => swapAddress.hashCode ^ toAddress.hashCode ^ satPerVbyte.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareRefundRequest && + runtimeType == other.runtimeType && + swapAddress == other.swapAddress && + toAddress == other.toAddress && + satPerVbyte == other.satPerVbyte; +} + +class PrepareRefundResponse { + final int refundTxWeight; + final int refundTxFeeSat; + + const PrepareRefundResponse({ + required this.refundTxWeight, + required this.refundTxFeeSat, + }); + + @override + int get hashCode => refundTxWeight.hashCode ^ refundTxFeeSat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PrepareRefundResponse && + runtimeType == other.runtimeType && + refundTxWeight == other.refundTxWeight && + refundTxFeeSat == other.refundTxFeeSat; +} + +class ReceiveOnchainRequest { + final OpeningFeeParams? openingFeeParams; + + const ReceiveOnchainRequest({ + this.openingFeeParams, + }); + + @override + int get hashCode => openingFeeParams.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReceiveOnchainRequest && + runtimeType == other.runtimeType && + openingFeeParams == other.openingFeeParams; +} + +/// Represents a receive payment request. +class ReceivePaymentRequest { + /// The amount in satoshis for this payment request + final int amountMsat; + + /// The description for this payment request. + final String description; + + /// Optional preimage for this payment request. + /// If specified, it will be used instead of generating a new one. + final Uint8List? preimage; + + /// If set and valid, these fess options are used when a new channels is needed. + /// Otherwise the default fee options will be used. + final OpeningFeeParams? openingFeeParams; + + /// If set to true, then the bolt11 invoice returned includes the description hash. + final bool? useDescriptionHash; + + /// if specified, set the time the invoice is valid for, in seconds. + final int? expiry; + + /// if specified, sets the min_final_cltv_expiry for the invoice + final int? cltv; + + const ReceivePaymentRequest({ + required this.amountMsat, + required this.description, + this.preimage, + this.openingFeeParams, + this.useDescriptionHash, + this.expiry, + this.cltv, + }); + + @override + int get hashCode => + amountMsat.hashCode ^ + description.hashCode ^ + preimage.hashCode ^ + openingFeeParams.hashCode ^ + useDescriptionHash.hashCode ^ + expiry.hashCode ^ + cltv.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReceivePaymentRequest && + runtimeType == other.runtimeType && + amountMsat == other.amountMsat && + description == other.description && + preimage == other.preimage && + openingFeeParams == other.openingFeeParams && + useDescriptionHash == other.useDescriptionHash && + expiry == other.expiry && + cltv == other.cltv; +} + +/// Represents a receive payment response. +/// +/// Breez SDK may have to open a new channel to receive this payment. In that case, the channel will +/// be opened automatically when the invoice is paid, and the fees will be described in the +/// `opening_fee_params` and `opening_fee_msat` fields. +class ReceivePaymentResponse { + /// The generated invoice, including any necessary routing hints + final LNInvoice lnInvoice; + + /// If set, these are the [OpeningFeeParams] used to calculate the channel opening fees. + final OpeningFeeParams? openingFeeParams; + + /// If set, this is the channel opening fee that will be deduced from the invoice amount. + final int? openingFeeMsat; + + const ReceivePaymentResponse({ + required this.lnInvoice, + this.openingFeeParams, + this.openingFeeMsat, + }); + + @override + int get hashCode => lnInvoice.hashCode ^ openingFeeParams.hashCode ^ openingFeeMsat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReceivePaymentResponse && + runtimeType == other.runtimeType && + lnInvoice == other.lnInvoice && + openingFeeParams == other.openingFeeParams && + openingFeeMsat == other.openingFeeMsat; +} + +class RedeemOnchainFundsRequest { + final String toAddress; + final int satPerVbyte; + + const RedeemOnchainFundsRequest({ + required this.toAddress, + required this.satPerVbyte, + }); + + @override + int get hashCode => toAddress.hashCode ^ satPerVbyte.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RedeemOnchainFundsRequest && + runtimeType == other.runtimeType && + toAddress == other.toAddress && + satPerVbyte == other.satPerVbyte; +} + +class RedeemOnchainFundsResponse { + final Uint8List txid; + + const RedeemOnchainFundsResponse({ + required this.txid, + }); + + @override + int get hashCode => txid.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RedeemOnchainFundsResponse && runtimeType == other.runtimeType && txid == other.txid; +} + +class RefundRequest { + final String swapAddress; + final String toAddress; + final int satPerVbyte; + + const RefundRequest({ + required this.swapAddress, + required this.toAddress, + required this.satPerVbyte, + }); + + @override + int get hashCode => swapAddress.hashCode ^ toAddress.hashCode ^ satPerVbyte.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RefundRequest && + runtimeType == other.runtimeType && + swapAddress == other.swapAddress && + toAddress == other.toAddress && + satPerVbyte == other.satPerVbyte; +} + +class RefundResponse { + final String refundTxId; + + const RefundResponse({ + required this.refundTxId, + }); + + @override + int get hashCode => refundTxId.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RefundResponse && runtimeType == other.runtimeType && refundTxId == other.refundTxId; +} + +@freezed +sealed class ReportIssueRequest with _$ReportIssueRequest { + const ReportIssueRequest._(); + + const factory ReportIssueRequest.paymentFailure({ + required ReportPaymentFailureDetails data, + }) = ReportIssueRequest_PaymentFailure; +} + +class ReportPaymentFailureDetails { + /// The payment hash of the payment failure + final String paymentHash; + + /// The comment or error text + final String? comment; + + const ReportPaymentFailureDetails({ + required this.paymentHash, + this.comment, + }); + + @override + int get hashCode => paymentHash.hashCode ^ comment.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReportPaymentFailureDetails && + runtimeType == other.runtimeType && + paymentHash == other.paymentHash && + comment == other.comment; +} + +class ReverseSwapFeesRequest { + /// Amount to be sent + final int? sendAmountSat; + + /// Feerate (sat / vByte) for the claim transaction + final int? claimTxFeerate; + + const ReverseSwapFeesRequest({ + this.sendAmountSat, + this.claimTxFeerate, + }); + + @override + int get hashCode => sendAmountSat.hashCode ^ claimTxFeerate.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReverseSwapFeesRequest && + runtimeType == other.runtimeType && + sendAmountSat == other.sendAmountSat && + claimTxFeerate == other.claimTxFeerate; +} + +/// Simplified version of [FullReverseSwapInfo], containing only the user-relevant fields +class ReverseSwapInfo { + final String id; + final String claimPubkey; + + /// The lockup tx id, available from the moment the lockup tx is seen in the mempool by the SDK + final String? lockupTxid; + + /// The claim tx id, available from the moment the claim tx is broadcast by the SDK + final String? claimTxid; + final int onchainAmountSat; + final ReverseSwapStatus status; + + const ReverseSwapInfo({ + required this.id, + required this.claimPubkey, + this.lockupTxid, + this.claimTxid, + required this.onchainAmountSat, + required this.status, + }); + + @override + int get hashCode => + id.hashCode ^ + claimPubkey.hashCode ^ + lockupTxid.hashCode ^ + claimTxid.hashCode ^ + onchainAmountSat.hashCode ^ + status.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReverseSwapInfo && + runtimeType == other.runtimeType && + id == other.id && + claimPubkey == other.claimPubkey && + lockupTxid == other.lockupTxid && + claimTxid == other.claimTxid && + onchainAmountSat == other.onchainAmountSat && + status == other.status; +} + +/// Details about the reverse swap fees and parameters, at this point in time +class ReverseSwapPairInfo { + /// Minimum amount of sats a reverse swap is allowed to have given the current feerate conditions + final int min; + + /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions + final int max; + + /// Hash of the pair info JSON + final String feesHash; + + /// Percentage fee for the reverse swap service + final double feesPercentage; + + /// Miner fees in sats for locking up funds + final int feesLockup; + + /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. + final int feesClaim; + + /// Total fees for the reverse swap, in sats, based on the given send amount. + /// + /// The field is set only when the [ReverseSwapFeesRequest] `send_amount_sat` is known. + /// + /// If the [ReverseSwapFeesRequest] has the `claim_tx_feerate` empty, this is an estimate. If + /// the `claim_tx_feerate` is set, this is the exact value of the total reverse swap fees. + final int? totalFees; + + const ReverseSwapPairInfo({ + required this.min, + required this.max, + required this.feesHash, + required this.feesPercentage, + required this.feesLockup, + required this.feesClaim, + this.totalFees, + }); + + @override + int get hashCode => + min.hashCode ^ + max.hashCode ^ + feesHash.hashCode ^ + feesPercentage.hashCode ^ + feesLockup.hashCode ^ + feesClaim.hashCode ^ + totalFees.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ReverseSwapPairInfo && + runtimeType == other.runtimeType && + min == other.min && + max == other.max && + feesHash == other.feesHash && + feesPercentage == other.feesPercentage && + feesLockup == other.feesLockup && + feesClaim == other.feesClaim && + totalFees == other.totalFees; +} + +/// The possible statuses of a reverse swap, from the Breez SDK perspective. +/// +/// See [BoltzApiReverseSwapStatus] for the reverse swap status from the Breez endpoint point of view. +enum ReverseSwapStatus { + /// HODL invoice payment is not completed yet + /// + /// This is also the temporary status of a reverse swap when restoring a node, until `sync` finishes. + Initial, + + /// HODL invoice payment was successfully triggered and confirmed by Boltz, but the reverse swap + /// is not yet complete + InProgress, + + /// An explicit error occurs (validation error, failure reported by Boltz, expiration, etc) and + /// the initial invoice funds are returned to the sender (invoice is cancelled or payment failed) + Cancelled, + + /// Successfully completed (claim tx has been seen in the mempool) + CompletedSeen, + + /// Successfully completed (claim tx has at least one confirmation) + CompletedConfirmed, + ; +} + +class SendOnchainRequest { + final int amountSat; + final String onchainRecipientAddress; + final String pairHash; + final int satPerVbyte; + + const SendOnchainRequest({ + required this.amountSat, + required this.onchainRecipientAddress, + required this.pairHash, + required this.satPerVbyte, + }); + + @override + int get hashCode => + amountSat.hashCode ^ onchainRecipientAddress.hashCode ^ pairHash.hashCode ^ satPerVbyte.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SendOnchainRequest && + runtimeType == other.runtimeType && + amountSat == other.amountSat && + onchainRecipientAddress == other.onchainRecipientAddress && + pairHash == other.pairHash && + satPerVbyte == other.satPerVbyte; +} + +class SendOnchainResponse { + final ReverseSwapInfo reverseSwapInfo; + + const SendOnchainResponse({ + required this.reverseSwapInfo, + }); + + @override + int get hashCode => reverseSwapInfo.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SendOnchainResponse && + runtimeType == other.runtimeType && + reverseSwapInfo == other.reverseSwapInfo; +} + +/// Represents a send payment request. +class SendPaymentRequest { + /// The bolt11 invoice + final String bolt11; + + /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. + final int? amountMsat; + + /// The external label or identifier of the [Payment] + final String? label; + + const SendPaymentRequest({ + required this.bolt11, + this.amountMsat, + this.label, + }); + + @override + int get hashCode => bolt11.hashCode ^ amountMsat.hashCode ^ label.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SendPaymentRequest && + runtimeType == other.runtimeType && + bolt11 == other.bolt11 && + amountMsat == other.amountMsat && + label == other.label; +} + +/// Represents a send payment response. +class SendPaymentResponse { + final Payment payment; + + const SendPaymentResponse({ + required this.payment, + }); + + @override + int get hashCode => payment.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SendPaymentResponse && runtimeType == other.runtimeType && payment == other.payment; +} + +/// Represents a send spontaneous payment request. +class SendSpontaneousPaymentRequest { + /// The node id to send this payment is + final String nodeId; + + /// The amount in millisatoshis for this payment + final int amountMsat; + final List? extraTlvs; + + /// The external label or identifier of the [Payment] + final String? label; + + const SendSpontaneousPaymentRequest({ + required this.nodeId, + required this.amountMsat, + this.extraTlvs, + this.label, + }); + + @override + int get hashCode => nodeId.hashCode ^ amountMsat.hashCode ^ extraTlvs.hashCode ^ label.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SendSpontaneousPaymentRequest && + runtimeType == other.runtimeType && + nodeId == other.nodeId && + amountMsat == other.amountMsat && + extraTlvs == other.extraTlvs && + label == other.label; +} + +/// Represents a service health check response. +class ServiceHealthCheckResponse { + final HealthCheckStatus status; + + const ServiceHealthCheckResponse({ + required this.status, + }); + + @override + int get hashCode => status.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is ServiceHealthCheckResponse && runtimeType == other.runtimeType && status == other.status; +} + +class StaticBackupRequest { + final String workingDir; + + const StaticBackupRequest({ + required this.workingDir, + }); + + @override + int get hashCode => workingDir.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StaticBackupRequest && runtimeType == other.runtimeType && workingDir == other.workingDir; +} + +class StaticBackupResponse { + final List? backup; + + const StaticBackupResponse({ + this.backup, + }); + + @override + int get hashCode => backup.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is StaticBackupResponse && runtimeType == other.runtimeType && backup == other.backup; +} + +enum SwapAmountType { + Send, + Receive, + ; +} + +/// Represents the details of an on-going swap. +/// +/// Once this SwapInfo is created it will be monitored on-chain and its state is +/// saved to the persistent storage. +/// +/// The SwapInfo has a status which changes accordingly, documented in [SwapStatus]. +/// +class SwapInfo { + /// Bitcoin address for this swap. Sats sent to this address will be swapped. + final String bitcoinAddress; + + /// Relative time lock start, received from [SwapperAPI::create_swap]. + final int createdAt; + + /// Relative time lock for the timeout for the script to be redeemed before swap fails. + final int lockHeight; + + /// sha256 hash of preimage to used in the claim sript. + final Uint8List paymentHash; + + /// Secret to claim the swap. + final Uint8List preimage; + + /// Secret claim key for the bitcoin address. + final Uint8List privateKey; + + /// Public key in binary format of the private claim private key. + final Uint8List publicKey; + + /// The public key in binary format from the swapping service. Received from [SwapperAPI::create_swap]. + final Uint8List swapperPublicKey; + + /// The locking script for the generated bitcoin address. Received from [SwapperAPI::create_swap]. + final Uint8List script; + + /// bolt11 invoice to claim the sent funds. + final String? bolt11; + + /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. + final int paidMsat; + + /// Total amount of transactions sent to the swap address. + final int totalIncomingTxs; + + /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. + final int confirmedSats; + + /// Unconfirmed sats waiting to be confirmed onchain. + final int unconfirmedSats; + + /// Shows the current status of the swap, either `Initial` or `Expired`. + final SwapStatus status; + + /// Transaction IDs for failed swap attempts. + final List refundTxIds; + + /// Refund transaction IDs for ongoing swap awaiting confirmation. + final List unconfirmedTxIds; + + /// Transaction IDs that have been confirmed on-chain. + final List confirmedTxIds; + + /// The minimum amount of sats one can send in order for the swap to succeed. Received from [SwapperAPI::create_swap]. + final int minAllowedDeposit; + + /// The maximum amount of sats one can send in order for the swap to succeed. This is determined based on `max_swapper_payable` and the node's local balance. + final int maxAllowedDeposit; + + /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. + final int maxSwapperPayable; + + /// Error reason for when swap fails. + final String? lastRedeemError; + + /// The dynamic fees which is set if a channel opening is needed. + /// + /// This is an optional field for backward compatibility with swaps created before dynamic fees. + /// + /// Swaps created after dynamic fees were introduced always have this field set. + final OpeningFeeParams? channelOpeningFees; + + /// The block height when the swap was confirmed. + final int? confirmedAt; + + const SwapInfo({ + required this.bitcoinAddress, + required this.createdAt, + required this.lockHeight, + required this.paymentHash, + required this.preimage, + required this.privateKey, + required this.publicKey, + required this.swapperPublicKey, + required this.script, + this.bolt11, + required this.paidMsat, + required this.totalIncomingTxs, + required this.confirmedSats, + required this.unconfirmedSats, + required this.status, + required this.refundTxIds, + required this.unconfirmedTxIds, + required this.confirmedTxIds, + required this.minAllowedDeposit, + required this.maxAllowedDeposit, + required this.maxSwapperPayable, + this.lastRedeemError, + this.channelOpeningFees, + this.confirmedAt, + }); + + @override + int get hashCode => + bitcoinAddress.hashCode ^ + createdAt.hashCode ^ + lockHeight.hashCode ^ + paymentHash.hashCode ^ + preimage.hashCode ^ + privateKey.hashCode ^ + publicKey.hashCode ^ + swapperPublicKey.hashCode ^ + script.hashCode ^ + bolt11.hashCode ^ + paidMsat.hashCode ^ + totalIncomingTxs.hashCode ^ + confirmedSats.hashCode ^ + unconfirmedSats.hashCode ^ + status.hashCode ^ + refundTxIds.hashCode ^ + unconfirmedTxIds.hashCode ^ + confirmedTxIds.hashCode ^ + minAllowedDeposit.hashCode ^ + maxAllowedDeposit.hashCode ^ + maxSwapperPayable.hashCode ^ + lastRedeemError.hashCode ^ + channelOpeningFees.hashCode ^ + confirmedAt.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is SwapInfo && + runtimeType == other.runtimeType && + bitcoinAddress == other.bitcoinAddress && + createdAt == other.createdAt && + lockHeight == other.lockHeight && + paymentHash == other.paymentHash && + preimage == other.preimage && + privateKey == other.privateKey && + publicKey == other.publicKey && + swapperPublicKey == other.swapperPublicKey && + script == other.script && + bolt11 == other.bolt11 && + paidMsat == other.paidMsat && + totalIncomingTxs == other.totalIncomingTxs && + confirmedSats == other.confirmedSats && + unconfirmedSats == other.unconfirmedSats && + status == other.status && + refundTxIds == other.refundTxIds && + unconfirmedTxIds == other.unconfirmedTxIds && + confirmedTxIds == other.confirmedTxIds && + minAllowedDeposit == other.minAllowedDeposit && + maxAllowedDeposit == other.maxAllowedDeposit && + maxSwapperPayable == other.maxSwapperPayable && + lastRedeemError == other.lastRedeemError && + channelOpeningFees == other.channelOpeningFees && + confirmedAt == other.confirmedAt; +} + +/// The status of a swap +enum SwapStatus { + /// The swap address has been created and either there aren't any confirmed transactions associated with it + /// or there are confirmed transactions that are bellow the lock timeout which means the funds are still + /// eligible to be redeemed normally. + Initial, + WaitingConfirmation, + Redeemable, + Redeemed, + + /// The swap address has confirmed transactions associated with it and the lock timeout has passed since + /// the earliest confirmed transaction. This means the only way to spend the funds from this address is by + /// broadcasting a refund transaction. + Refundable, + Completed, + ; +} + +/// Represents a TLV entry for a keysend payment. +class TlvEntry { + /// The type field for the TLV + final int fieldNumber; + + /// The value bytes for the TLV + final Uint8List value; + + const TlvEntry({ + required this.fieldNumber, + required this.value, + }); + + @override + int get hashCode => fieldNumber.hashCode ^ value.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is TlvEntry && + runtimeType == other.runtimeType && + fieldNumber == other.fieldNumber && + value == other.value; +} + +/// UTXO known to the LN node +class UnspentTransactionOutput { + final Uint8List txid; + final int outnum; + final int amountMillisatoshi; + final String address; + final bool reserved; + + const UnspentTransactionOutput({ + required this.txid, + required this.outnum, + required this.amountMillisatoshi, + required this.address, + required this.reserved, + }); + + @override + int get hashCode => + txid.hashCode ^ outnum.hashCode ^ amountMillisatoshi.hashCode ^ address.hashCode ^ reserved.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is UnspentTransactionOutput && + runtimeType == other.runtimeType && + txid == other.txid && + outnum == other.outnum && + amountMillisatoshi == other.amountMillisatoshi && + address == other.address && + reserved == other.reserved; +} diff --git a/libs/sdk-flutter/lib/generated/models.freezed.dart b/libs/sdk-flutter/lib/generated/models.freezed.dart new file mode 100644 index 000000000..dc84a8a1b --- /dev/null +++ b/libs/sdk-flutter/lib/generated/models.freezed.dart @@ -0,0 +1,1660 @@ +// 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 'models.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 _$LnUrlCallbackStatus { + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) + errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlCallbackStatusCopyWith<$Res> { + factory $LnUrlCallbackStatusCopyWith( + LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = + _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; +} + +/// @nodoc +class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> + implements $LnUrlCallbackStatusCopyWith<$Res> { + _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { + factory _$$LnUrlCallbackStatus_OkImplCopyWith( + _$LnUrlCallbackStatus_OkImpl value, + $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = + __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, + _$LnUrlCallbackStatus_OkImpl> + implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { + __$$LnUrlCallbackStatus_OkImplCopyWithImpl( + _$LnUrlCallbackStatus_OkImpl _value, + $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$LnUrlCallbackStatus_OkImpl extends LnUrlCallbackStatus_Ok { + const _$LnUrlCallbackStatus_OkImpl() : super._(); + + @override + String toString() { + return 'LnUrlCallbackStatus.ok()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlCallbackStatus_OkImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return ok(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return ok?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) + errorStatus, + }) { + return ok(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) { + return ok?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(this); + } + return orElse(); + } +} + +abstract class LnUrlCallbackStatus_Ok extends LnUrlCallbackStatus { + const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; + const LnUrlCallbackStatus_Ok._() : super._(); +} + +/// @nodoc +abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { + factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith( + _$LnUrlCallbackStatus_ErrorStatusImpl value, + $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, + _$LnUrlCallbackStatus_ErrorStatusImpl> + implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl( + _$LnUrlCallbackStatus_ErrorStatusImpl _value, + $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlCallbackStatus_ErrorStatusImpl + extends LnUrlCallbackStatus_ErrorStatus { + const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlCallbackStatus.errorStatus(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlCallbackStatus_ErrorStatusImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< + _$LnUrlCallbackStatus_ErrorStatusImpl> + get copyWith => __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl< + _$LnUrlCallbackStatus_ErrorStatusImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return errorStatus(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return errorStatus?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) + errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class LnUrlCallbackStatus_ErrorStatus extends LnUrlCallbackStatus { + const factory LnUrlCallbackStatus_ErrorStatus( + {required final LnUrlErrorData data}) = + _$LnUrlCallbackStatus_ErrorStatusImpl; + const LnUrlCallbackStatus_ErrorStatus._() : super._(); + + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< + _$LnUrlCallbackStatus_ErrorStatusImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$LnUrlWithdrawResult { + Object get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) + errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlWithdrawResultCopyWith<$Res> { + factory $LnUrlWithdrawResultCopyWith( + LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = + _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; +} + +/// @nodoc +class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> + implements $LnUrlWithdrawResultCopyWith<$Res> { + _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_OkImplCopyWith( + _$LnUrlWithdrawResult_OkImpl value, + $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = + __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawSuccessData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, + _$LnUrlWithdrawResult_OkImpl> + implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_OkImplCopyWithImpl( + _$LnUrlWithdrawResult_OkImpl _value, + $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_OkImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawSuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { + const _$LnUrlWithdrawResult_OkImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawSuccessData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.ok(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_OkImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> + get copyWith => __$$LnUrlWithdrawResult_OkImplCopyWithImpl< + _$LnUrlWithdrawResult_OkImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return ok(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return ok?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) + errorStatus, + }) { + return ok(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return ok?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_Ok( + {required final LnUrlWithdrawSuccessData data}) = + _$LnUrlWithdrawResult_OkImpl; + const LnUrlWithdrawResult_Ok._() : super._(); + + @override + LnUrlWithdrawSuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith( + _$LnUrlWithdrawResult_ErrorStatusImpl value, + $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, + _$LnUrlWithdrawResult_ErrorStatusImpl> + implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl( + _$LnUrlWithdrawResult_ErrorStatusImpl _value, + $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_ErrorStatusImpl + extends LnUrlWithdrawResult_ErrorStatus { + const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.errorStatus(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_ErrorStatusImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< + _$LnUrlWithdrawResult_ErrorStatusImpl> + get copyWith => __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl< + _$LnUrlWithdrawResult_ErrorStatusImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return errorStatus(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return errorStatus?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) + errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_ErrorStatus extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_ErrorStatus( + {required final LnUrlErrorData data}) = + _$LnUrlWithdrawResult_ErrorStatusImpl; + const LnUrlWithdrawResult_ErrorStatus._() : super._(); + + @override + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< + _$LnUrlWithdrawResult_ErrorStatusImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$NodeConfig { + GreenlightNodeConfig get config => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(GreenlightNodeConfig config) greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(GreenlightNodeConfig config)? greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(GreenlightNodeConfig config)? greenlight, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(NodeConfig_Greenlight value) greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(NodeConfig_Greenlight value)? greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(NodeConfig_Greenlight value)? greenlight, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $NodeConfigCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $NodeConfigCopyWith<$Res> { + factory $NodeConfigCopyWith( + NodeConfig value, $Res Function(NodeConfig) then) = + _$NodeConfigCopyWithImpl<$Res, NodeConfig>; + @useResult + $Res call({GreenlightNodeConfig config}); +} + +/// @nodoc +class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> + implements $NodeConfigCopyWith<$Res> { + _$NodeConfigCopyWithImpl(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? config = null, + }) { + return _then(_value.copyWith( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as GreenlightNodeConfig, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> + implements $NodeConfigCopyWith<$Res> { + factory _$$NodeConfig_GreenlightImplCopyWith( + _$NodeConfig_GreenlightImpl value, + $Res Function(_$NodeConfig_GreenlightImpl) then) = + __$$NodeConfig_GreenlightImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({GreenlightNodeConfig config}); +} + +/// @nodoc +class __$$NodeConfig_GreenlightImplCopyWithImpl<$Res> + extends _$NodeConfigCopyWithImpl<$Res, _$NodeConfig_GreenlightImpl> + implements _$$NodeConfig_GreenlightImplCopyWith<$Res> { + __$$NodeConfig_GreenlightImplCopyWithImpl(_$NodeConfig_GreenlightImpl _value, + $Res Function(_$NodeConfig_GreenlightImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? config = null, + }) { + return _then(_$NodeConfig_GreenlightImpl( + config: null == config + ? _value.config + : config // ignore: cast_nullable_to_non_nullable + as GreenlightNodeConfig, + )); + } +} + +/// @nodoc + +class _$NodeConfig_GreenlightImpl extends NodeConfig_Greenlight { + const _$NodeConfig_GreenlightImpl({required this.config}) : super._(); + + @override + final GreenlightNodeConfig config; + + @override + String toString() { + return 'NodeConfig.greenlight(config: $config)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$NodeConfig_GreenlightImpl && + (identical(other.config, config) || other.config == config)); + } + + @override + int get hashCode => Object.hash(runtimeType, config); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> + get copyWith => __$$NodeConfig_GreenlightImplCopyWithImpl< + _$NodeConfig_GreenlightImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(GreenlightNodeConfig config) greenlight, + }) { + return greenlight(config); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(GreenlightNodeConfig config)? greenlight, + }) { + return greenlight?.call(config); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(GreenlightNodeConfig config)? greenlight, + required TResult orElse(), + }) { + if (greenlight != null) { + return greenlight(config); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NodeConfig_Greenlight value) greenlight, + }) { + return greenlight(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(NodeConfig_Greenlight value)? greenlight, + }) { + return greenlight?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(NodeConfig_Greenlight value)? greenlight, + required TResult orElse(), + }) { + if (greenlight != null) { + return greenlight(this); + } + return orElse(); + } +} + +abstract class NodeConfig_Greenlight extends NodeConfig { + const factory NodeConfig_Greenlight( + {required final GreenlightNodeConfig config}) = + _$NodeConfig_GreenlightImpl; + const NodeConfig_Greenlight._() : super._(); + + @override + GreenlightNodeConfig get config; + @override + @JsonKey(ignore: true) + _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$NodeCredentials { + GreenlightCredentials get credentials => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(GreenlightCredentials credentials) greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(GreenlightCredentials credentials)? greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(GreenlightCredentials credentials)? greenlight, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(NodeCredentials_Greenlight value) greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(NodeCredentials_Greenlight value)? greenlight, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(NodeCredentials_Greenlight value)? greenlight, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $NodeCredentialsCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $NodeCredentialsCopyWith<$Res> { + factory $NodeCredentialsCopyWith( + NodeCredentials value, $Res Function(NodeCredentials) then) = + _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; + @useResult + $Res call({GreenlightCredentials credentials}); +} + +/// @nodoc +class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> + implements $NodeCredentialsCopyWith<$Res> { + _$NodeCredentialsCopyWithImpl(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? credentials = null, + }) { + return _then(_value.copyWith( + credentials: null == credentials + ? _value.credentials + : credentials // ignore: cast_nullable_to_non_nullable + as GreenlightCredentials, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> + implements $NodeCredentialsCopyWith<$Res> { + factory _$$NodeCredentials_GreenlightImplCopyWith( + _$NodeCredentials_GreenlightImpl value, + $Res Function(_$NodeCredentials_GreenlightImpl) then) = + __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({GreenlightCredentials credentials}); +} + +/// @nodoc +class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> + extends _$NodeCredentialsCopyWithImpl<$Res, + _$NodeCredentials_GreenlightImpl> + implements _$$NodeCredentials_GreenlightImplCopyWith<$Res> { + __$$NodeCredentials_GreenlightImplCopyWithImpl( + _$NodeCredentials_GreenlightImpl _value, + $Res Function(_$NodeCredentials_GreenlightImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? credentials = null, + }) { + return _then(_$NodeCredentials_GreenlightImpl( + credentials: null == credentials + ? _value.credentials + : credentials // ignore: cast_nullable_to_non_nullable + as GreenlightCredentials, + )); + } +} + +/// @nodoc + +class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { + const _$NodeCredentials_GreenlightImpl({required this.credentials}) + : super._(); + + @override + final GreenlightCredentials credentials; + + @override + String toString() { + return 'NodeCredentials.greenlight(credentials: $credentials)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$NodeCredentials_GreenlightImpl && + (identical(other.credentials, credentials) || + other.credentials == credentials)); + } + + @override + int get hashCode => Object.hash(runtimeType, credentials); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> + get copyWith => __$$NodeCredentials_GreenlightImplCopyWithImpl< + _$NodeCredentials_GreenlightImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(GreenlightCredentials credentials) greenlight, + }) { + return greenlight(credentials); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(GreenlightCredentials credentials)? greenlight, + }) { + return greenlight?.call(credentials); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(GreenlightCredentials credentials)? greenlight, + required TResult orElse(), + }) { + if (greenlight != null) { + return greenlight(credentials); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(NodeCredentials_Greenlight value) greenlight, + }) { + return greenlight(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(NodeCredentials_Greenlight value)? greenlight, + }) { + return greenlight?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(NodeCredentials_Greenlight value)? greenlight, + required TResult orElse(), + }) { + if (greenlight != null) { + return greenlight(this); + } + return orElse(); + } +} + +abstract class NodeCredentials_Greenlight extends NodeCredentials { + const factory NodeCredentials_Greenlight( + {required final GreenlightCredentials credentials}) = + _$NodeCredentials_GreenlightImpl; + const NodeCredentials_Greenlight._() : super._(); + + @override + GreenlightCredentials get credentials; + @override + @JsonKey(ignore: true) + _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$PaymentDetails { + Object get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(LnPaymentDetails data) ln, + required TResult Function(ClosedChannelPaymentDetails data) closedChannel, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnPaymentDetails data)? ln, + TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnPaymentDetails data)? ln, + TResult Function(ClosedChannelPaymentDetails data)? closedChannel, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(PaymentDetails_Ln value) ln, + required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PaymentDetails_Ln value)? ln, + TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PaymentDetails_Ln value)? ln, + TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $PaymentDetailsCopyWith<$Res> { + factory $PaymentDetailsCopyWith( + PaymentDetails value, $Res Function(PaymentDetails) then) = + _$PaymentDetailsCopyWithImpl<$Res, PaymentDetails>; +} + +/// @nodoc +class _$PaymentDetailsCopyWithImpl<$Res, $Val extends PaymentDetails> + implements $PaymentDetailsCopyWith<$Res> { + _$PaymentDetailsCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { + factory _$$PaymentDetails_LnImplCopyWith(_$PaymentDetails_LnImpl value, + $Res Function(_$PaymentDetails_LnImpl) then) = + __$$PaymentDetails_LnImplCopyWithImpl<$Res>; + @useResult + $Res call({LnPaymentDetails data}); +} + +/// @nodoc +class __$$PaymentDetails_LnImplCopyWithImpl<$Res> + extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_LnImpl> + implements _$$PaymentDetails_LnImplCopyWith<$Res> { + __$$PaymentDetails_LnImplCopyWithImpl(_$PaymentDetails_LnImpl _value, + $Res Function(_$PaymentDetails_LnImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$PaymentDetails_LnImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnPaymentDetails, + )); + } +} + +/// @nodoc + +class _$PaymentDetails_LnImpl extends PaymentDetails_Ln { + const _$PaymentDetails_LnImpl({required this.data}) : super._(); + + @override + final LnPaymentDetails data; + + @override + String toString() { + return 'PaymentDetails.ln(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentDetails_LnImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => + __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnPaymentDetails data) ln, + required TResult Function(ClosedChannelPaymentDetails data) closedChannel, + }) { + return ln(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnPaymentDetails data)? ln, + TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, + }) { + return ln?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnPaymentDetails data)? ln, + TResult Function(ClosedChannelPaymentDetails data)? closedChannel, + required TResult orElse(), + }) { + if (ln != null) { + return ln(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PaymentDetails_Ln value) ln, + required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, + }) { + return ln(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PaymentDetails_Ln value)? ln, + TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, + }) { + return ln?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PaymentDetails_Ln value)? ln, + TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, + required TResult orElse(), + }) { + if (ln != null) { + return ln(this); + } + return orElse(); + } +} + +abstract class PaymentDetails_Ln extends PaymentDetails { + const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = + _$PaymentDetails_LnImpl; + const PaymentDetails_Ln._() : super._(); + + @override + LnPaymentDetails get data; + @JsonKey(ignore: true) + _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { + factory _$$PaymentDetails_ClosedChannelImplCopyWith( + _$PaymentDetails_ClosedChannelImpl value, + $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = + __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res>; + @useResult + $Res call({ClosedChannelPaymentDetails data}); +} + +/// @nodoc +class __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res> + extends _$PaymentDetailsCopyWithImpl<$Res, + _$PaymentDetails_ClosedChannelImpl> + implements _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { + __$$PaymentDetails_ClosedChannelImplCopyWithImpl( + _$PaymentDetails_ClosedChannelImpl _value, + $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$PaymentDetails_ClosedChannelImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as ClosedChannelPaymentDetails, + )); + } +} + +/// @nodoc + +class _$PaymentDetails_ClosedChannelImpl extends PaymentDetails_ClosedChannel { + const _$PaymentDetails_ClosedChannelImpl({required this.data}) : super._(); + + @override + final ClosedChannelPaymentDetails data; + + @override + String toString() { + return 'PaymentDetails.closedChannel(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$PaymentDetails_ClosedChannelImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$PaymentDetails_ClosedChannelImplCopyWith< + _$PaymentDetails_ClosedChannelImpl> + get copyWith => __$$PaymentDetails_ClosedChannelImplCopyWithImpl< + _$PaymentDetails_ClosedChannelImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnPaymentDetails data) ln, + required TResult Function(ClosedChannelPaymentDetails data) closedChannel, + }) { + return closedChannel(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnPaymentDetails data)? ln, + TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, + }) { + return closedChannel?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnPaymentDetails data)? ln, + TResult Function(ClosedChannelPaymentDetails data)? closedChannel, + required TResult orElse(), + }) { + if (closedChannel != null) { + return closedChannel(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(PaymentDetails_Ln value) ln, + required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, + }) { + return closedChannel(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(PaymentDetails_Ln value)? ln, + TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, + }) { + return closedChannel?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(PaymentDetails_Ln value)? ln, + TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, + required TResult orElse(), + }) { + if (closedChannel != null) { + return closedChannel(this); + } + return orElse(); + } +} + +abstract class PaymentDetails_ClosedChannel extends PaymentDetails { + const factory PaymentDetails_ClosedChannel( + {required final ClosedChannelPaymentDetails data}) = + _$PaymentDetails_ClosedChannelImpl; + const PaymentDetails_ClosedChannel._() : super._(); + + @override + ClosedChannelPaymentDetails get data; + @JsonKey(ignore: true) + _$$PaymentDetails_ClosedChannelImplCopyWith< + _$PaymentDetails_ClosedChannelImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$ReportIssueRequest { + ReportPaymentFailureDetails get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(ReportPaymentFailureDetails data) paymentFailure, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ReportPaymentFailureDetails data)? paymentFailure, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ReportIssueRequest_PaymentFailure value) + paymentFailure, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $ReportIssueRequestCopyWith get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ReportIssueRequestCopyWith<$Res> { + factory $ReportIssueRequestCopyWith( + ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = + _$ReportIssueRequestCopyWithImpl<$Res, ReportIssueRequest>; + @useResult + $Res call({ReportPaymentFailureDetails data}); +} + +/// @nodoc +class _$ReportIssueRequestCopyWithImpl<$Res, $Val extends ReportIssueRequest> + implements $ReportIssueRequestCopyWith<$Res> { + _$ReportIssueRequestCopyWithImpl(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? data = null, + }) { + return _then(_value.copyWith( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as ReportPaymentFailureDetails, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> + implements $ReportIssueRequestCopyWith<$Res> { + factory _$$ReportIssueRequest_PaymentFailureImplCopyWith( + _$ReportIssueRequest_PaymentFailureImpl value, + $Res Function(_$ReportIssueRequest_PaymentFailureImpl) then) = + __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({ReportPaymentFailureDetails data}); +} + +/// @nodoc +class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> + extends _$ReportIssueRequestCopyWithImpl<$Res, + _$ReportIssueRequest_PaymentFailureImpl> + implements _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> { + __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl( + _$ReportIssueRequest_PaymentFailureImpl _value, + $Res Function(_$ReportIssueRequest_PaymentFailureImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$ReportIssueRequest_PaymentFailureImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as ReportPaymentFailureDetails, + )); + } +} + +/// @nodoc + +class _$ReportIssueRequest_PaymentFailureImpl + extends ReportIssueRequest_PaymentFailure { + const _$ReportIssueRequest_PaymentFailureImpl({required this.data}) + : super._(); + + @override + final ReportPaymentFailureDetails data; + + @override + String toString() { + return 'ReportIssueRequest.paymentFailure(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ReportIssueRequest_PaymentFailureImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ReportIssueRequest_PaymentFailureImplCopyWith< + _$ReportIssueRequest_PaymentFailureImpl> + get copyWith => __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl< + _$ReportIssueRequest_PaymentFailureImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(ReportPaymentFailureDetails data) paymentFailure, + }) { + return paymentFailure(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, + }) { + return paymentFailure?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(ReportPaymentFailureDetails data)? paymentFailure, + required TResult orElse(), + }) { + if (paymentFailure != null) { + return paymentFailure(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ReportIssueRequest_PaymentFailure value) + paymentFailure, + }) { + return paymentFailure(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, + }) { + return paymentFailure?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, + required TResult orElse(), + }) { + if (paymentFailure != null) { + return paymentFailure(this); + } + return orElse(); + } +} + +abstract class ReportIssueRequest_PaymentFailure extends ReportIssueRequest { + const factory ReportIssueRequest_PaymentFailure( + {required final ReportPaymentFailureDetails data}) = + _$ReportIssueRequest_PaymentFailureImpl; + const ReportIssueRequest_PaymentFailure._() : super._(); + + @override + ReportPaymentFailureDetails get data; + @override + @JsonKey(ignore: true) + _$$ReportIssueRequest_PaymentFailureImplCopyWith< + _$ReportIssueRequest_PaymentFailureImpl> + get copyWith => throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 4da4a956e..f7b677b7c 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -13,6 +13,7 @@ all: ios android flutter_rust_bridge: cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 + mkdir -p ./lib/generated flutter_rust_bridge_codegen generate ios: $(SOURCES) flutter_rust_bridge @@ -47,6 +48,7 @@ desktop: $(SOURCES) flutter_rust_bridge .PHONY: clean clean: cargo clean + rm -rf ./lib/generated/ rm -rf ./android/src/main/jniLibs rm -rf ./android/src/main/kotlin/breez_sdk/ rm -rf ./android/src/main/kotlin/breez_sdk_notification/ From 65b53d5499cfe6b1d4efb0da01dfd244e845db9d Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 15:55:48 +0300 Subject: [PATCH 05/23] Exclude generated files from static code analysis --- libs/sdk-flutter/analysis_options.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/sdk-flutter/analysis_options.yaml b/libs/sdk-flutter/analysis_options.yaml index 725adb719..e2613db7f 100644 --- a/libs/sdk-flutter/analysis_options.yaml +++ b/libs/sdk-flutter/analysis_options.yaml @@ -24,3 +24,4 @@ linter: analyzer: exclude: + - lib/generated/** \ No newline at end of file From 3cf218aff2fe2370ac33a0582b42cff73befad69 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 16:41:14 +0300 Subject: [PATCH 06/23] Verify & initialize bindings on creating BreezSDK --- libs/sdk-flutter/lib/breez_sdk.dart | 142 ++++++++++++----------- libs/sdk-flutter/lib/exceptions.dart | 2 +- libs/sdk-flutter/lib/native_toolkit.dart | 20 ++-- libs/sdk-flutter/lib/sdk.dart | 13 ++- 4 files changed, 101 insertions(+), 76 deletions(-) diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 499dfe3ff..1cde945b4 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -1,16 +1,16 @@ import 'dart:async'; -import 'package:breez_sdk/bridge_generated.dart'; -import 'package:breez_sdk/exceptions.dart'; import 'package:breez_sdk/native_toolkit.dart'; +import 'package:breez_sdk/sdk.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:rxdart/rxdart.dart'; +import 'generated/binding.dart' as binding; class BreezSDK { - final _lnToolkit = getNativeToolkit(); - - BreezSDK(); + BreezSDK() { + verifyInitialized(); + } /* Streams */ @@ -24,6 +24,16 @@ class BreezSDK { /// Listen to payment results Stream get paymentResultStream => _paymentResultStream.stream; + Future verifyInitialized() async { + try { + if (!BreezSdkBindings.instance.initialized) { + await BreezSdkBindings.init(externalLibrary: createLibraryImpl()); + } + } catch (e) { + throw Exception("Failed to initialize BreezSdkBindings"); + } + } + /* SDK Streams */ StreamSubscription? _breezEventsSubscription; @@ -41,7 +51,7 @@ class BreezSDK { } void _initializeEventsStream() { - _breezEventsStream ??= _lnToolkit.breezEventsStream().asBroadcastStream(); + _breezEventsStream ??= binding.breezEventsStream().asBroadcastStream(); } void _initializeLogStream() { @@ -50,7 +60,7 @@ class BreezSDK { .receiveBroadcastStream() .map((log) => LogEntry(line: log["line"], level: log["level"])); } else { - _breezLogStream ??= _lnToolkit.breezLogStream().asBroadcastStream(); + _breezLogStream ??= binding.breezLogStream().asBroadcastStream(); } } @@ -70,12 +80,12 @@ class BreezSDK { /// /// More webhook types may be supported in the future. Future registerWebhook({required String webhookUrl}) async { - return _lnToolkit.registerWebhook(webhookUrl: webhookUrl); + return binding.registerWebhook(webhookUrl: webhookUrl); } /// Unregister webhook callbacks for the given `webhook_url`. Future unregisterWebhook({required String webhookUrl}) async { - return _lnToolkit.unregisterWebhook(webhookUrl: webhookUrl); + return binding.unregisterWebhook(webhookUrl: webhookUrl); } /// connect initializes the global NodeService, schedule the node to run in the cloud and @@ -87,7 +97,7 @@ class BreezSDK { Future connect({ required ConnectRequest req, }) async { - await _lnToolkit.connect(req: req); + await binding.connect(req: req); _subscribeToSdkStreams(); await fetchNodeData(); } @@ -96,18 +106,18 @@ class BreezSDK { Future nodeCredentials() async => await _lnToolkit.nodeCredentials(); /// Check whether node service is initialized or not - Future isInitialized() async => await _lnToolkit.isInitialized(); + Future isInitialized() async => await binding.isInitialized(); /// This method sync the local state with the remote node state. /// The synced items are as follows: /// * node state - General information about the node and its liquidity status /// * channels - The list of channels and their status /// * payments - The incoming/outgoing payments - Future sync() async => await _lnToolkit.sync(); + Future sync() async => await binding.sync(); /// get the node state from the persistent storage Future nodeInfo() async { - final nodeState = await _lnToolkit.nodeInfo(); + final nodeState = await binding.nodeInfo(); nodeStateController.add(nodeState); return nodeState; } @@ -116,12 +126,12 @@ class BreezSDK { Future configureNode({ required ConfigureNodeRequest req, }) async { - return await _lnToolkit.configureNode(req: req); + return await binding.configureNode(req: req); } /// Cleanup node resources and stop the signer. Future disconnect() async { - await _lnToolkit.disconnect(); + await binding.disconnect(); _unsubscribeFromSdkStreams(); } @@ -130,7 +140,7 @@ class BreezSDK { /// Attempts to convert the phrase to a mnemonic, then to a seed. /// /// If the phrase is not a valid mnemonic, an error is returned. - Future mnemonicToSeed(String phrase) async => await _lnToolkit.mnemonicToSeed(phrase: phrase); + Future mnemonicToSeed(String phrase) async => await binding.mnemonicToSeed(phrase: phrase); /// Get the full default config for a specific environment type Future defaultConfig({ @@ -138,7 +148,7 @@ class BreezSDK { required String apiKey, required NodeConfig nodeConfig, }) async { - return await _lnToolkit.defaultConfig( + return await binding.defaultConfig( envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, @@ -150,7 +160,7 @@ class BreezSDK { Future signMessage({ required SignMessageRequest req, }) async { - return await _lnToolkit.signMessage(req: req); + return await binding.signMessage(req: req); } /// Check whether given message was signed by the private key or the given @@ -158,30 +168,30 @@ class BreezSDK { Future checkMessage({ required CheckMessageRequest req, }) async { - return await _lnToolkit.checkMessage(req: req); + return await binding.checkMessage(req: req); } /* LSP API's */ /// List available lsps that can be selected by the user - Future> listLsps() async => await _lnToolkit.listLsps(); + Future> listLsps() async => await binding.listLsps(); /// Select the lsp to be used and provide inbound liquidity Future connectLSP(String lspId) async { - return await _lnToolkit.connectLsp(lspId: lspId); + return await binding.connectLsp(lspId: lspId); } /// Get the current LSP's ID - Future lspId() async => await _lnToolkit.lspId(); + Future lspId() async => await binding.lspId(); /// Convenience method to look up LSP info based on current LSP ID - Future lspInfo() async => await _lnToolkit.lspInfo(); + Future lspInfo() async => await binding.lspInfo(); /// Convenience method to look up [LspInformation] for a given LSP ID - Future fetchLspInfo(String lspId) async => await _lnToolkit.fetchLspInfo(id: lspId); + Future fetchLspInfo(String lspId) async => await binding.fetchLspInfo(id: lspId); /// close all channels with the current lsp - Future closeLspChannels() async => await _lnToolkit.closeLspChannels(); + Future closeLspChannels() async => await binding.closeLspChannels(); /* Backup API's & Streams*/ @@ -191,24 +201,24 @@ class BreezSDK { Stream get backupStream => _backupStreamController.stream; /// Start the backup process - Future backup() async => await _lnToolkit.backup(); + Future backup() async => await binding.backup(); /// Returns the state of the backup process - Future backupStatus() async => await _lnToolkit.backupStatus(); + Future backupStatus() async => await binding.backupStatus(); /* Parse API's */ /// Parse a BOLT11 payment request and return a structure contains the parsed fields. - Future parseInvoice(String invoice) async => await _lnToolkit.parseInvoice(invoice: invoice); + Future parseInvoice(String invoice) async => await binding.parseInvoice(invoice: invoice); /// Parses generic user input, typically pasted from clipboard or scanned from a QR. - Future parseInput({required String input}) async => await _lnToolkit.parseInput(input: input); + Future parseInput({required String input}) async => await binding.parseInput(input: input); /// Get the static backup data. Future staticBackup({ required StaticBackupRequest req, }) async { - return await _lnToolkit.staticBackup(req: req); + return await binding.staticBackup(req: req); } /* Payment API's & Streams*/ @@ -222,7 +232,7 @@ class BreezSDK { Future> listPayments({ required ListPaymentsRequest req, }) async { - final paymentsList = await _lnToolkit.listPayments(req: req); + final paymentsList = await binding.listPayments(req: req); paymentsController.add(paymentsList); return paymentsList; } @@ -231,7 +241,7 @@ class BreezSDK { Future paymentByHash({ required String hash, }) async { - return await _lnToolkit.paymentByHash(hash: hash); + return await binding.paymentByHash(hash: hash); } /// Set the external metadata of a payment as a valid JSON string @@ -239,7 +249,7 @@ class BreezSDK { required String hash, required String metadata, }) async { - return await _lnToolkit.setPaymentMetadata(hash: hash, metadata: metadata); + return await binding.setPaymentMetadata(hash: hash, metadata: metadata); } /* Lightning Payment API's */ @@ -248,14 +258,14 @@ class BreezSDK { Future sendPayment({ required SendPaymentRequest req, }) async { - return await _lnToolkit.sendPayment(req: req); + return await binding.sendPayment(req: req); } /// pay directly to a node id using keysend Future sendSpontaneousPayment({ required SendSpontaneousPaymentRequest req, }) async { - return await _lnToolkit.sendSpontaneousPayment(req: req); + return await binding.sendSpontaneousPayment(req: req); } /// Creates an bolt11 payment request. @@ -265,7 +275,7 @@ class BreezSDK { Future receivePayment({ required ReceivePaymentRequest req, }) async { - return await _lnToolkit.receivePayment(req: req); + return await binding.receivePayment(req: req); } /* LNURL API's */ @@ -275,7 +285,7 @@ class BreezSDK { Future lnurlPay({ required LnUrlPayRequest req, }) async { - return await _lnToolkit.lnurlPay(req: req); + return await binding.lnurlPay(req: req); } /// Second step of LNURL-withdraw. The first step is `parse()`, which also validates the LNURL destination @@ -285,7 +295,7 @@ class BreezSDK { /// of the LNURL endpoint data in the `request`. If they match the endpoint requirements, the LNURL withdraw /// request is made. A successful result here means the endpoint started the payment. Future lnurlWithdraw({required LnUrlWithdrawRequest req}) async { - return await _lnToolkit.lnurlWithdraw(req: req); + return await binding.lnurlWithdraw(req: req); } /// Third and last step of LNURL-auth. The first step is `parse()`, which also validates the LNURL destination @@ -296,14 +306,14 @@ class BreezSDK { Future lnurlAuth({ required LnUrlAuthRequestData reqData, }) async { - return await _lnToolkit.lnurlAuth(reqData: reqData); + return await binding.lnurlAuth(reqData: reqData); } /* Fiat Currency API's */ /// Fetch live rates of fiat currencies Future> fetchFiatRates() async { - final List rates = await _lnToolkit.fetchFiatRates(); + final List rates = await binding.fetchFiatRates(); return rates.fold>({}, (map, rate) { map[rate.coin] = rate; return map; @@ -311,7 +321,7 @@ class BreezSDK { } /// List all available fiat currencies - Future> listFiatCurrencies() async => await _lnToolkit.listFiatCurrencies(); + Future> listFiatCurrencies() async => await binding.listFiatCurrencies(); /* Swap Stream */ @@ -330,39 +340,39 @@ class BreezSDK { Future sendOnchain({ required SendOnchainRequest req, }) async { - return await _lnToolkit.sendOnchain(req: req); + return await binding.sendOnchain(req: req); } Future onchainPaymentLimits() async { - return await _lnToolkit.onchainPaymentLimits(); + return await binding.onchainPaymentLimits(); } /// Creates a reverse swap and attempts to pay the HODL invoice Future payOnchain({ required PayOnchainRequest req, }) async { - return await _lnToolkit.payOnchain(req: req); + return await binding.payOnchain(req: req); } /// Onchain receive swap API Future receiveOnchain({ required ReceiveOnchainRequest req, }) async { - return await _lnToolkit.receiveOnchain(req: req); + return await binding.receiveOnchain(req: req); } /// Generates an url that can be used by a third part provider to buy Bitcoin with fiat currency Future buyBitcoin({ required BuyBitcoinRequest req, }) async { - return await _lnToolkit.buyBitcoin(req: req); + return await binding.buyBitcoin(req: req); } /// Withdraw on-chain funds in the wallet to an external btc address Future redeemOnchainFunds({ required RedeemOnchainFundsRequest req, }) async { - final redeemOnchainFundsResponse = await _lnToolkit.redeemOnchainFunds(req: req); + final redeemOnchainFundsResponse = await binding.redeemOnchainFunds(req: req); await listPayments(req: const ListPaymentsRequest()); return redeemOnchainFundsResponse; } @@ -373,19 +383,19 @@ class BreezSDK { /// This is possible since the route to the swapper node is known in advance and is expected /// to consist of maximum 3 hops. Future maxReverseSwapAmount() async { - return await _lnToolkit.maxReverseSwapAmount(); + return await binding.maxReverseSwapAmount(); } /* Refundables API's */ /// list non-completed expired swaps that should be refunded by calling refund() - Future> listRefundables() async => await _lnToolkit.listRefundables(); + Future> listRefundables() async => await binding.listRefundables(); /// Construct and broadcast a refund transaction for a failed/expired swap Future refund({ required RefundRequest req, }) async { - return await _lnToolkit.refund(req: req); + return await binding.refund(req: req); } /// Prepares a refund transaction for a failed/expired swap. @@ -395,18 +405,18 @@ class BreezSDK { Future prepareRefund({ required PrepareRefundRequest req, }) async { - return await _lnToolkit.prepareRefund(req: req); + return await binding.prepareRefund(req: req); } /// Iterate all historical swap addresses and fetch their current status from the blockchain. /// The status is then updated in the persistent storage. - Future rescanSwaps() async => await _lnToolkit.rescanSwaps(); + Future rescanSwaps() async => await binding.rescanSwaps(); /* In Progress Swap API's */ /// Returns an optional in-progress [SwapInfo]. /// A [SwapInfo] is in-progress if it is waiting for confirmation to be redeemed and complete the swap. - Future inProgressSwap() async => await _lnToolkit.inProgressSwap(); + Future inProgressSwap() async => await binding.inProgressSwap(); /// Redeems an individual swap. /// @@ -417,7 +427,7 @@ class BreezSDK { Future redeemSwap({ required String swapAddress, }) async { - return await _lnToolkit.redeemSwap(swapAddress: swapAddress); + return await binding.redeemSwap(swapAddress: swapAddress); } /// Returns the blocking [ReverseSwapInfo]s that are in progress @@ -425,7 +435,7 @@ class BreezSDK { 'Use inProgressOnchainPayments instead. ' 'This method was deprecated after v0.3.6', ) - Future> inProgressReverseSwaps() async => _lnToolkit.inProgressReverseSwaps(); + Future> inProgressReverseSwaps() async => binding.inProgressReverseSwaps(); /// Claims an individual reverse swap. /// @@ -445,7 +455,7 @@ class BreezSDK { Future openChannelFee({ required OpenChannelFeeRequest req, }) async { - return await _lnToolkit.openChannelFee(req: req); + return await binding.openChannelFee(req: req); } /// Lookup the most recent reverse swap pair info using the Boltz API @@ -456,26 +466,26 @@ class BreezSDK { Future fetchReverseSwapFees({ required ReverseSwapFeesRequest req, }) async { - return await _lnToolkit.fetchReverseSwapFees(req: req); + return await binding.fetchReverseSwapFees(req: req); } /// Lookup the most recent reverse swap pair info using the Boltz API Future prepareOnchainPayment({ required PrepareOnchainPaymentRequest req, }) async { - return await _lnToolkit.prepareOnchainPayment(req: req); + return await binding.prepareOnchainPayment(req: req); } /// Returns the blocking [ReverseSwapInfo]s that are in progress - Future> inProgressOnchainPayments() async => _lnToolkit.inProgressOnchainPayments(); + Future> inProgressOnchainPayments() async => binding.inProgressOnchainPayments(); /// Fetches the current recommended fees - Future recommendedFees() async => await _lnToolkit.recommendedFees(); + Future recommendedFees() async => await binding.recommendedFees(); Future prepareRedeemOnchainFunds({ required PrepareRedeemOnchainFundsRequest req, }) async => - _lnToolkit.prepareRedeemOnchainFunds(req: req); + binding.prepareRedeemOnchainFunds(req: req); /* Support API's */ @@ -485,14 +495,14 @@ class BreezSDK { Future reportIssue({ required ReportIssueRequest req, }) async { - return await _lnToolkit.reportIssue(req: req); + return await binding.reportIssue(req: req); } /// Fetches the service health check from the support API. Future serviceHealthCheck({ required String apiKey, }) async { - return await _lnToolkit.serviceHealthCheck(apiKey: apiKey); + return await binding.serviceHealthCheck(apiKey: apiKey); } /* CLI API's */ @@ -500,13 +510,13 @@ class BreezSDK { /// Execute a command directly on the NodeAPI interface. /// Mainly used to debugging. Future executeCommand({required String command}) async { - return await _lnToolkit.executeCommand(command: command); + return await binding.executeCommand(command: command); } /// Generate diagnostic data. /// Mainly used to debugging. Future generateDiagnosticData() async { - return await _lnToolkit.generateDiagnosticData(); + return await binding.generateDiagnosticData(); } /* Helper Methods */ @@ -516,7 +526,7 @@ class BreezSDK { String address, ) async { try { - final inputType = await _lnToolkit.parseInput(input: address); + final inputType = await binding.parseInput(input: address); return inputType is InputType_BitcoinAddress; } catch (e) { return false; diff --git a/libs/sdk-flutter/lib/exceptions.dart b/libs/sdk-flutter/lib/exceptions.dart index fa772b0e5..95c038e73 100644 --- a/libs/sdk-flutter/lib/exceptions.dart +++ b/libs/sdk-flutter/lib/exceptions.dart @@ -1,4 +1,4 @@ -import 'package:breez_sdk/bridge_generated.dart'; +import 'package:breez_sdk/sdk.dart'; class BackupException implements Exception { final BackupFailedData data; diff --git a/libs/sdk-flutter/lib/native_toolkit.dart b/libs/sdk-flutter/lib/native_toolkit.dart index 085e7c9f5..d1a8d98a3 100644 --- a/libs/sdk-flutter/lib/native_toolkit.dart +++ b/libs/sdk-flutter/lib/native_toolkit.dart @@ -1,25 +1,29 @@ -import 'dart:ffi'; import 'dart:io'; -BreezSdkCore? _breezSDK; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -const _libName = "libbreez_sdk_bindings.so"; -const _iosLibName = "breez_sdk"; +ExternalLibrary? _breezSDK; + +const _libName = "breez_sdk_bindings"; +const _iosLibName = "breez_sdkFFI"; class UnsupportedPlatform implements Exception { UnsupportedPlatform(String s); } -BreezSdkCore getNativeToolkit() { +ExternalLibrary createLibraryImpl() { if (_breezSDK == null) { if (Platform.isAndroid || Platform.isLinux) { // On Linux the lib needs to be in LD_LIBRARY_PATH or working directory - _breezSDK = BreezSdkCoreImpl(DynamicLibrary.open(_libName)); + _breezSDK = ExternalLibrary.open('lib$_libName.so'); } else if (Platform.isIOS || Platform.isMacOS) { try { - _breezSDK = BreezSdkCoreImpl(DynamicLibrary.open("$_iosLibName.framework/$_iosLibName")); + // TODO: Fails to load dynamic library + _breezSDK = ExternalLibrary.open('$_iosLibName.framework/$_iosLibName'); } catch (e) { - _breezSDK = BreezSdkCoreImpl(DynamicLibrary.process()); + // Resolving to this on apps that have multiple packages that use flutter_rust_bridge + // (breez-sdk & bdk-flutter where we're concerned) may cause issues. + _breezSDK = ExternalLibrary.process(iKnowHowToUseIt: true); } } else { throw UnsupportedPlatform('${Platform.operatingSystem} is not yet supported!'); diff --git a/libs/sdk-flutter/lib/sdk.dart b/libs/sdk-flutter/lib/sdk.dart index b090f8ccf..7ba0c8018 100644 --- a/libs/sdk-flutter/lib/sdk.dart +++ b/libs/sdk-flutter/lib/sdk.dart @@ -1 +1,12 @@ -export 'bridge_generated.dart' show RouteHintHop, RouteHint, LNInvoice; +export 'generated/breez_services.dart'; +export 'generated/chain.dart'; +export 'generated/fiat.dart'; +export 'generated/frb_generated.dart'; +export 'generated/frb_generated.io.dart'; +export 'generated/input_parser.dart'; +export 'generated/invoice.dart'; +export 'generated/lnurl/pay/model.dart'; +export 'generated/lsp.dart'; +export 'generated/models.dart'; +export 'generated/binding.dart'; +export 'exceptions.dart'; From d07155c13c6e9b7b8b792b94a80068ffc785aabb Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Thu, 18 Apr 2024 16:41:48 +0300 Subject: [PATCH 07/23] Remove obsolete custom Exception, UnsupportedPlatform Use UnsupportedError instead --- libs/sdk-flutter/lib/native_toolkit.dart | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libs/sdk-flutter/lib/native_toolkit.dart b/libs/sdk-flutter/lib/native_toolkit.dart index d1a8d98a3..8c0dc7161 100644 --- a/libs/sdk-flutter/lib/native_toolkit.dart +++ b/libs/sdk-flutter/lib/native_toolkit.dart @@ -7,10 +7,6 @@ ExternalLibrary? _breezSDK; const _libName = "breez_sdk_bindings"; const _iosLibName = "breez_sdkFFI"; -class UnsupportedPlatform implements Exception { - UnsupportedPlatform(String s); -} - ExternalLibrary createLibraryImpl() { if (_breezSDK == null) { if (Platform.isAndroid || Platform.isLinux) { @@ -26,7 +22,7 @@ ExternalLibrary createLibraryImpl() { _breezSDK = ExternalLibrary.process(iKnowHowToUseIt: true); } } else { - throw UnsupportedPlatform('${Platform.operatingSystem} is not yet supported!'); + throw UnsupportedError('${Platform.operatingSystem} is not yet supported!'); } } return _breezSDK!; From 84c04e85fe57ba0173aac8733c8a519dfe1ae081 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Tue, 7 May 2024 22:14:18 +0300 Subject: [PATCH 08/23] Update flutter_rust_bridge to 2.0.0-dev.33 & generate bindings --- libs/sdk-core/src/frb_generated.io.rs | 8 ++++- libs/sdk-core/src/frb_generated.rs | 12 ++++++-- libs/sdk-flutter/README.md | 2 +- libs/sdk-flutter/ios/Classes/frb_generated.h | 4 ++- libs/sdk-flutter/lib/breez_sdk.dart | 2 +- libs/sdk-flutter/lib/generated/binding.dart | 2 +- .../lib/generated/breez_services.dart | 9 ++++-- libs/sdk-flutter/lib/generated/chain.dart | 2 +- libs/sdk-flutter/lib/generated/fiat.dart | 2 +- .../lib/generated/frb_generated.dart | 29 ++++++++++++------- .../lib/generated/frb_generated.io.dart | 10 +++++-- .../lib/generated/input_parser.dart | 2 +- libs/sdk-flutter/lib/generated/invoice.dart | 2 +- .../lib/generated/lnurl/pay/model.dart | 2 +- libs/sdk-flutter/lib/generated/lsp.dart | 2 +- libs/sdk-flutter/lib/generated/models.dart | 8 ++++- libs/sdk-flutter/makefile | 2 +- 17 files changed, 69 insertions(+), 31 deletions(-) diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 461cd8901..5d190ea3a 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // Section: imports @@ -1000,6 +1000,7 @@ impl CstDecode for wire_cst_ln_payment_details open_channel_bolt11: self.open_channel_bolt11.cst_decode(), lnurl_success_action: self.lnurl_success_action.cst_decode(), lnurl_pay_domain: self.lnurl_pay_domain.cst_decode(), + lnurl_pay_comment: self.lnurl_pay_comment.cst_decode(), ln_address: self.ln_address.cst_decode(), lnurl_metadata: self.lnurl_metadata.cst_decode(), lnurl_withdraw_endpoint: self.lnurl_withdraw_endpoint.cst_decode(), @@ -1399,6 +1400,7 @@ impl CstDecode for wire_cst_payment_fa error: self.error.cst_decode(), node_id: self.node_id.cst_decode(), invoice: self.invoice.cst_decode(), + label: self.label.cst_decode(), } } } @@ -2170,6 +2172,7 @@ impl NewWithNullPtr for wire_cst_ln_payment_details { open_channel_bolt11: core::ptr::null_mut(), lnurl_success_action: core::ptr::null_mut(), lnurl_pay_domain: core::ptr::null_mut(), + lnurl_pay_comment: core::ptr::null_mut(), ln_address: core::ptr::null_mut(), lnurl_metadata: core::ptr::null_mut(), lnurl_withdraw_endpoint: core::ptr::null_mut(), @@ -2634,6 +2637,7 @@ impl NewWithNullPtr for wire_cst_payment_failed_data { error: core::ptr::null_mut(), node_id: core::ptr::null_mut(), invoice: core::ptr::null_mut(), + label: core::ptr::null_mut(), } } } @@ -4646,6 +4650,7 @@ pub struct wire_cst_ln_payment_details { open_channel_bolt11: *mut wire_cst_list_prim_u_8_strict, lnurl_success_action: *mut wire_cst_success_action_processed, lnurl_pay_domain: *mut wire_cst_list_prim_u_8_strict, + lnurl_pay_comment: *mut wire_cst_list_prim_u_8_strict, ln_address: *mut wire_cst_list_prim_u_8_strict, lnurl_metadata: *mut wire_cst_list_prim_u_8_strict, lnurl_withdraw_endpoint: *mut wire_cst_list_prim_u_8_strict, @@ -4976,6 +4981,7 @@ pub struct wire_cst_payment_failed_data { error: *mut wire_cst_list_prim_u_8_strict, node_id: *mut wire_cst_list_prim_u_8_strict, invoice: *mut wire_cst_ln_invoice, + label: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index cd2817ab3..2659c83d6 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. #![allow( non_camel_case_types, @@ -30,7 +30,7 @@ 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-dev.32"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.33"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -924313952; // Section: executor @@ -1869,6 +1869,7 @@ impl SseDecode for crate::models::LnPaymentDetails { let mut var_lnurlSuccessAction = >::sse_decode(deserializer); let mut var_lnurlPayDomain = >::sse_decode(deserializer); + let mut var_lnurlPayComment = >::sse_decode(deserializer); let mut var_lnAddress = >::sse_decode(deserializer); let mut var_lnurlMetadata = >::sse_decode(deserializer); let mut var_lnurlWithdrawEndpoint = >::sse_decode(deserializer); @@ -1886,6 +1887,7 @@ impl SseDecode for crate::models::LnPaymentDetails { open_channel_bolt11: var_openChannelBolt11, lnurl_success_action: var_lnurlSuccessAction, lnurl_pay_domain: var_lnurlPayDomain, + lnurl_pay_comment: var_lnurlPayComment, ln_address: var_lnAddress, lnurl_metadata: var_lnurlMetadata, lnurl_withdraw_endpoint: var_lnurlWithdrawEndpoint, @@ -2676,10 +2678,12 @@ impl SseDecode for crate::breez_services::PaymentFailedData { let mut var_error = ::sse_decode(deserializer); let mut var_nodeId = ::sse_decode(deserializer); let mut var_invoice = >::sse_decode(deserializer); + let mut var_label = >::sse_decode(deserializer); return crate::breez_services::PaymentFailedData { error: var_error, node_id: var_nodeId, invoice: var_invoice, + label: var_label, }; } } @@ -4005,6 +4009,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::LnPaymentDetails { self.open_channel_bolt11.into_into_dart().into_dart(), self.lnurl_success_action.into_into_dart().into_dart(), self.lnurl_pay_domain.into_into_dart().into_dart(), + self.lnurl_pay_comment.into_into_dart().into_dart(), self.ln_address.into_into_dart().into_dart(), self.lnurl_metadata.into_into_dart().into_dart(), self.lnurl_withdraw_endpoint.into_into_dart().into_dart(), @@ -4702,6 +4707,7 @@ impl flutter_rust_bridge::IntoDart for crate::breez_services::PaymentFailedData self.error.into_into_dart().into_dart(), self.node_id.into_into_dart().into_dart(), self.invoice.into_into_dart().into_dart(), + self.label.into_into_dart().into_dart(), ] .into_dart() } @@ -6219,6 +6225,7 @@ impl SseEncode for crate::models::LnPaymentDetails { serializer, ); >::sse_encode(self.lnurl_pay_domain, serializer); + >::sse_encode(self.lnurl_pay_comment, serializer); >::sse_encode(self.ln_address, serializer); >::sse_encode(self.lnurl_metadata, serializer); >::sse_encode(self.lnurl_withdraw_endpoint, serializer); @@ -6807,6 +6814,7 @@ impl SseEncode for crate::breez_services::PaymentFailedData { ::sse_encode(self.error, serializer); ::sse_encode(self.node_id, serializer); >::sse_encode(self.invoice, serializer); + >::sse_encode(self.label, serializer); } } diff --git a/libs/sdk-flutter/README.md b/libs/sdk-flutter/README.md index 40e18c226..389f29d46 100644 --- a/libs/sdk-flutter/README.md +++ b/libs/sdk-flutter/README.md @@ -26,7 +26,7 @@ cargo install cargo-ndk ``` * Install [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge): ``` -cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 +cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.33 ``` ## Building the plugin diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index d239b28b6..6e437f0e4 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -407,6 +407,7 @@ typedef struct wire_cst_ln_payment_details { struct wire_cst_list_prim_u_8_strict *open_channel_bolt11; struct wire_cst_success_action_processed *lnurl_success_action; struct wire_cst_list_prim_u_8_strict *lnurl_pay_domain; + struct wire_cst_list_prim_u_8_strict *lnurl_pay_comment; struct wire_cst_list_prim_u_8_strict *ln_address; struct wire_cst_list_prim_u_8_strict *lnurl_metadata; struct wire_cst_list_prim_u_8_strict *lnurl_withdraw_endpoint; @@ -549,11 +550,12 @@ typedef struct wire_cst_payment_failed_data { struct wire_cst_list_prim_u_8_strict *error; struct wire_cst_list_prim_u_8_strict *node_id; struct wire_cst_ln_invoice *invoice; + struct wire_cst_list_prim_u_8_strict *label; } wire_cst_payment_failed_data; typedef struct wire_cst_symbol { struct wire_cst_list_prim_u_8_strict *grapheme; - struct wire_cst_list_prim_u_8_strict *template; + struct wire_cst_list_prim_u_8_strict *template_; bool *rtl; uint32_t *position; } wire_cst_symbol; diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 1cde945b4..01ebd3e13 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -103,7 +103,7 @@ class BreezSDK { } /// Retrieve the decrypted credentials from the node. - Future nodeCredentials() async => await _lnToolkit.nodeCredentials(); + Future nodeCredentials() async => await binding.nodeCredentials(); /// Check whether node service is initialized or not Future isInitialized() async => await binding.isInitialized(); diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 0619b0a1b..8220ca504 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index b468da717..428840085 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -147,15 +147,17 @@ class PaymentFailedData { final String error; final String nodeId; final LNInvoice? invoice; + final String? label; const PaymentFailedData({ required this.error, required this.nodeId, this.invoice, + this.label, }); @override - int get hashCode => error.hashCode ^ nodeId.hashCode ^ invoice.hashCode; + int get hashCode => error.hashCode ^ nodeId.hashCode ^ invoice.hashCode ^ label.hashCode; @override bool operator ==(Object other) => @@ -164,7 +166,8 @@ class PaymentFailedData { runtimeType == other.runtimeType && error == other.error && nodeId == other.nodeId && - invoice == other.invoice; + invoice == other.invoice && + label == other.label; } /// Request to sign a message with the node's private key. diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 70580fc0a..1c9c9155f 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart index 27046c783..1e636cfca 100644 --- a/libs/sdk-flutter/lib/generated/fiat.dart +++ b/libs/sdk-flutter/lib/generated/fiat.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 85cb02d2a..73019c664 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // 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 @@ -58,7 +58,7 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.32'; + String get codegenVersion => '2.0.0-dev.33'; @override int get rustContentHash => -924313952; @@ -2441,7 +2441,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements LnPaymentDetails dco_decode_ln_payment_details(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 15) throw Exception('unexpected arr length: expect 15 but see ${arr.length}'); + if (arr.length != 16) throw Exception('unexpected arr length: expect 16 but see ${arr.length}'); return LnPaymentDetails( paymentHash: dco_decode_String(arr[0]), label: dco_decode_String(arr[1]), @@ -2452,12 +2452,13 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements openChannelBolt11: dco_decode_opt_String(arr[6]), lnurlSuccessAction: dco_decode_opt_box_autoadd_success_action_processed(arr[7]), lnurlPayDomain: dco_decode_opt_String(arr[8]), - lnAddress: dco_decode_opt_String(arr[9]), - lnurlMetadata: dco_decode_opt_String(arr[10]), - lnurlWithdrawEndpoint: dco_decode_opt_String(arr[11]), - swapInfo: dco_decode_opt_box_autoadd_swap_info(arr[12]), - reverseSwapInfo: dco_decode_opt_box_autoadd_reverse_swap_info(arr[13]), - pendingExpirationBlock: dco_decode_opt_box_autoadd_u_32(arr[14]), + lnurlPayComment: dco_decode_opt_String(arr[9]), + lnAddress: dco_decode_opt_String(arr[10]), + lnurlMetadata: dco_decode_opt_String(arr[11]), + lnurlWithdrawEndpoint: dco_decode_opt_String(arr[12]), + swapInfo: dco_decode_opt_box_autoadd_swap_info(arr[13]), + reverseSwapInfo: dco_decode_opt_box_autoadd_reverse_swap_info(arr[14]), + pendingExpirationBlock: dco_decode_opt_box_autoadd_u_32(arr[15]), ); } @@ -3015,11 +3016,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements PaymentFailedData dco_decode_payment_failed_data(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}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return PaymentFailedData( error: dco_decode_String(arr[0]), nodeId: dco_decode_String(arr[1]), invoice: dco_decode_opt_box_autoadd_ln_invoice(arr[2]), + label: dco_decode_opt_String(arr[3]), ); } @@ -4529,6 +4531,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_openChannelBolt11 = sse_decode_opt_String(deserializer); var var_lnurlSuccessAction = sse_decode_opt_box_autoadd_success_action_processed(deserializer); var var_lnurlPayDomain = sse_decode_opt_String(deserializer); + var var_lnurlPayComment = sse_decode_opt_String(deserializer); var var_lnAddress = sse_decode_opt_String(deserializer); var var_lnurlMetadata = sse_decode_opt_String(deserializer); var var_lnurlWithdrawEndpoint = sse_decode_opt_String(deserializer); @@ -4545,6 +4548,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements openChannelBolt11: var_openChannelBolt11, lnurlSuccessAction: var_lnurlSuccessAction, lnurlPayDomain: var_lnurlPayDomain, + lnurlPayComment: var_lnurlPayComment, lnAddress: var_lnAddress, lnurlMetadata: var_lnurlMetadata, lnurlWithdrawEndpoint: var_lnurlWithdrawEndpoint, @@ -5201,7 +5205,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_error = sse_decode_String(deserializer); var var_nodeId = sse_decode_String(deserializer); var var_invoice = sse_decode_opt_box_autoadd_ln_invoice(deserializer); - return PaymentFailedData(error: var_error, nodeId: var_nodeId, invoice: var_invoice); + var var_label = sse_decode_opt_String(deserializer); + return PaymentFailedData(error: var_error, nodeId: var_nodeId, invoice: var_invoice, label: var_label); } @protected @@ -6676,6 +6681,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_String(self.openChannelBolt11, serializer); sse_encode_opt_box_autoadd_success_action_processed(self.lnurlSuccessAction, serializer); sse_encode_opt_String(self.lnurlPayDomain, serializer); + sse_encode_opt_String(self.lnurlPayComment, serializer); sse_encode_opt_String(self.lnAddress, serializer); sse_encode_opt_String(self.lnurlMetadata, serializer); sse_encode_opt_String(self.lnurlWithdrawEndpoint, serializer); @@ -7210,6 +7216,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.error, serializer); sse_encode_String(self.nodeId, serializer); sse_encode_opt_box_autoadd_ln_invoice(self.invoice, serializer); + sse_encode_opt_String(self.label, serializer); } @protected diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index b8d5e4999..c3df92762 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // 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 @@ -2757,6 +2757,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl lnurl_pay_domain; + external ffi.Pointer lnurl_pay_comment; + external ffi.Pointer ln_address; external ffi.Pointer lnurl_metadata; @@ -6700,12 +6704,14 @@ final class wire_cst_payment_failed_data extends ffi.Struct { external ffi.Pointer node_id; external ffi.Pointer invoice; + + external ffi.Pointer label; } final class wire_cst_symbol extends ffi.Struct { external ffi.Pointer grapheme; - external ffi.Pointer template; + external ffi.Pointer template_; external ffi.Pointer rtl; diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart index 20aab7c0d..c1ccb8e61 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart index b6c3caddc..4f417e5f3 100644 --- a/libs/sdk-flutter/lib/generated/invoice.dart +++ b/libs/sdk-flutter/lib/generated/invoice.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart index 86175b2ee..575f651f7 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index cb1055661..9a86d66b6 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index c381be374..9fcefda0f 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.32. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -370,6 +370,9 @@ class LnPaymentDetails { /// Only set for [PaymentType::Sent] payments if it is not a payment to a Lightning Address final String? lnurlPayDomain; + /// Only set for [PaymentType::Sent] payments if the user sent the comment using LNURL-pay + final String? lnurlPayComment; + /// Only set for [PaymentType::Sent] payments that are sent to a Lightning Address final String? lnAddress; @@ -398,6 +401,7 @@ class LnPaymentDetails { this.openChannelBolt11, this.lnurlSuccessAction, this.lnurlPayDomain, + this.lnurlPayComment, this.lnAddress, this.lnurlMetadata, this.lnurlWithdrawEndpoint, @@ -417,6 +421,7 @@ class LnPaymentDetails { openChannelBolt11.hashCode ^ lnurlSuccessAction.hashCode ^ lnurlPayDomain.hashCode ^ + lnurlPayComment.hashCode ^ lnAddress.hashCode ^ lnurlMetadata.hashCode ^ lnurlWithdrawEndpoint.hashCode ^ @@ -438,6 +443,7 @@ class LnPaymentDetails { openChannelBolt11 == other.openChannelBolt11 && lnurlSuccessAction == other.lnurlSuccessAction && lnurlPayDomain == other.lnurlPayDomain && + lnurlPayComment == other.lnurlPayComment && lnAddress == other.lnAddress && lnurlMetadata == other.lnurlMetadata && lnurlWithdrawEndpoint == other.lnurlWithdrawEndpoint && diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index f7b677b7c..09a5c6a9c 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.32 + cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.33 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate From 12aa717eebd5c21049cda1765bdb568474d7db45 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Sun, 19 May 2024 01:59:41 +0300 Subject: [PATCH 09/23] Generate bindings for unregister_webhook --- libs/sdk-core/src/frb_generated.io.rs | 8 ++++++ libs/sdk-core/src/frb_generated.rs | 22 ++++++++++++++- libs/sdk-flutter/ios/Classes/frb_generated.h | 4 +++ libs/sdk-flutter/lib/generated/binding.dart | 3 +++ .../lib/generated/frb_generated.dart | 27 ++++++++++++++++++- .../lib/generated/frb_generated.io.dart | 23 ++++++++++++---- 6 files changed, 80 insertions(+), 7 deletions(-) diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 5d190ea3a..916ca26ec 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -3604,6 +3604,14 @@ pub extern "C" fn frbgen_breez_sdk_wire_sync(port_: i64) { wire_sync_impl(port_) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire_unregister_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, +) { + wire_unregister_webhook_impl(port_, webhook_url) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( ) -> *mut wire_cst_aes_success_action_data_decrypted { diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 2659c83d6..231b31888 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -31,7 +31,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.33"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -924313952; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1499828454; // Section: executor @@ -922,6 +922,26 @@ fn wire_sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::sync())()), ) } +fn wire_unregister_webhook_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + webhook_url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "unregister_webhook", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_webhook_url = webhook_url.cst_decode(); + move |context| { + transform_result_dco((move || { + crate::binding::unregister_webhook(api_webhook_url) + })()) + } + }, + ) +} // Section: dart2rust diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index 6e437f0e4..5f161dc2a 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -1043,6 +1043,9 @@ void frbgen_breez_sdk_wire_static_backup(int64_t port_, struct wire_cst_static_b void frbgen_breez_sdk_wire_sync(int64_t port_); +void frbgen_breez_sdk_wire_unregister_webhook(int64_t port_, + struct wire_cst_list_prim_u_8_strict *webhook_url); + struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); struct wire_cst_aes_success_action_data_result *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result(void); @@ -1326,6 +1329,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sign_message); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_static_backup); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sync); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_unregister_webhook); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); return dummy_var; } diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 8220ca504..5ee6624bf 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -100,6 +100,9 @@ Future closeLspChannels({dynamic hint}) => BreezSdkBindings.instance.api.c Future registerWebhook({required String webhookUrl, dynamic hint}) => BreezSdkBindings.instance.api.registerWebhook(webhookUrl: webhookUrl, hint: hint); +Future unregisterWebhook({required String webhookUrl, dynamic hint}) => + BreezSdkBindings.instance.api.unregisterWebhook(webhookUrl: webhookUrl, hint: hint); + /// See [BreezServices::backup] Future backup({dynamic hint}) => BreezSdkBindings.instance.api.backup(hint: hint); diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 73019c664..6497297a7 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -61,7 +61,7 @@ class BreezSdkBindings String get codegenVersion => '2.0.0-dev.33'; @override - int get rustContentHash => -924313952; + int get rustContentHash => 1499828454; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( stem: 'breez_sdk_core', @@ -198,6 +198,8 @@ abstract class BreezSdkBindingsApi extends BaseApi { Future staticBackup({required StaticBackupRequest req, dynamic hint}); Future sync({dynamic hint}); + + Future unregisterWebhook({required String webhookUrl, dynamic hint}); } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -1581,6 +1583,29 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements argNames: [], ); + @override + Future unregisterWebhook({required String webhookUrl, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(webhookUrl); + return wire.wire_unregister_webhook(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kUnregisterWebhookConstMeta, + argValues: [webhookUrl], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kUnregisterWebhookConstMeta => const TaskConstMeta( + debugName: "unregister_webhook", + argNames: ["webhookUrl"], + ); + @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index c3df92762..7b647b3de 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -5044,6 +5044,22 @@ class BreezSdkBindingsWire implements BaseWire { _lookup>('frbgen_breez_sdk_wire_sync'); late final _wire_sync = _wire_syncPtr.asFunction(); + void wire_unregister_webhook( + int port_, + ffi.Pointer webhook_url, + ) { + return _wire_unregister_webhook( + port_, + webhook_url, + ); + } + + late final _wire_unregister_webhookPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire_unregister_webhook'); + late final _wire_unregister_webhook = _wire_unregister_webhookPtr + .asFunction)>(); + ffi.Pointer cst_new_box_autoadd_aes_success_action_data_decrypted() { return _cst_new_box_autoadd_aes_success_action_data_decrypted(); @@ -5894,12 +5910,9 @@ class BreezSdkBindingsWire 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 DartPostCObjectFnType + = ffi.Pointer message)>>; typedef DartPort = ffi.Int64; -typedef DartDartPort = int; final class wire_cst_list_prim_u_8_strict extends ffi.Struct { external ffi.Pointer ptr; From 2ab1f7d715d2e74d01a8c13fee8f248cc41981b7 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 27 May 2024 17:55:58 +0300 Subject: [PATCH 10/23] Update flutter_rust_bridge to 2.0.0-dev.36 and generate bindings --- libs/sdk-core/src/frb_generated.io.rs | 252 +++--- libs/sdk-core/src/frb_generated.rs | 161 ++-- libs/sdk-flutter/README.md | 2 +- libs/sdk-flutter/ios/Classes/frb_generated.h | 312 +++---- libs/sdk-flutter/lib/generated/binding.dart | 132 +-- .../lib/generated/breez_services.dart | 2 +- .../lib/generated/breez_services.freezed.dart | 139 ++-- libs/sdk-flutter/lib/generated/chain.dart | 12 +- libs/sdk-flutter/lib/generated/fiat.dart | 2 +- .../lib/generated/frb_generated.dart | 671 +++++++-------- .../lib/generated/frb_generated.io.dart | 779 +++++++++--------- .../lib/generated/input_parser.dart | 12 +- .../lib/generated/input_parser.freezed.dart | 143 ++-- libs/sdk-flutter/lib/generated/invoice.dart | 18 +- .../lib/generated/lnurl/pay/model.dart | 2 +- .../generated/lnurl/pay/model.freezed.dart | 247 ++---- libs/sdk-flutter/lib/generated/lsp.dart | 6 +- libs/sdk-flutter/lib/generated/models.dart | 112 +-- .../lib/generated/models.freezed.dart | 260 +++--- libs/sdk-flutter/makefile | 2 +- 20 files changed, 1587 insertions(+), 1679 deletions(-) diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 916ca26ec..873db2bd9 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // Section: imports @@ -3194,422 +3194,428 @@ impl Default for wire_cst_url_success_action_data { } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_backup(port_: i64) { - wire_backup_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup(port_: i64) { + wire__crate__binding__backup_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_backup_status(port_: i64) { - wire_backup_status_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup_status(port_: i64) { + wire__crate__binding__backup_status_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_breez_events_stream( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_events_stream( port_: i64, s: *mut wire_cst_list_prim_u_8_strict, ) { - wire_breez_events_stream_impl(port_, s) + wire__crate__binding__breez_events_stream_impl(port_, s) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_breez_log_stream( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_log_stream( port_: i64, s: *mut wire_cst_list_prim_u_8_strict, ) { - wire_breez_log_stream_impl(port_, s) + wire__crate__binding__breez_log_stream_impl(port_, s) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_buy_bitcoin( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__buy_bitcoin( port_: i64, req: *mut wire_cst_buy_bitcoin_request, ) { - wire_buy_bitcoin_impl(port_, req) + wire__crate__binding__buy_bitcoin_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_check_message( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__check_message( port_: i64, req: *mut wire_cst_check_message_request, ) { - wire_check_message_impl(port_, req) + wire__crate__binding__check_message_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_close_lsp_channels(port_: i64) { - wire_close_lsp_channels_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(port_: i64) { + wire__crate__binding__close_lsp_channels_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_configure_node( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__configure_node( port_: i64, req: *mut wire_cst_configure_node_request, ) { - wire_configure_node_impl(port_, req) + wire__crate__binding__configure_node_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_connect(port_: i64, req: *mut wire_cst_connect_request) { - wire_connect_impl(port_, req) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect( + port_: i64, + req: *mut wire_cst_connect_request, +) { + wire__crate__binding__connect_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_connect_lsp( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect_lsp( port_: i64, lsp_id: *mut wire_cst_list_prim_u_8_strict, ) { - wire_connect_lsp_impl(port_, lsp_id) + wire__crate__binding__connect_lsp_impl(port_, lsp_id) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_default_config( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__default_config( port_: i64, env_type: i32, api_key: *mut wire_cst_list_prim_u_8_strict, node_config: *mut wire_cst_node_config, ) { - wire_default_config_impl(port_, env_type, api_key, node_config) + wire__crate__binding__default_config_impl(port_, env_type, api_key, node_config) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_disconnect(port_: i64) { - wire_disconnect_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__disconnect(port_: i64) { + wire__crate__binding__disconnect_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_execute_command( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__execute_command( port_: i64, command: *mut wire_cst_list_prim_u_8_strict, ) { - wire_execute_command_impl(port_, command) + wire__crate__binding__execute_command_impl(port_, command) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_fetch_fiat_rates(port_: i64) { - wire_fetch_fiat_rates_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates(port_: i64) { + wire__crate__binding__fetch_fiat_rates_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_fetch_lsp_info( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info( port_: i64, id: *mut wire_cst_list_prim_u_8_strict, ) { - wire_fetch_lsp_info_impl(port_, id) + wire__crate__binding__fetch_lsp_info_impl(port_, id) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_fetch_reverse_swap_fees( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees( port_: i64, req: *mut wire_cst_reverse_swap_fees_request, ) { - wire_fetch_reverse_swap_fees_impl(port_, req) + wire__crate__binding__fetch_reverse_swap_fees_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_generate_diagnostic_data(port_: i64) { - wire_generate_diagnostic_data_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data(port_: i64) { + wire__crate__binding__generate_diagnostic_data_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_in_progress_onchain_payments(port_: i64) { - wire_in_progress_onchain_payments_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments(port_: i64) { + wire__crate__binding__in_progress_onchain_payments_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_in_progress_reverse_swaps(port_: i64) { - wire_in_progress_reverse_swaps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(port_: i64) { + wire__crate__binding__in_progress_reverse_swaps_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_in_progress_swap(port_: i64) { - wire_in_progress_swap_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_swap(port_: i64) { + wire__crate__binding__in_progress_swap_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_is_initialized(port_: i64) { - wire_is_initialized_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__is_initialized(port_: i64) { + wire__crate__binding__is_initialized_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_list_fiat_currencies(port_: i64) { - wire_list_fiat_currencies_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(port_: i64) { + wire__crate__binding__list_fiat_currencies_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_list_lsps(port_: i64) { - wire_list_lsps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_lsps(port_: i64) { + wire__crate__binding__list_lsps_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_list_payments( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_payments( port_: i64, req: *mut wire_cst_list_payments_request, ) { - wire_list_payments_impl(port_, req) + wire__crate__binding__list_payments_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_list_refundables(port_: i64) { - wire_list_refundables_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_refundables(port_: i64) { + wire__crate__binding__list_refundables_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_lnurl_auth( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_auth( port_: i64, req_data: *mut wire_cst_ln_url_auth_request_data, ) { - wire_lnurl_auth_impl(port_, req_data) + wire__crate__binding__lnurl_auth_impl(port_, req_data) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_lnurl_pay( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_pay( port_: i64, req: *mut wire_cst_ln_url_pay_request, ) { - wire_lnurl_pay_impl(port_, req) + wire__crate__binding__lnurl_pay_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_lnurl_withdraw( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw( port_: i64, req: *mut wire_cst_ln_url_withdraw_request, ) { - wire_lnurl_withdraw_impl(port_, req) + wire__crate__binding__lnurl_withdraw_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_lsp_id(port_: i64) { - wire_lsp_id_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_id(port_: i64) { + wire__crate__binding__lsp_id_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_lsp_info(port_: i64) { - wire_lsp_info_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_info(port_: i64) { + wire__crate__binding__lsp_info_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_max_reverse_swap_amount(port_: i64) { - wire_max_reverse_swap_amount_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount(port_: i64) { + wire__crate__binding__max_reverse_swap_amount_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_mnemonic_to_seed( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed( port_: i64, phrase: *mut wire_cst_list_prim_u_8_strict, ) { - wire_mnemonic_to_seed_impl(port_, phrase) + wire__crate__binding__mnemonic_to_seed_impl(port_, phrase) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_node_credentials(port_: i64) { - wire_node_credentials_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_credentials(port_: i64) { + wire__crate__binding__node_credentials_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_node_info(port_: i64) { - wire_node_info_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_info(port_: i64) { + wire__crate__binding__node_info_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_onchain_payment_limits(port_: i64) { - wire_onchain_payment_limits_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(port_: i64) { + wire__crate__binding__onchain_payment_limits_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_open_channel_fee( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__open_channel_fee( port_: i64, req: *mut wire_cst_open_channel_fee_request, ) { - wire_open_channel_fee_impl(port_, req) + wire__crate__binding__open_channel_fee_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_parse_input( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_input( port_: i64, input: *mut wire_cst_list_prim_u_8_strict, ) { - wire_parse_input_impl(port_, input) + wire__crate__binding__parse_input_impl(port_, input) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_parse_invoice( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_invoice( port_: i64, invoice: *mut wire_cst_list_prim_u_8_strict, ) { - wire_parse_invoice_impl(port_, invoice) + wire__crate__binding__parse_invoice_impl(port_, invoice) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_pay_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__pay_onchain( port_: i64, req: *mut wire_cst_pay_onchain_request, ) { - wire_pay_onchain_impl(port_, req) + wire__crate__binding__pay_onchain_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_payment_by_hash( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__payment_by_hash( port_: i64, hash: *mut wire_cst_list_prim_u_8_strict, ) { - wire_payment_by_hash_impl(port_, hash) + wire__crate__binding__payment_by_hash_impl(port_, hash) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_prepare_onchain_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment( port_: i64, req: *mut wire_cst_prepare_onchain_payment_request, ) { - wire_prepare_onchain_payment_impl(port_, req) + wire__crate__binding__prepare_onchain_payment_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_prepare_redeem_onchain_funds( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds( port_: i64, req: *mut wire_cst_prepare_redeem_onchain_funds_request, ) { - wire_prepare_redeem_onchain_funds_impl(port_, req) + wire__crate__binding__prepare_redeem_onchain_funds_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_prepare_refund( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_refund( port_: i64, req: *mut wire_cst_prepare_refund_request, ) { - wire_prepare_refund_impl(port_, req) + wire__crate__binding__prepare_refund_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_receive_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_onchain( port_: i64, req: *mut wire_cst_receive_onchain_request, ) { - wire_receive_onchain_impl(port_, req) + wire__crate__binding__receive_onchain_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_receive_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_payment( port_: i64, req: *mut wire_cst_receive_payment_request, ) { - wire_receive_payment_impl(port_, req) + wire__crate__binding__receive_payment_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_recommended_fees(port_: i64) { - wire_recommended_fees_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__recommended_fees(port_: i64) { + wire__crate__binding__recommended_fees_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_redeem_onchain_funds( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds( port_: i64, req: *mut wire_cst_redeem_onchain_funds_request, ) { - wire_redeem_onchain_funds_impl(port_, req) + wire__crate__binding__redeem_onchain_funds_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_redeem_swap( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_swap( port_: i64, swap_address: *mut wire_cst_list_prim_u_8_strict, ) { - wire_redeem_swap_impl(port_, swap_address) + wire__crate__binding__redeem_swap_impl(port_, swap_address) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_refund(port_: i64, req: *mut wire_cst_refund_request) { - wire_refund_impl(port_, req) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__refund( + port_: i64, + req: *mut wire_cst_refund_request, +) { + wire__crate__binding__refund_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_register_webhook( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__register_webhook( port_: i64, webhook_url: *mut wire_cst_list_prim_u_8_strict, ) { - wire_register_webhook_impl(port_, webhook_url) + wire__crate__binding__register_webhook_impl(port_, webhook_url) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_report_issue( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__report_issue( port_: i64, req: *mut wire_cst_report_issue_request, ) { - wire_report_issue_impl(port_, req) + wire__crate__binding__report_issue_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_rescan_swaps(port_: i64) { - wire_rescan_swaps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__rescan_swaps(port_: i64) { + wire__crate__binding__rescan_swaps_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_send_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_onchain( port_: i64, req: *mut wire_cst_send_onchain_request, ) { - wire_send_onchain_impl(port_, req) + wire__crate__binding__send_onchain_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_send_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_payment( port_: i64, req: *mut wire_cst_send_payment_request, ) { - wire_send_payment_impl(port_, req) + wire__crate__binding__send_payment_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_send_spontaneous_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment( port_: i64, req: *mut wire_cst_send_spontaneous_payment_request, ) { - wire_send_spontaneous_payment_impl(port_, req) + wire__crate__binding__send_spontaneous_payment_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_service_health_check( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__service_health_check( port_: i64, api_key: *mut wire_cst_list_prim_u_8_strict, ) { - wire_service_health_check_impl(port_, api_key) + wire__crate__binding__service_health_check_impl(port_, api_key) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_set_payment_metadata( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__set_payment_metadata( port_: i64, hash: *mut wire_cst_list_prim_u_8_strict, metadata: *mut wire_cst_list_prim_u_8_strict, ) { - wire_set_payment_metadata_impl(port_, hash, metadata) + wire__crate__binding__set_payment_metadata_impl(port_, hash, metadata) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_sign_message( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sign_message( port_: i64, req: *mut wire_cst_sign_message_request, ) { - wire_sign_message_impl(port_, req) + wire__crate__binding__sign_message_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_static_backup( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__static_backup( port_: i64, req: *mut wire_cst_static_backup_request, ) { - wire_static_backup_impl(port_, req) + wire__crate__binding__static_backup_impl(port_, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_sync(port_: i64) { - wire_sync_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sync(port_: i64) { + wire__crate__binding__sync_impl(port_) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire_unregister_webhook( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( port_: i64, webhook_url: *mut wire_cst_list_prim_u_8_strict, ) { - wire_unregister_webhook_impl(port_, webhook_url) + wire__crate__binding__unregister_webhook_impl(port_, webhook_url) } #[no_mangle] diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 231b31888..d3c83e39a 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. #![allow( non_camel_case_types, @@ -14,7 +14,9 @@ clippy::double_parens, clippy::let_and_return, clippy::too_many_arguments, - clippy::match_single_binding + clippy::match_single_binding, + clippy::clone_on_copy, + clippy::let_unit_value )] // Section: imports @@ -30,7 +32,7 @@ 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-dev.33"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.36"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1499828454; // Section: executor @@ -39,7 +41,7 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire_backup_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__backup_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "backup", @@ -49,7 +51,9 @@ fn wire_backup_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::backup())()), ) } -fn wire_backup_status_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__backup_status_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "backup_status", @@ -59,7 +63,7 @@ fn wire_backup_status_impl(port_: flutter_rust_bridge::for_generated::MessagePor move || move |context| transform_result_dco((move || crate::binding::backup_status())()), ) } -fn wire_breez_events_stream_impl( +fn wire__crate__binding__breez_events_stream_impl( port_: flutter_rust_bridge::for_generated::MessagePort, s: impl CstDecode< StreamSink, @@ -79,7 +83,7 @@ fn wire_breez_events_stream_impl( }, ) } -fn wire_breez_log_stream_impl( +fn wire__crate__binding__breez_log_stream_impl( port_: flutter_rust_bridge::for_generated::MessagePort, s: impl CstDecode>, ) { @@ -95,7 +99,7 @@ fn wire_breez_log_stream_impl( }, ) } -fn wire_buy_bitcoin_impl( +fn wire__crate__binding__buy_bitcoin_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -111,7 +115,7 @@ fn wire_buy_bitcoin_impl( }, ) } -fn wire_check_message_impl( +fn wire__crate__binding__check_message_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -127,7 +131,9 @@ fn wire_check_message_impl( }, ) } -fn wire_close_lsp_channels_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__close_lsp_channels_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "close_lsp_channels", @@ -139,7 +145,7 @@ fn wire_close_lsp_channels_impl(port_: flutter_rust_bridge::for_generated::Messa }, ) } -fn wire_configure_node_impl( +fn wire__crate__binding__configure_node_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -155,7 +161,7 @@ fn wire_configure_node_impl( }, ) } -fn wire_connect_impl( +fn wire__crate__binding__connect_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -171,7 +177,7 @@ fn wire_connect_impl( }, ) } -fn wire_connect_lsp_impl( +fn wire__crate__binding__connect_lsp_impl( port_: flutter_rust_bridge::for_generated::MessagePort, lsp_id: impl CstDecode, ) { @@ -187,7 +193,7 @@ fn wire_connect_lsp_impl( }, ) } -fn wire_default_config_impl( +fn wire__crate__binding__default_config_impl( port_: flutter_rust_bridge::for_generated::MessagePort, env_type: impl CstDecode, api_key: impl CstDecode, @@ -215,7 +221,7 @@ fn wire_default_config_impl( }, ) } -fn wire_disconnect_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__disconnect_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "disconnect", @@ -225,7 +231,7 @@ fn wire_disconnect_impl(port_: flutter_rust_bridge::for_generated::MessagePort) move || move |context| transform_result_dco((move || crate::binding::disconnect())()), ) } -fn wire_execute_command_impl( +fn wire__crate__binding__execute_command_impl( port_: flutter_rust_bridge::for_generated::MessagePort, command: impl CstDecode, ) { @@ -243,7 +249,9 @@ fn wire_execute_command_impl( }, ) } -fn wire_fetch_fiat_rates_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__fetch_fiat_rates_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "fetch_fiat_rates", @@ -253,7 +261,7 @@ fn wire_fetch_fiat_rates_impl(port_: flutter_rust_bridge::for_generated::Message move || move |context| transform_result_dco((move || crate::binding::fetch_fiat_rates())()), ) } -fn wire_fetch_lsp_info_impl( +fn wire__crate__binding__fetch_lsp_info_impl( port_: flutter_rust_bridge::for_generated::MessagePort, id: impl CstDecode, ) { @@ -269,7 +277,7 @@ fn wire_fetch_lsp_info_impl( }, ) } -fn wire_fetch_reverse_swap_fees_impl( +fn wire__crate__binding__fetch_reverse_swap_fees_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -287,7 +295,9 @@ fn wire_fetch_reverse_swap_fees_impl( }, ) } -fn wire_generate_diagnostic_data_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__generate_diagnostic_data_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "generate_diagnostic_data", @@ -301,7 +311,9 @@ fn wire_generate_diagnostic_data_impl(port_: flutter_rust_bridge::for_generated: }, ) } -fn wire_in_progress_onchain_payments_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__in_progress_onchain_payments_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "in_progress_onchain_payments", @@ -315,7 +327,9 @@ fn wire_in_progress_onchain_payments_impl(port_: flutter_rust_bridge::for_genera }, ) } -fn wire_in_progress_reverse_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__in_progress_reverse_swaps_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "in_progress_reverse_swaps", @@ -329,7 +343,9 @@ fn wire_in_progress_reverse_swaps_impl(port_: flutter_rust_bridge::for_generated }, ) } -fn wire_in_progress_swap_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__in_progress_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "in_progress_swap", @@ -339,7 +355,9 @@ fn wire_in_progress_swap_impl(port_: flutter_rust_bridge::for_generated::Message move || move |context| transform_result_dco((move || crate::binding::in_progress_swap())()), ) } -fn wire_is_initialized_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__is_initialized_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "is_initialized", @@ -355,7 +373,9 @@ fn wire_is_initialized_impl(port_: flutter_rust_bridge::for_generated::MessagePo }, ) } -fn wire_list_fiat_currencies_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__list_fiat_currencies_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "list_fiat_currencies", @@ -367,7 +387,7 @@ fn wire_list_fiat_currencies_impl(port_: flutter_rust_bridge::for_generated::Mes }, ) } -fn wire_list_lsps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__list_lsps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "list_lsps", @@ -377,7 +397,7 @@ fn wire_list_lsps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::list_lsps())()), ) } -fn wire_list_payments_impl( +fn wire__crate__binding__list_payments_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -393,7 +413,9 @@ fn wire_list_payments_impl( }, ) } -fn wire_list_refundables_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__list_refundables_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "list_refundables", @@ -403,7 +425,7 @@ fn wire_list_refundables_impl(port_: flutter_rust_bridge::for_generated::Message move || move |context| transform_result_dco((move || crate::binding::list_refundables())()), ) } -fn wire_lnurl_auth_impl( +fn wire__crate__binding__lnurl_auth_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req_data: impl CstDecode, ) { @@ -413,7 +435,7 @@ fn wire_lnurl_auth_impl( })()) } }) } -fn wire_lnurl_pay_impl( +fn wire__crate__binding__lnurl_pay_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -429,7 +451,7 @@ fn wire_lnurl_pay_impl( }, ) } -fn wire_lnurl_withdraw_impl( +fn wire__crate__binding__lnurl_withdraw_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -445,7 +467,7 @@ fn wire_lnurl_withdraw_impl( }, ) } -fn wire_lsp_id_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__lsp_id_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "lsp_id", @@ -455,7 +477,7 @@ fn wire_lsp_id_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::lsp_id())()), ) } -fn wire_lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "lsp_info", @@ -465,7 +487,9 @@ fn wire_lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::lsp_info())()), ) } -fn wire_max_reverse_swap_amount_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__max_reverse_swap_amount_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "max_reverse_swap_amount", @@ -479,7 +503,7 @@ fn wire_max_reverse_swap_amount_impl(port_: flutter_rust_bridge::for_generated:: }, ) } -fn wire_mnemonic_to_seed_impl( +fn wire__crate__binding__mnemonic_to_seed_impl( port_: flutter_rust_bridge::for_generated::MessagePort, phrase: impl CstDecode, ) { @@ -497,7 +521,9 @@ fn wire_mnemonic_to_seed_impl( }, ) } -fn wire_node_credentials_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__node_credentials_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "node_credentials", @@ -507,7 +533,7 @@ fn wire_node_credentials_impl(port_: flutter_rust_bridge::for_generated::Message move || move |context| transform_result_dco((move || crate::binding::node_credentials())()), ) } -fn wire_node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "node_info", @@ -517,14 +543,16 @@ fn wire_node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::node_info())()), ) } -fn wire_onchain_payment_limits_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__onchain_payment_limits_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { move |context| { transform_result_dco((move || { crate::binding::onchain_payment_limits() })()) } }) } -fn wire_open_channel_fee_impl( +fn wire__crate__binding__open_channel_fee_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -542,7 +570,7 @@ fn wire_open_channel_fee_impl( }, ) } -fn wire_parse_input_impl( +fn wire__crate__binding__parse_input_impl( port_: flutter_rust_bridge::for_generated::MessagePort, input: impl CstDecode, ) { @@ -558,7 +586,7 @@ fn wire_parse_input_impl( }, ) } -fn wire_parse_invoice_impl( +fn wire__crate__binding__parse_invoice_impl( port_: flutter_rust_bridge::for_generated::MessagePort, invoice: impl CstDecode, ) { @@ -576,7 +604,7 @@ fn wire_parse_invoice_impl( }, ) } -fn wire_pay_onchain_impl( +fn wire__crate__binding__pay_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -592,7 +620,7 @@ fn wire_pay_onchain_impl( }, ) } -fn wire_payment_by_hash_impl( +fn wire__crate__binding__payment_by_hash_impl( port_: flutter_rust_bridge::for_generated::MessagePort, hash: impl CstDecode, ) { @@ -610,7 +638,7 @@ fn wire_payment_by_hash_impl( }, ) } -fn wire_prepare_onchain_payment_impl( +fn wire__crate__binding__prepare_onchain_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -628,7 +656,7 @@ fn wire_prepare_onchain_payment_impl( }, ) } -fn wire_prepare_redeem_onchain_funds_impl( +fn wire__crate__binding__prepare_redeem_onchain_funds_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -648,7 +676,7 @@ fn wire_prepare_redeem_onchain_funds_impl( }, ) } -fn wire_prepare_refund_impl( +fn wire__crate__binding__prepare_refund_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -664,7 +692,7 @@ fn wire_prepare_refund_impl( }, ) } -fn wire_receive_onchain_impl( +fn wire__crate__binding__receive_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -674,7 +702,7 @@ fn wire_receive_onchain_impl( })()) } }) } -fn wire_receive_payment_impl( +fn wire__crate__binding__receive_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -684,7 +712,9 @@ fn wire_receive_payment_impl( })()) } }) } -fn wire_recommended_fees_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__recommended_fees_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, +) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "recommended_fees", @@ -694,7 +724,7 @@ fn wire_recommended_fees_impl(port_: flutter_rust_bridge::for_generated::Message move || move |context| transform_result_dco((move || crate::binding::recommended_fees())()), ) } -fn wire_redeem_onchain_funds_impl( +fn wire__crate__binding__redeem_onchain_funds_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -712,7 +742,7 @@ fn wire_redeem_onchain_funds_impl( }, ) } -fn wire_redeem_swap_impl( +fn wire__crate__binding__redeem_swap_impl( port_: flutter_rust_bridge::for_generated::MessagePort, swap_address: impl CstDecode, ) { @@ -730,7 +760,7 @@ fn wire_redeem_swap_impl( }, ) } -fn wire_refund_impl( +fn wire__crate__binding__refund_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -746,7 +776,7 @@ fn wire_refund_impl( }, ) } -fn wire_register_webhook_impl( +fn wire__crate__binding__register_webhook_impl( port_: flutter_rust_bridge::for_generated::MessagePort, webhook_url: impl CstDecode, ) { @@ -764,7 +794,7 @@ fn wire_register_webhook_impl( }, ) } -fn wire_report_issue_impl( +fn wire__crate__binding__report_issue_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -780,7 +810,7 @@ fn wire_report_issue_impl( }, ) } -fn wire_rescan_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__rescan_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "rescan_swaps", @@ -790,7 +820,7 @@ fn wire_rescan_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort move || move |context| transform_result_dco((move || crate::binding::rescan_swaps())()), ) } -fn wire_send_onchain_impl( +fn wire__crate__binding__send_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -806,7 +836,7 @@ fn wire_send_onchain_impl( }, ) } -fn wire_send_payment_impl( +fn wire__crate__binding__send_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -822,7 +852,7 @@ fn wire_send_payment_impl( }, ) } -fn wire_send_spontaneous_payment_impl( +fn wire__crate__binding__send_spontaneous_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -840,7 +870,7 @@ fn wire_send_spontaneous_payment_impl( }, ) } -fn wire_service_health_check_impl( +fn wire__crate__binding__service_health_check_impl( port_: flutter_rust_bridge::for_generated::MessagePort, api_key: impl CstDecode, ) { @@ -858,7 +888,7 @@ fn wire_service_health_check_impl( }, ) } -fn wire_set_payment_metadata_impl( +fn wire__crate__binding__set_payment_metadata_impl( port_: flutter_rust_bridge::for_generated::MessagePort, hash: impl CstDecode, metadata: impl CstDecode, @@ -880,7 +910,7 @@ fn wire_set_payment_metadata_impl( }, ) } -fn wire_sign_message_impl( +fn wire__crate__binding__sign_message_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -896,7 +926,7 @@ fn wire_sign_message_impl( }, ) } -fn wire_static_backup_impl( +fn wire__crate__binding__static_backup_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { @@ -912,7 +942,7 @@ fn wire_static_backup_impl( }, ) } -fn wire_sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { +fn wire__crate__binding__sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { debug_name: "sync", @@ -922,7 +952,7 @@ fn wire_sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { move || move |context| transform_result_dco((move || crate::binding::sync())()), ) } -fn wire_unregister_webhook_impl( +fn wire__crate__binding__unregister_webhook_impl( port_: flutter_rust_bridge::for_generated::MessagePort, webhook_url: impl CstDecode, ) { @@ -1120,7 +1150,8 @@ impl CstDecode for u8 { 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 { - unreachable!(""); + let mut inner = ::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner); } } diff --git a/libs/sdk-flutter/README.md b/libs/sdk-flutter/README.md index 389f29d46..fc460eca4 100644 --- a/libs/sdk-flutter/README.md +++ b/libs/sdk-flutter/README.md @@ -26,7 +26,7 @@ cargo install cargo-ndk ``` * Install [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge): ``` -cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.33 +cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.36 ``` ## Building the plugin diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index 5f161dc2a..47168ce1f 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -898,153 +898,169 @@ typedef struct wire_cst_static_backup_response { struct wire_cst_list_String *backup; } wire_cst_static_backup_response; -void frbgen_breez_sdk_wire_backup(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__backup(int64_t port_); -void frbgen_breez_sdk_wire_backup_status(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__backup_status(int64_t port_); -void frbgen_breez_sdk_wire_breez_events_stream(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +void frbgen_breez_sdk_wire__crate__binding__breez_events_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_breez_sdk_wire_breez_log_stream(int64_t port_, struct wire_cst_list_prim_u_8_strict *s); +void frbgen_breez_sdk_wire__crate__binding__breez_log_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_breez_sdk_wire_buy_bitcoin(int64_t port_, struct wire_cst_buy_bitcoin_request *req); +void frbgen_breez_sdk_wire__crate__binding__buy_bitcoin(int64_t port_, + struct wire_cst_buy_bitcoin_request *req); -void frbgen_breez_sdk_wire_check_message(int64_t port_, struct wire_cst_check_message_request *req); +void frbgen_breez_sdk_wire__crate__binding__check_message(int64_t port_, + struct wire_cst_check_message_request *req); -void frbgen_breez_sdk_wire_close_lsp_channels(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(int64_t port_); -void frbgen_breez_sdk_wire_configure_node(int64_t port_, - struct wire_cst_configure_node_request *req); +void frbgen_breez_sdk_wire__crate__binding__configure_node(int64_t port_, + struct wire_cst_configure_node_request *req); -void frbgen_breez_sdk_wire_connect(int64_t port_, struct wire_cst_connect_request *req); +void frbgen_breez_sdk_wire__crate__binding__connect(int64_t port_, + struct wire_cst_connect_request *req); -void frbgen_breez_sdk_wire_connect_lsp(int64_t port_, struct wire_cst_list_prim_u_8_strict *lsp_id); +void frbgen_breez_sdk_wire__crate__binding__connect_lsp(int64_t port_, + struct wire_cst_list_prim_u_8_strict *lsp_id); -void frbgen_breez_sdk_wire_default_config(int64_t port_, - int32_t env_type, - struct wire_cst_list_prim_u_8_strict *api_key, - struct wire_cst_node_config *node_config); +void frbgen_breez_sdk_wire__crate__binding__default_config(int64_t port_, + int32_t env_type, + struct wire_cst_list_prim_u_8_strict *api_key, + struct wire_cst_node_config *node_config); -void frbgen_breez_sdk_wire_disconnect(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__disconnect(int64_t port_); -void frbgen_breez_sdk_wire_execute_command(int64_t port_, - struct wire_cst_list_prim_u_8_strict *command); +void frbgen_breez_sdk_wire__crate__binding__execute_command(int64_t port_, + struct wire_cst_list_prim_u_8_strict *command); -void frbgen_breez_sdk_wire_fetch_fiat_rates(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates(int64_t port_); -void frbgen_breez_sdk_wire_fetch_lsp_info(int64_t port_, struct wire_cst_list_prim_u_8_strict *id); +void frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info(int64_t port_, + struct wire_cst_list_prim_u_8_strict *id); -void frbgen_breez_sdk_wire_fetch_reverse_swap_fees(int64_t port_, - struct wire_cst_reverse_swap_fees_request *req); +void frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees(int64_t port_, + struct wire_cst_reverse_swap_fees_request *req); -void frbgen_breez_sdk_wire_generate_diagnostic_data(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data(int64_t port_); -void frbgen_breez_sdk_wire_in_progress_onchain_payments(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments(int64_t port_); -void frbgen_breez_sdk_wire_in_progress_reverse_swaps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(int64_t port_); -void frbgen_breez_sdk_wire_in_progress_swap(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__in_progress_swap(int64_t port_); -void frbgen_breez_sdk_wire_is_initialized(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__is_initialized(int64_t port_); -void frbgen_breez_sdk_wire_list_fiat_currencies(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(int64_t port_); -void frbgen_breez_sdk_wire_list_lsps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__list_lsps(int64_t port_); -void frbgen_breez_sdk_wire_list_payments(int64_t port_, struct wire_cst_list_payments_request *req); +void frbgen_breez_sdk_wire__crate__binding__list_payments(int64_t port_, + struct wire_cst_list_payments_request *req); -void frbgen_breez_sdk_wire_list_refundables(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__list_refundables(int64_t port_); -void frbgen_breez_sdk_wire_lnurl_auth(int64_t port_, - struct wire_cst_ln_url_auth_request_data *req_data); +void frbgen_breez_sdk_wire__crate__binding__lnurl_auth(int64_t port_, + struct wire_cst_ln_url_auth_request_data *req_data); -void frbgen_breez_sdk_wire_lnurl_pay(int64_t port_, struct wire_cst_ln_url_pay_request *req); +void frbgen_breez_sdk_wire__crate__binding__lnurl_pay(int64_t port_, + struct wire_cst_ln_url_pay_request *req); -void frbgen_breez_sdk_wire_lnurl_withdraw(int64_t port_, - struct wire_cst_ln_url_withdraw_request *req); +void frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw(int64_t port_, + struct wire_cst_ln_url_withdraw_request *req); -void frbgen_breez_sdk_wire_lsp_id(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__lsp_id(int64_t port_); -void frbgen_breez_sdk_wire_lsp_info(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__lsp_info(int64_t port_); -void frbgen_breez_sdk_wire_max_reverse_swap_amount(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount(int64_t port_); -void frbgen_breez_sdk_wire_mnemonic_to_seed(int64_t port_, - struct wire_cst_list_prim_u_8_strict *phrase); +void frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed(int64_t port_, + struct wire_cst_list_prim_u_8_strict *phrase); -void frbgen_breez_sdk_wire_node_credentials(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__node_credentials(int64_t port_); -void frbgen_breez_sdk_wire_node_info(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__node_info(int64_t port_); -void frbgen_breez_sdk_wire_onchain_payment_limits(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(int64_t port_); -void frbgen_breez_sdk_wire_open_channel_fee(int64_t port_, - struct wire_cst_open_channel_fee_request *req); +void frbgen_breez_sdk_wire__crate__binding__open_channel_fee(int64_t port_, + struct wire_cst_open_channel_fee_request *req); -void frbgen_breez_sdk_wire_parse_input(int64_t port_, struct wire_cst_list_prim_u_8_strict *input); +void frbgen_breez_sdk_wire__crate__binding__parse_input(int64_t port_, + struct wire_cst_list_prim_u_8_strict *input); -void frbgen_breez_sdk_wire_parse_invoice(int64_t port_, - struct wire_cst_list_prim_u_8_strict *invoice); +void frbgen_breez_sdk_wire__crate__binding__parse_invoice(int64_t port_, + struct wire_cst_list_prim_u_8_strict *invoice); -void frbgen_breez_sdk_wire_pay_onchain(int64_t port_, struct wire_cst_pay_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__pay_onchain(int64_t port_, + struct wire_cst_pay_onchain_request *req); -void frbgen_breez_sdk_wire_payment_by_hash(int64_t port_, - struct wire_cst_list_prim_u_8_strict *hash); +void frbgen_breez_sdk_wire__crate__binding__payment_by_hash(int64_t port_, + struct wire_cst_list_prim_u_8_strict *hash); -void frbgen_breez_sdk_wire_prepare_onchain_payment(int64_t port_, - struct wire_cst_prepare_onchain_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment(int64_t port_, + struct wire_cst_prepare_onchain_payment_request *req); -void frbgen_breez_sdk_wire_prepare_redeem_onchain_funds(int64_t port_, - struct wire_cst_prepare_redeem_onchain_funds_request *req); +void frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds(int64_t port_, + struct wire_cst_prepare_redeem_onchain_funds_request *req); -void frbgen_breez_sdk_wire_prepare_refund(int64_t port_, - struct wire_cst_prepare_refund_request *req); +void frbgen_breez_sdk_wire__crate__binding__prepare_refund(int64_t port_, + struct wire_cst_prepare_refund_request *req); -void frbgen_breez_sdk_wire_receive_onchain(int64_t port_, - struct wire_cst_receive_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__receive_onchain(int64_t port_, + struct wire_cst_receive_onchain_request *req); -void frbgen_breez_sdk_wire_receive_payment(int64_t port_, - struct wire_cst_receive_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__receive_payment(int64_t port_, + struct wire_cst_receive_payment_request *req); -void frbgen_breez_sdk_wire_recommended_fees(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__recommended_fees(int64_t port_); -void frbgen_breez_sdk_wire_redeem_onchain_funds(int64_t port_, - struct wire_cst_redeem_onchain_funds_request *req); +void frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds(int64_t port_, + struct wire_cst_redeem_onchain_funds_request *req); -void frbgen_breez_sdk_wire_redeem_swap(int64_t port_, - struct wire_cst_list_prim_u_8_strict *swap_address); +void frbgen_breez_sdk_wire__crate__binding__redeem_swap(int64_t port_, + struct wire_cst_list_prim_u_8_strict *swap_address); -void frbgen_breez_sdk_wire_refund(int64_t port_, struct wire_cst_refund_request *req); +void frbgen_breez_sdk_wire__crate__binding__refund(int64_t port_, + struct wire_cst_refund_request *req); -void frbgen_breez_sdk_wire_register_webhook(int64_t port_, - struct wire_cst_list_prim_u_8_strict *webhook_url); +void frbgen_breez_sdk_wire__crate__binding__register_webhook(int64_t port_, + struct wire_cst_list_prim_u_8_strict *webhook_url); -void frbgen_breez_sdk_wire_report_issue(int64_t port_, struct wire_cst_report_issue_request *req); +void frbgen_breez_sdk_wire__crate__binding__report_issue(int64_t port_, + struct wire_cst_report_issue_request *req); -void frbgen_breez_sdk_wire_rescan_swaps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__rescan_swaps(int64_t port_); -void frbgen_breez_sdk_wire_send_onchain(int64_t port_, struct wire_cst_send_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__send_onchain(int64_t port_, + struct wire_cst_send_onchain_request *req); -void frbgen_breez_sdk_wire_send_payment(int64_t port_, struct wire_cst_send_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__send_payment(int64_t port_, + struct wire_cst_send_payment_request *req); -void frbgen_breez_sdk_wire_send_spontaneous_payment(int64_t port_, - struct wire_cst_send_spontaneous_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment(int64_t port_, + struct wire_cst_send_spontaneous_payment_request *req); -void frbgen_breez_sdk_wire_service_health_check(int64_t port_, - struct wire_cst_list_prim_u_8_strict *api_key); +void frbgen_breez_sdk_wire__crate__binding__service_health_check(int64_t port_, + struct wire_cst_list_prim_u_8_strict *api_key); -void frbgen_breez_sdk_wire_set_payment_metadata(int64_t port_, - struct wire_cst_list_prim_u_8_strict *hash, - struct wire_cst_list_prim_u_8_strict *metadata); +void frbgen_breez_sdk_wire__crate__binding__set_payment_metadata(int64_t port_, + struct wire_cst_list_prim_u_8_strict *hash, + struct wire_cst_list_prim_u_8_strict *metadata); -void frbgen_breez_sdk_wire_sign_message(int64_t port_, struct wire_cst_sign_message_request *req); +void frbgen_breez_sdk_wire__crate__binding__sign_message(int64_t port_, + struct wire_cst_sign_message_request *req); -void frbgen_breez_sdk_wire_static_backup(int64_t port_, struct wire_cst_static_backup_request *req); +void frbgen_breez_sdk_wire__crate__binding__static_backup(int64_t port_, + struct wire_cst_static_backup_request *req); -void frbgen_breez_sdk_wire_sync(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__sync(int64_t port_); -void frbgen_breez_sdk_wire_unregister_webhook(int64_t port_, - struct wire_cst_list_prim_u_8_strict *webhook_url); +void frbgen_breez_sdk_wire__crate__binding__unregister_webhook(int64_t port_, + struct wire_cst_list_prim_u_8_strict *webhook_url); struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); @@ -1269,67 +1285,67 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_swap_info); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_tlv_entry); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_backup); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_backup_status); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_breez_events_stream); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_breez_log_stream); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_buy_bitcoin); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_check_message); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_close_lsp_channels); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_configure_node); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_connect); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_connect_lsp); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_default_config); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_disconnect); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_execute_command); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_fiat_rates); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_lsp_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_fetch_reverse_swap_fees); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_generate_diagnostic_data); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_onchain_payments); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_reverse_swaps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_in_progress_swap); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_is_initialized); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_fiat_currencies); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_lsps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_payments); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_list_refundables); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_auth); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_pay); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lnurl_withdraw); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lsp_id); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_lsp_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_max_reverse_swap_amount); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_mnemonic_to_seed); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_node_credentials); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_node_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_onchain_payment_limits); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_open_channel_fee); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_parse_input); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_parse_invoice); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_pay_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_payment_by_hash); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_onchain_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_prepare_refund); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_receive_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_receive_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_recommended_fees); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_redeem_swap); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_refund); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_register_webhook); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_report_issue); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_rescan_swaps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_send_spontaneous_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_service_health_check); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_set_payment_metadata); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sign_message); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_static_backup); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_sync); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire_unregister_webhook); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_events_stream); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_log_stream); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__buy_bitcoin); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__close_lsp_channels); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__configure_node); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect_lsp); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__default_config); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__disconnect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__execute_command); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__is_initialized); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_lsps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_refundables); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_auth); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_pay); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lsp_id); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__node_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__node_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__open_channel_fee); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__parse_input); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__parse_invoice); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__pay_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__payment_by_hash); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__receive_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__receive_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__recommended_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__redeem_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__register_webhook); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__report_issue); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__rescan_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__service_health_check); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__set_payment_metadata); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__sign_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__static_backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__sync); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__unregister_webhook); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); return dummy_var; } diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 5ee6624bf..40a27f5fb 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -19,39 +19,40 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; /// Wrapper around [BreezServices::connect] which also initializes SDK logging Future connect({required ConnectRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.connect(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingConnect(req: req, hint: hint); /// Check whether node service is initialized or not -Future isInitialized({dynamic hint}) => BreezSdkBindings.instance.api.isInitialized(hint: hint); +Future isInitialized({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingIsInitialized(hint: hint); /// See [BreezServices::sync] -Future sync({dynamic hint}) => BreezSdkBindings.instance.api.sync(hint: hint); +Future sync({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingSync(hint: hint); /// See [BreezServices::node_credentials] Future nodeCredentials({dynamic hint}) => - BreezSdkBindings.instance.api.nodeCredentials(hint: hint); + BreezSdkBindings.instance.api.crateBindingNodeCredentials(hint: hint); /// See [BreezServices::node_info] -Future nodeInfo({dynamic hint}) => BreezSdkBindings.instance.api.nodeInfo(hint: hint); +Future nodeInfo({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingNodeInfo(hint: hint); /// See [BreezServices::configure_node] Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.configureNode(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingConfigureNode(req: req, hint: hint); /// Cleanup node resources and stop the signer. -Future disconnect({dynamic hint}) => BreezSdkBindings.instance.api.disconnect(hint: hint); +Future disconnect({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingDisconnect(hint: hint); /// See [BreezServices::sign_message] Future signMessage({required SignMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.signMessage(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingSignMessage(req: req, hint: hint); /// See [BreezServices::check_message] Future checkMessage({required CheckMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.checkMessage(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingCheckMessage(req: req, hint: hint); /// See [breez_services::mnemonic_to_seed] Future mnemonicToSeed({required String phrase, dynamic hint}) => - BreezSdkBindings.instance.api.mnemonicToSeed(phrase: phrase, hint: hint); + BreezSdkBindings.instance.api.crateBindingMnemonicToSeed(phrase: phrase, hint: hint); /// See [BreezServices::default_config] Future defaultConfig( @@ -60,194 +61,201 @@ Future defaultConfig( required NodeConfig nodeConfig, dynamic hint}) => BreezSdkBindings.instance.api - .defaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, hint: hint); + .crateBindingDefaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, hint: hint); /// See [BreezServices::static_backup] Future staticBackup({required StaticBackupRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.staticBackup(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingStaticBackup(req: req, hint: hint); /// See [BreezServices::service_health_check] Future serviceHealthCheck({required String apiKey, dynamic hint}) => - BreezSdkBindings.instance.api.serviceHealthCheck(apiKey: apiKey, hint: hint); + BreezSdkBindings.instance.api.crateBindingServiceHealthCheck(apiKey: apiKey, hint: hint); /// If used, this must be called before `connect`. It can only be called once. Stream breezEventsStream({dynamic hint}) => - BreezSdkBindings.instance.api.breezEventsStream(hint: hint); + BreezSdkBindings.instance.api.crateBindingBreezEventsStream(hint: hint); /// If used, this must be called before `connect`. It can only be called once. -Stream breezLogStream({dynamic hint}) => BreezSdkBindings.instance.api.breezLogStream(hint: hint); +Stream breezLogStream({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBreezLogStream(hint: hint); /// See [BreezServices::list_lsps] -Future> listLsps({dynamic hint}) => BreezSdkBindings.instance.api.listLsps(hint: hint); +Future> listLsps({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingListLsps(hint: hint); /// See [BreezServices::connect_lsp] Future connectLsp({required String lspId, dynamic hint}) => - BreezSdkBindings.instance.api.connectLsp(lspId: lspId, hint: hint); + BreezSdkBindings.instance.api.crateBindingConnectLsp(lspId: lspId, hint: hint); /// See [BreezServices::lsp_id] -Future lspId({dynamic hint}) => BreezSdkBindings.instance.api.lspId(hint: hint); +Future lspId({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingLspId(hint: hint); /// See [BreezServices::fetch_lsp_info] Future fetchLspInfo({required String id, dynamic hint}) => - BreezSdkBindings.instance.api.fetchLspInfo(id: id, hint: hint); + BreezSdkBindings.instance.api.crateBindingFetchLspInfo(id: id, hint: hint); /// See [BreezServices::lsp_info] -Future lspInfo({dynamic hint}) => BreezSdkBindings.instance.api.lspInfo(hint: hint); +Future lspInfo({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingLspInfo(hint: hint); /// See [BreezServices::close_lsp_channels] -Future closeLspChannels({dynamic hint}) => BreezSdkBindings.instance.api.closeLspChannels(hint: hint); +Future closeLspChannels({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingCloseLspChannels(hint: hint); Future registerWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.registerWebhook(webhookUrl: webhookUrl, hint: hint); + BreezSdkBindings.instance.api.crateBindingRegisterWebhook(webhookUrl: webhookUrl, hint: hint); Future unregisterWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.unregisterWebhook(webhookUrl: webhookUrl, hint: hint); + BreezSdkBindings.instance.api.crateBindingUnregisterWebhook(webhookUrl: webhookUrl, hint: hint); /// See [BreezServices::backup] -Future backup({dynamic hint}) => BreezSdkBindings.instance.api.backup(hint: hint); +Future backup({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingBackup(hint: hint); /// See [BreezServices::backup_status] -Future backupStatus({dynamic hint}) => BreezSdkBindings.instance.api.backupStatus(hint: hint); +Future backupStatus({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBackupStatus(hint: hint); Future parseInvoice({required String invoice, dynamic hint}) => - BreezSdkBindings.instance.api.parseInvoice(invoice: invoice, hint: hint); + BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice, hint: hint); Future parseInput({required String input, dynamic hint}) => - BreezSdkBindings.instance.api.parseInput(input: input, hint: hint); + BreezSdkBindings.instance.api.crateBindingParseInput(input: input, hint: hint); /// See [BreezServices::list_payments] Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.listPayments(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingListPayments(req: req, hint: hint); /// See [BreezServices::list_payments] Future paymentByHash({required String hash, dynamic hint}) => - BreezSdkBindings.instance.api.paymentByHash(hash: hash, hint: hint); + BreezSdkBindings.instance.api.crateBindingPaymentByHash(hash: hash, hint: hint); /// See [BreezServices::set_payment_metadata] Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => - BreezSdkBindings.instance.api.setPaymentMetadata(hash: hash, metadata: metadata, hint: hint); + BreezSdkBindings.instance.api.crateBindingSetPaymentMetadata(hash: hash, metadata: metadata, hint: hint); /// See [BreezServices::send_payment] Future sendPayment({required SendPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.sendPayment(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingSendPayment(req: req, hint: hint); /// See [BreezServices::send_spontaneous_payment] Future sendSpontaneousPayment( {required SendSpontaneousPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.sendSpontaneousPayment(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingSendSpontaneousPayment(req: req, hint: hint); /// See [BreezServices::receive_payment] Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.receivePayment(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingReceivePayment(req: req, hint: hint); /// See [BreezServices::lnurl_pay] Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.lnurlPay(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingLnurlPay(req: req, hint: hint); /// See [BreezServices::lnurl_withdraw] Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.lnurlWithdraw(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingLnurlWithdraw(req: req, hint: hint); /// See [BreezServices::lnurl_auth] Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => - BreezSdkBindings.instance.api.lnurlAuth(reqData: reqData, hint: hint); + BreezSdkBindings.instance.api.crateBindingLnurlAuth(reqData: reqData, hint: hint); /// See [BreezServices::report_issue] Future reportIssue({required ReportIssueRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.reportIssue(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingReportIssue(req: req, hint: hint); /// See [BreezServices::fetch_fiat_rates] -Future> fetchFiatRates({dynamic hint}) => BreezSdkBindings.instance.api.fetchFiatRates(hint: hint); +Future> fetchFiatRates({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingFetchFiatRates(hint: hint); /// See [BreezServices::list_fiat_currencies] Future> listFiatCurrencies({dynamic hint}) => - BreezSdkBindings.instance.api.listFiatCurrencies(hint: hint); + BreezSdkBindings.instance.api.crateBindingListFiatCurrencies(hint: hint); /// See [BreezServices::max_reverse_swap_amount] Future maxReverseSwapAmount({dynamic hint}) => - BreezSdkBindings.instance.api.maxReverseSwapAmount(hint: hint); + BreezSdkBindings.instance.api.crateBindingMaxReverseSwapAmount(hint: hint); /// See [BreezServices::send_onchain] Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.sendOnchain(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingSendOnchain(req: req, hint: hint); /// See [BreezServices::pay_onchain] Future payOnchain({required PayOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.payOnchain(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingPayOnchain(req: req, hint: hint); /// See [BreezServices::receive_onchain] Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.receiveOnchain(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingReceiveOnchain(req: req, hint: hint); /// See [BreezServices::buy_bitcoin] Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.buyBitcoin(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingBuyBitcoin(req: req, hint: hint); /// See [BreezServices::redeem_onchain_funds] Future redeemOnchainFunds( {required RedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.redeemOnchainFunds(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingRedeemOnchainFunds(req: req, hint: hint); /// See [BreezServices::prepare_redeem_onchain_funds] Future prepareRedeemOnchainFunds( {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.prepareRedeemOnchainFunds(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingPrepareRedeemOnchainFunds(req: req, hint: hint); /// See [BreezServices::list_refundables] Future> listRefundables({dynamic hint}) => - BreezSdkBindings.instance.api.listRefundables(hint: hint); + BreezSdkBindings.instance.api.crateBindingListRefundables(hint: hint); /// See [BreezServices::prepare_refund] Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.prepareRefund(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingPrepareRefund(req: req, hint: hint); /// See [BreezServices::refund] Future refund({required RefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.refund(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingRefund(req: req, hint: hint); /// See [BreezServices::rescan_swaps] -Future rescanSwaps({dynamic hint}) => BreezSdkBindings.instance.api.rescanSwaps(hint: hint); +Future rescanSwaps({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingRescanSwaps(hint: hint); /// See [BreezServices::redeem_swap] Future redeemSwap({required String swapAddress, dynamic hint}) => - BreezSdkBindings.instance.api.redeemSwap(swapAddress: swapAddress, hint: hint); + BreezSdkBindings.instance.api.crateBindingRedeemSwap(swapAddress: swapAddress, hint: hint); /// See [BreezServices::in_progress_swap] -Future inProgressSwap({dynamic hint}) => BreezSdkBindings.instance.api.inProgressSwap(hint: hint); +Future inProgressSwap({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingInProgressSwap(hint: hint); /// See [BreezServices::in_progress_reverse_swaps] Future> inProgressReverseSwaps({dynamic hint}) => - BreezSdkBindings.instance.api.inProgressReverseSwaps(hint: hint); + BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(hint: hint); /// See [BreezServices::open_channel_fee] Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.openChannelFee(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req, hint: hint); /// See [BreezServices::fetch_reverse_swap_fees] Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.fetchReverseSwapFees(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingFetchReverseSwapFees(req: req, hint: hint); /// See [BreezServices::onchain_payment_limits] Future onchainPaymentLimits({dynamic hint}) => - BreezSdkBindings.instance.api.onchainPaymentLimits(hint: hint); + BreezSdkBindings.instance.api.crateBindingOnchainPaymentLimits(hint: hint); /// See [BreezServices::prepare_onchain_payment] Future prepareOnchainPayment( {required PrepareOnchainPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.prepareOnchainPayment(req: req, hint: hint); + BreezSdkBindings.instance.api.crateBindingPrepareOnchainPayment(req: req, hint: hint); /// See [BreezServices::in_progress_onchain_payments] Future> inProgressOnchainPayments({dynamic hint}) => - BreezSdkBindings.instance.api.inProgressOnchainPayments(hint: hint); + BreezSdkBindings.instance.api.crateBindingInProgressOnchainPayments(hint: hint); /// See [BreezServices::recommended_fees] Future recommendedFees({dynamic hint}) => - BreezSdkBindings.instance.api.recommendedFees(hint: hint); + BreezSdkBindings.instance.api.crateBindingRecommendedFees(hint: hint); /// See [BreezServices::execute_dev_command] Future executeCommand({required String command, dynamic hint}) => - BreezSdkBindings.instance.api.executeCommand(command: command, hint: hint); + BreezSdkBindings.instance.api.crateBindingExecuteCommand(command: command, hint: hint); /// See [BreezServices::generate_diagnostic_data] Future generateDiagnosticData({dynamic hint}) => - BreezSdkBindings.instance.api.generateDiagnosticData(hint: hint); + BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(hint: hint); diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 428840085..9c9af8a7f 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart index 1076b7395..9bac18922 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart @@ -100,14 +100,12 @@ mixin _$BreezEvent { /// @nodoc abstract class $BreezEventCopyWith<$Res> { - factory $BreezEventCopyWith( - BreezEvent value, $Res Function(BreezEvent) then) = + factory $BreezEventCopyWith(BreezEvent value, $Res Function(BreezEvent) then) = _$BreezEventCopyWithImpl<$Res, BreezEvent>; } /// @nodoc -class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> - implements $BreezEventCopyWith<$Res> { +class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> implements $BreezEventCopyWith<$Res> { _$BreezEventCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -118,8 +116,8 @@ class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> /// @nodoc abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { - factory _$$BreezEvent_NewBlockImplCopyWith(_$BreezEvent_NewBlockImpl value, - $Res Function(_$BreezEvent_NewBlockImpl) then) = + factory _$$BreezEvent_NewBlockImplCopyWith( + _$BreezEvent_NewBlockImpl value, $Res Function(_$BreezEvent_NewBlockImpl) then) = __$$BreezEvent_NewBlockImplCopyWithImpl<$Res>; @useResult $Res call({int block}); @@ -129,8 +127,8 @@ abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { class __$$BreezEvent_NewBlockImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_NewBlockImpl> implements _$$BreezEvent_NewBlockImplCopyWith<$Res> { - __$$BreezEvent_NewBlockImplCopyWithImpl(_$BreezEvent_NewBlockImpl _value, - $Res Function(_$BreezEvent_NewBlockImpl) _then) + __$$BreezEvent_NewBlockImplCopyWithImpl( + _$BreezEvent_NewBlockImpl _value, $Res Function(_$BreezEvent_NewBlockImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -175,8 +173,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { @override @pragma('vm:prefer-inline') _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>( - this, _$identity); + __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>(this, _$identity); @override @optionalTypeArgs @@ -284,8 +281,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { } abstract class BreezEvent_NewBlock extends BreezEvent { - const factory BreezEvent_NewBlock({required final int block}) = - _$BreezEvent_NewBlockImpl; + const factory BreezEvent_NewBlock({required final int block}) = _$BreezEvent_NewBlockImpl; const BreezEvent_NewBlock._() : super._(); int get block; @@ -297,8 +293,7 @@ abstract class BreezEvent_NewBlock extends BreezEvent { /// @nodoc abstract class _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { factory _$$BreezEvent_InvoicePaidImplCopyWith( - _$BreezEvent_InvoicePaidImpl value, - $Res Function(_$BreezEvent_InvoicePaidImpl) then) = + _$BreezEvent_InvoicePaidImpl value, $Res Function(_$BreezEvent_InvoicePaidImpl) then) = __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res>; @useResult $Res call({InvoicePaidDetails details}); @@ -309,8 +304,7 @@ class __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_InvoicePaidImpl> implements _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { __$$BreezEvent_InvoicePaidImplCopyWithImpl( - _$BreezEvent_InvoicePaidImpl _value, - $Res Function(_$BreezEvent_InvoicePaidImpl) _then) + _$BreezEvent_InvoicePaidImpl _value, $Res Function(_$BreezEvent_InvoicePaidImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -354,9 +348,8 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> - get copyWith => __$$BreezEvent_InvoicePaidImplCopyWithImpl< - _$BreezEvent_InvoicePaidImpl>(this, _$identity); + _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => + __$$BreezEvent_InvoicePaidImplCopyWithImpl<_$BreezEvent_InvoicePaidImpl>(this, _$identity); @override @optionalTypeArgs @@ -464,21 +457,20 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { } abstract class BreezEvent_InvoicePaid extends BreezEvent { - const factory BreezEvent_InvoicePaid( - {required final InvoicePaidDetails details}) = + const factory BreezEvent_InvoicePaid({required final InvoicePaidDetails details}) = _$BreezEvent_InvoicePaidImpl; const BreezEvent_InvoicePaid._() : super._(); InvoicePaidDetails get details; @JsonKey(ignore: true) - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { - factory _$$BreezEvent_SyncedImplCopyWith(_$BreezEvent_SyncedImpl value, - $Res Function(_$BreezEvent_SyncedImpl) then) = + factory _$$BreezEvent_SyncedImplCopyWith( + _$BreezEvent_SyncedImpl value, $Res Function(_$BreezEvent_SyncedImpl) then) = __$$BreezEvent_SyncedImplCopyWithImpl<$Res>; } @@ -486,8 +478,8 @@ abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { class __$$BreezEvent_SyncedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SyncedImpl> implements _$$BreezEvent_SyncedImplCopyWith<$Res> { - __$$BreezEvent_SyncedImplCopyWithImpl(_$BreezEvent_SyncedImpl _value, - $Res Function(_$BreezEvent_SyncedImpl) _then) + __$$BreezEvent_SyncedImplCopyWithImpl( + _$BreezEvent_SyncedImpl _value, $Res Function(_$BreezEvent_SyncedImpl) _then) : super(_value, _then); } @@ -503,8 +495,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); } @override @@ -623,8 +614,7 @@ abstract class BreezEvent_Synced extends BreezEvent { /// @nodoc abstract class _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { factory _$$BreezEvent_PaymentSucceedImplCopyWith( - _$BreezEvent_PaymentSucceedImpl value, - $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = + _$BreezEvent_PaymentSucceedImpl value, $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res>; @useResult $Res call({Payment details}); @@ -635,8 +625,7 @@ class __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentSucceedImpl> implements _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { __$$BreezEvent_PaymentSucceedImplCopyWithImpl( - _$BreezEvent_PaymentSucceedImpl _value, - $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) + _$BreezEvent_PaymentSucceedImpl _value, $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -680,9 +669,8 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> - get copyWith => __$$BreezEvent_PaymentSucceedImplCopyWithImpl< - _$BreezEvent_PaymentSucceedImpl>(this, _$identity); + _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => + __$$BreezEvent_PaymentSucceedImplCopyWithImpl<_$BreezEvent_PaymentSucceedImpl>(this, _$identity); @override @optionalTypeArgs @@ -790,21 +778,19 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { } abstract class BreezEvent_PaymentSucceed extends BreezEvent { - const factory BreezEvent_PaymentSucceed({required final Payment details}) = - _$BreezEvent_PaymentSucceedImpl; + const factory BreezEvent_PaymentSucceed({required final Payment details}) = _$BreezEvent_PaymentSucceedImpl; const BreezEvent_PaymentSucceed._() : super._(); Payment get details; @JsonKey(ignore: true) - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { factory _$$BreezEvent_PaymentFailedImplCopyWith( - _$BreezEvent_PaymentFailedImpl value, - $Res Function(_$BreezEvent_PaymentFailedImpl) then) = + _$BreezEvent_PaymentFailedImpl value, $Res Function(_$BreezEvent_PaymentFailedImpl) then) = __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res>; @useResult $Res call({PaymentFailedData details}); @@ -815,8 +801,7 @@ class __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentFailedImpl> implements _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { __$$BreezEvent_PaymentFailedImplCopyWithImpl( - _$BreezEvent_PaymentFailedImpl _value, - $Res Function(_$BreezEvent_PaymentFailedImpl) _then) + _$BreezEvent_PaymentFailedImpl _value, $Res Function(_$BreezEvent_PaymentFailedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -860,9 +845,8 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> - get copyWith => __$$BreezEvent_PaymentFailedImplCopyWithImpl< - _$BreezEvent_PaymentFailedImpl>(this, _$identity); + _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => + __$$BreezEvent_PaymentFailedImplCopyWithImpl<_$BreezEvent_PaymentFailedImpl>(this, _$identity); @override @optionalTypeArgs @@ -970,22 +954,20 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { } abstract class BreezEvent_PaymentFailed extends BreezEvent { - const factory BreezEvent_PaymentFailed( - {required final PaymentFailedData details}) = + const factory BreezEvent_PaymentFailed({required final PaymentFailedData details}) = _$BreezEvent_PaymentFailedImpl; const BreezEvent_PaymentFailed._() : super._(); PaymentFailedData get details; @JsonKey(ignore: true) - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$BreezEvent_BackupStartedImplCopyWith<$Res> { factory _$$BreezEvent_BackupStartedImplCopyWith( - _$BreezEvent_BackupStartedImpl value, - $Res Function(_$BreezEvent_BackupStartedImpl) then) = + _$BreezEvent_BackupStartedImpl value, $Res Function(_$BreezEvent_BackupStartedImpl) then) = __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res>; } @@ -994,8 +976,7 @@ class __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupStartedImpl> implements _$$BreezEvent_BackupStartedImplCopyWith<$Res> { __$$BreezEvent_BackupStartedImplCopyWithImpl( - _$BreezEvent_BackupStartedImpl _value, - $Res Function(_$BreezEvent_BackupStartedImpl) _then) + _$BreezEvent_BackupStartedImpl _value, $Res Function(_$BreezEvent_BackupStartedImpl) _then) : super(_value, _then); } @@ -1012,8 +993,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupStartedImpl); + (other.runtimeType == runtimeType && other is _$BreezEvent_BackupStartedImpl); } @override @@ -1132,8 +1112,7 @@ abstract class BreezEvent_BackupStarted extends BreezEvent { /// @nodoc abstract class _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { factory _$$BreezEvent_BackupSucceededImplCopyWith( - _$BreezEvent_BackupSucceededImpl value, - $Res Function(_$BreezEvent_BackupSucceededImpl) then) = + _$BreezEvent_BackupSucceededImpl value, $Res Function(_$BreezEvent_BackupSucceededImpl) then) = __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res>; } @@ -1142,8 +1121,7 @@ class __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupSucceededImpl> implements _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { __$$BreezEvent_BackupSucceededImplCopyWithImpl( - _$BreezEvent_BackupSucceededImpl _value, - $Res Function(_$BreezEvent_BackupSucceededImpl) _then) + _$BreezEvent_BackupSucceededImpl _value, $Res Function(_$BreezEvent_BackupSucceededImpl) _then) : super(_value, _then); } @@ -1160,8 +1138,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupSucceededImpl); + (other.runtimeType == runtimeType && other is _$BreezEvent_BackupSucceededImpl); } @override @@ -1280,8 +1257,7 @@ abstract class BreezEvent_BackupSucceeded extends BreezEvent { /// @nodoc abstract class _$$BreezEvent_BackupFailedImplCopyWith<$Res> { factory _$$BreezEvent_BackupFailedImplCopyWith( - _$BreezEvent_BackupFailedImpl value, - $Res Function(_$BreezEvent_BackupFailedImpl) then) = + _$BreezEvent_BackupFailedImpl value, $Res Function(_$BreezEvent_BackupFailedImpl) then) = __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res>; @useResult $Res call({BackupFailedData details}); @@ -1292,8 +1268,7 @@ class __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupFailedImpl> implements _$$BreezEvent_BackupFailedImplCopyWith<$Res> { __$$BreezEvent_BackupFailedImplCopyWithImpl( - _$BreezEvent_BackupFailedImpl _value, - $Res Function(_$BreezEvent_BackupFailedImpl) _then) + _$BreezEvent_BackupFailedImpl _value, $Res Function(_$BreezEvent_BackupFailedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1337,9 +1312,8 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> - get copyWith => __$$BreezEvent_BackupFailedImplCopyWithImpl< - _$BreezEvent_BackupFailedImpl>(this, _$identity); + _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => + __$$BreezEvent_BackupFailedImplCopyWithImpl<_$BreezEvent_BackupFailedImpl>(this, _$identity); @override @optionalTypeArgs @@ -1447,22 +1421,20 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { } abstract class BreezEvent_BackupFailed extends BreezEvent { - const factory BreezEvent_BackupFailed( - {required final BackupFailedData details}) = + const factory BreezEvent_BackupFailed({required final BackupFailedData details}) = _$BreezEvent_BackupFailedImpl; const BreezEvent_BackupFailed._() : super._(); BackupFailedData get details; @JsonKey(ignore: true) - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { factory _$$BreezEvent_SwapUpdatedImplCopyWith( - _$BreezEvent_SwapUpdatedImpl value, - $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = + _$BreezEvent_SwapUpdatedImpl value, $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res>; @useResult $Res call({SwapInfo details}); @@ -1473,8 +1445,7 @@ class __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res> extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SwapUpdatedImpl> implements _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { __$$BreezEvent_SwapUpdatedImplCopyWithImpl( - _$BreezEvent_SwapUpdatedImpl _value, - $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) + _$BreezEvent_SwapUpdatedImpl _value, $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1518,9 +1489,8 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> - get copyWith => __$$BreezEvent_SwapUpdatedImplCopyWithImpl< - _$BreezEvent_SwapUpdatedImpl>(this, _$identity); + _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => + __$$BreezEvent_SwapUpdatedImplCopyWithImpl<_$BreezEvent_SwapUpdatedImpl>(this, _$identity); @override @optionalTypeArgs @@ -1628,12 +1598,11 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { } abstract class BreezEvent_SwapUpdated extends BreezEvent { - const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = - _$BreezEvent_SwapUpdatedImpl; + const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = _$BreezEvent_SwapUpdatedImpl; const BreezEvent_SwapUpdated._() : super._(); SwapInfo get details; @JsonKey(ignore: true) - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 1c9c9155f..45a52924e 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -8,11 +8,11 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; /// Wrapper containing the result of the recommended fees query, in sat/vByte, based on mempool.space data class RecommendedFees { - final int fastestFee; - final int halfHourFee; - final int hourFee; - final int economyFee; - final int minimumFee; + final BigInt fastestFee; + final BigInt halfHourFee; + final BigInt hourFee; + final BigInt economyFee; + final BigInt minimumFee; const RecommendedFees({ required this.fastestFee, diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart index 1e636cfca..5e37f8d22 100644 --- a/libs/sdk-flutter/lib/generated/fiat.dart +++ b/libs/sdk-flutter/lib/generated/fiat.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 6497297a7..99dc53fa0 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // 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 @@ -58,7 +58,7 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.33'; + String get codegenVersion => '2.0.0-dev.36'; @override int get rustContentHash => 1499828454; @@ -71,135 +71,138 @@ class BreezSdkBindings } abstract class BreezSdkBindingsApi extends BaseApi { - Future backup({dynamic hint}); + Future crateBindingBackup({dynamic hint}); - Future backupStatus({dynamic hint}); + Future crateBindingBackupStatus({dynamic hint}); - Stream breezEventsStream({dynamic hint}); + Stream crateBindingBreezEventsStream({dynamic hint}); - Stream breezLogStream({dynamic hint}); + Stream crateBindingBreezLogStream({dynamic hint}); - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}); + Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}); - Future checkMessage({required CheckMessageRequest req, dynamic hint}); + Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}); - Future closeLspChannels({dynamic hint}); + Future crateBindingCloseLspChannels({dynamic hint}); - Future configureNode({required ConfigureNodeRequest req, dynamic hint}); + Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}); - Future connect({required ConnectRequest req, dynamic hint}); + Future crateBindingConnect({required ConnectRequest req, dynamic hint}); - Future connectLsp({required String lspId, dynamic hint}); + Future crateBindingConnectLsp({required String lspId, dynamic hint}); - Future defaultConfig( + Future crateBindingDefaultConfig( {required EnvironmentType envType, required String apiKey, required NodeConfig nodeConfig, dynamic hint}); - Future disconnect({dynamic hint}); + Future crateBindingDisconnect({dynamic hint}); - Future executeCommand({required String command, dynamic hint}); + Future crateBindingExecuteCommand({required String command, dynamic hint}); - Future> fetchFiatRates({dynamic hint}); + Future> crateBindingFetchFiatRates({dynamic hint}); - Future fetchLspInfo({required String id, dynamic hint}); + Future crateBindingFetchLspInfo({required String id, dynamic hint}); - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}); + Future crateBindingFetchReverseSwapFees( + {required ReverseSwapFeesRequest req, dynamic hint}); - Future generateDiagnosticData({dynamic hint}); + Future crateBindingGenerateDiagnosticData({dynamic hint}); - Future> inProgressOnchainPayments({dynamic hint}); + Future> crateBindingInProgressOnchainPayments({dynamic hint}); - Future> inProgressReverseSwaps({dynamic hint}); + Future> crateBindingInProgressReverseSwaps({dynamic hint}); - Future inProgressSwap({dynamic hint}); + Future crateBindingInProgressSwap({dynamic hint}); - Future isInitialized({dynamic hint}); + Future crateBindingIsInitialized({dynamic hint}); - Future> listFiatCurrencies({dynamic hint}); + Future> crateBindingListFiatCurrencies({dynamic hint}); - Future> listLsps({dynamic hint}); + Future> crateBindingListLsps({dynamic hint}); - Future> listPayments({required ListPaymentsRequest req, dynamic hint}); + Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}); - Future> listRefundables({dynamic hint}); + Future> crateBindingListRefundables({dynamic hint}); - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); + Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}); + Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}); - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); + Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); - Future lspId({dynamic hint}); + Future crateBindingLspId({dynamic hint}); - Future lspInfo({dynamic hint}); + Future crateBindingLspInfo({dynamic hint}); - Future maxReverseSwapAmount({dynamic hint}); + Future crateBindingMaxReverseSwapAmount({dynamic hint}); - Future mnemonicToSeed({required String phrase, dynamic hint}); + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}); - Future nodeCredentials({dynamic hint}); + Future crateBindingNodeCredentials({dynamic hint}); - Future nodeInfo({dynamic hint}); + Future crateBindingNodeInfo({dynamic hint}); - Future onchainPaymentLimits({dynamic hint}); + Future crateBindingOnchainPaymentLimits({dynamic hint}); - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}); + Future crateBindingOpenChannelFee( + {required OpenChannelFeeRequest req, dynamic hint}); - Future parseInput({required String input, dynamic hint}); + Future crateBindingParseInput({required String input, dynamic hint}); - Future parseInvoice({required String invoice, dynamic hint}); + Future crateBindingParseInvoice({required String invoice, dynamic hint}); - Future payOnchain({required PayOnchainRequest req, dynamic hint}); + Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}); - Future paymentByHash({required String hash, dynamic hint}); + Future crateBindingPaymentByHash({required String hash, dynamic hint}); - Future prepareOnchainPayment( + Future crateBindingPrepareOnchainPayment( {required PrepareOnchainPaymentRequest req, dynamic hint}); - Future prepareRedeemOnchainFunds( + Future crateBindingPrepareRedeemOnchainFunds( {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}); + Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}); - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); + Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}); + Future crateBindingReceivePayment( + {required ReceivePaymentRequest req, dynamic hint}); - Future recommendedFees({dynamic hint}); + Future crateBindingRecommendedFees({dynamic hint}); - Future redeemOnchainFunds( + Future crateBindingRedeemOnchainFunds( {required RedeemOnchainFundsRequest req, dynamic hint}); - Future redeemSwap({required String swapAddress, dynamic hint}); + Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}); - Future refund({required RefundRequest req, dynamic hint}); + Future crateBindingRefund({required RefundRequest req, dynamic hint}); - Future registerWebhook({required String webhookUrl, dynamic hint}); + Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}); - Future reportIssue({required ReportIssueRequest req, dynamic hint}); + Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}); - Future rescanSwaps({dynamic hint}); + Future crateBindingRescanSwaps({dynamic hint}); - Future sendOnchain({required SendOnchainRequest req, dynamic hint}); + Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}); - Future sendPayment({required SendPaymentRequest req, dynamic hint}); + Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}); - Future sendSpontaneousPayment( + Future crateBindingSendSpontaneousPayment( {required SendSpontaneousPaymentRequest req, dynamic hint}); - Future serviceHealthCheck({required String apiKey, dynamic hint}); + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}); - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}); + Future crateBindingSetPaymentMetadata({required String hash, required String metadata, dynamic hint}); - Future signMessage({required SignMessageRequest req, dynamic hint}); + Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}); - Future staticBackup({required StaticBackupRequest req, dynamic hint}); + Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}); - Future sync({dynamic hint}); + Future crateBindingSync({dynamic hint}); - Future unregisterWebhook({required String webhookUrl, dynamic hint}); + Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}); } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -211,62 +214,62 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements }); @override - Future backup({dynamic hint}) { + Future crateBindingBackup({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_backup(port_); + return wire.wire__crate__binding__backup(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kBackupConstMeta, + constMeta: kCrateBindingBackupConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBackupConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingBackupConstMeta => const TaskConstMeta( debugName: "backup", argNames: [], ); @override - Future backupStatus({dynamic hint}) { + Future crateBindingBackupStatus({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_backup_status(port_); + return wire.wire__crate__binding__backup_status(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_backup_status, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kBackupStatusConstMeta, + constMeta: kCrateBindingBackupStatusConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBackupStatusConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingBackupStatusConstMeta => const TaskConstMeta( debugName: "backup_status", argNames: [], ); @override - Stream breezEventsStream({dynamic hint}) { + Stream crateBindingBreezEventsStream({dynamic hint}) { final s = RustStreamSink(); unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_StreamSink_breez_event_Dco(s); - return wire.wire_breez_events_stream(port_, arg0); + return wire.wire__crate__binding__breez_events_stream(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kBreezEventsStreamConstMeta, + constMeta: kCrateBindingBreezEventsStreamConstMeta, argValues: [s], apiImpl: this, hint: hint, @@ -274,24 +277,24 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return s.stream; } - TaskConstMeta get kBreezEventsStreamConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingBreezEventsStreamConstMeta => const TaskConstMeta( debugName: "breez_events_stream", argNames: ["s"], ); @override - Stream breezLogStream({dynamic hint}) { + Stream crateBindingBreezLogStream({dynamic hint}) { final s = RustStreamSink(); unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_StreamSink_log_entry_Dco(s); - return wire.wire_breez_log_stream(port_, arg0); + return wire.wire__crate__binding__breez_log_stream(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kBreezLogStreamConstMeta, + constMeta: kCrateBindingBreezLogStreamConstMeta, argValues: [s], apiImpl: this, hint: hint, @@ -299,150 +302,150 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return s.stream; } - TaskConstMeta get kBreezLogStreamConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingBreezLogStreamConstMeta => const TaskConstMeta( debugName: "breez_log_stream", argNames: ["s"], ); @override - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { + Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_buy_bitcoin_request(req); - return wire.wire_buy_bitcoin(port_, arg0); + return wire.wire__crate__binding__buy_bitcoin(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_buy_bitcoin_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kBuyBitcoinConstMeta, + constMeta: kCrateBindingBuyBitcoinConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kBuyBitcoinConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingBuyBitcoinConstMeta => const TaskConstMeta( debugName: "buy_bitcoin", argNames: ["req"], ); @override - Future checkMessage({required CheckMessageRequest req, dynamic hint}) { + Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_check_message_request(req); - return wire.wire_check_message(port_, arg0); + return wire.wire__crate__binding__check_message(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_check_message_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCheckMessageConstMeta, + constMeta: kCrateBindingCheckMessageConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCheckMessageConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingCheckMessageConstMeta => const TaskConstMeta( debugName: "check_message", argNames: ["req"], ); @override - Future closeLspChannels({dynamic hint}) { + Future crateBindingCloseLspChannels({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_close_lsp_channels(port_); + return wire.wire__crate__binding__close_lsp_channels(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCloseLspChannelsConstMeta, + constMeta: kCrateBindingCloseLspChannelsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCloseLspChannelsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingCloseLspChannelsConstMeta => const TaskConstMeta( debugName: "close_lsp_channels", argNames: [], ); @override - Future configureNode({required ConfigureNodeRequest req, dynamic hint}) { + Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_configure_node_request(req); - return wire.wire_configure_node(port_, arg0); + return wire.wire__crate__binding__configure_node(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kConfigureNodeConstMeta, + constMeta: kCrateBindingConfigureNodeConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kConfigureNodeConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingConfigureNodeConstMeta => const TaskConstMeta( debugName: "configure_node", argNames: ["req"], ); @override - Future connect({required ConnectRequest req, dynamic hint}) { + Future crateBindingConnect({required ConnectRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_connect_request(req); - return wire.wire_connect(port_, arg0); + return wire.wire__crate__binding__connect(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kConnectConstMeta, + constMeta: kCrateBindingConnectConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kConnectConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingConnectConstMeta => const TaskConstMeta( debugName: "connect", argNames: ["req"], ); @override - Future connectLsp({required String lspId, dynamic hint}) { + Future crateBindingConnectLsp({required String lspId, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(lspId); - return wire.wire_connect_lsp(port_, arg0); + return wire.wire__crate__binding__connect_lsp(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kConnectLspConstMeta, + constMeta: kCrateBindingConnectLspConstMeta, argValues: [lspId], apiImpl: this, hint: hint, )); } - TaskConstMeta get kConnectLspConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingConnectLspConstMeta => const TaskConstMeta( debugName: "connect_lsp", argNames: ["lspId"], ); @override - Future defaultConfig( + Future crateBindingDefaultConfig( {required EnvironmentType envType, required String apiKey, required NodeConfig nodeConfig, @@ -452,1156 +455,1160 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var arg0 = cst_encode_environment_type(envType); var arg1 = cst_encode_String(apiKey); var arg2 = cst_encode_box_autoadd_node_config(nodeConfig); - return wire.wire_default_config(port_, arg0, arg1, arg2); + return wire.wire__crate__binding__default_config(port_, arg0, arg1, arg2); }, codec: DcoCodec( decodeSuccessData: dco_decode_config, decodeErrorData: null, ), - constMeta: kDefaultConfigConstMeta, + constMeta: kCrateBindingDefaultConfigConstMeta, argValues: [envType, apiKey, nodeConfig], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDefaultConfigConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingDefaultConfigConstMeta => const TaskConstMeta( debugName: "default_config", argNames: ["envType", "apiKey", "nodeConfig"], ); @override - Future disconnect({dynamic hint}) { + Future crateBindingDisconnect({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_disconnect(port_); + return wire.wire__crate__binding__disconnect(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kDisconnectConstMeta, + constMeta: kCrateBindingDisconnectConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kDisconnectConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingDisconnectConstMeta => const TaskConstMeta( debugName: "disconnect", argNames: [], ); @override - Future executeCommand({required String command, dynamic hint}) { + Future crateBindingExecuteCommand({required String command, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(command); - return wire.wire_execute_command(port_, arg0); + return wire.wire__crate__binding__execute_command(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kExecuteCommandConstMeta, + constMeta: kCrateBindingExecuteCommandConstMeta, argValues: [command], apiImpl: this, hint: hint, )); } - TaskConstMeta get kExecuteCommandConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingExecuteCommandConstMeta => const TaskConstMeta( debugName: "execute_command", argNames: ["command"], ); @override - Future> fetchFiatRates({dynamic hint}) { + Future> crateBindingFetchFiatRates({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_fetch_fiat_rates(port_); + return wire.wire__crate__binding__fetch_fiat_rates(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_rate, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kFetchFiatRatesConstMeta, + constMeta: kCrateBindingFetchFiatRatesConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kFetchFiatRatesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingFetchFiatRatesConstMeta => const TaskConstMeta( debugName: "fetch_fiat_rates", argNames: [], ); @override - Future fetchLspInfo({required String id, dynamic hint}) { + Future crateBindingFetchLspInfo({required String id, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(id); - return wire.wire_fetch_lsp_info(port_, arg0); + return wire.wire__crate__binding__fetch_lsp_info(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_lsp_information, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kFetchLspInfoConstMeta, + constMeta: kCrateBindingFetchLspInfoConstMeta, argValues: [id], apiImpl: this, hint: hint, )); } - TaskConstMeta get kFetchLspInfoConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingFetchLspInfoConstMeta => const TaskConstMeta( debugName: "fetch_lsp_info", argNames: ["id"], ); @override - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) { + Future crateBindingFetchReverseSwapFees( + {required ReverseSwapFeesRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_reverse_swap_fees_request(req); - return wire.wire_fetch_reverse_swap_fees(port_, arg0); + return wire.wire__crate__binding__fetch_reverse_swap_fees(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_reverse_swap_pair_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kFetchReverseSwapFeesConstMeta, + constMeta: kCrateBindingFetchReverseSwapFeesConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kFetchReverseSwapFeesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingFetchReverseSwapFeesConstMeta => const TaskConstMeta( debugName: "fetch_reverse_swap_fees", argNames: ["req"], ); @override - Future generateDiagnosticData({dynamic hint}) { + Future crateBindingGenerateDiagnosticData({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_generate_diagnostic_data(port_); + return wire.wire__crate__binding__generate_diagnostic_data(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kGenerateDiagnosticDataConstMeta, + constMeta: kCrateBindingGenerateDiagnosticDataConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kGenerateDiagnosticDataConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingGenerateDiagnosticDataConstMeta => const TaskConstMeta( debugName: "generate_diagnostic_data", argNames: [], ); @override - Future> inProgressOnchainPayments({dynamic hint}) { + Future> crateBindingInProgressOnchainPayments({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_in_progress_onchain_payments(port_); + return wire.wire__crate__binding__in_progress_onchain_payments(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_reverse_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kInProgressOnchainPaymentsConstMeta, + constMeta: kCrateBindingInProgressOnchainPaymentsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kInProgressOnchainPaymentsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingInProgressOnchainPaymentsConstMeta => const TaskConstMeta( debugName: "in_progress_onchain_payments", argNames: [], ); @override - Future> inProgressReverseSwaps({dynamic hint}) { + Future> crateBindingInProgressReverseSwaps({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_in_progress_reverse_swaps(port_); + return wire.wire__crate__binding__in_progress_reverse_swaps(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_reverse_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kInProgressReverseSwapsConstMeta, + constMeta: kCrateBindingInProgressReverseSwapsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kInProgressReverseSwapsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingInProgressReverseSwapsConstMeta => const TaskConstMeta( debugName: "in_progress_reverse_swaps", argNames: [], ); @override - Future inProgressSwap({dynamic hint}) { + Future crateBindingInProgressSwap({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_in_progress_swap(port_); + return wire.wire__crate__binding__in_progress_swap(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kInProgressSwapConstMeta, + constMeta: kCrateBindingInProgressSwapConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kInProgressSwapConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingInProgressSwapConstMeta => const TaskConstMeta( debugName: "in_progress_swap", argNames: [], ); @override - Future isInitialized({dynamic hint}) { + Future crateBindingIsInitialized({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_is_initialized(port_); + return wire.wire__crate__binding__is_initialized(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_bool, decodeErrorData: null, ), - constMeta: kIsInitializedConstMeta, + constMeta: kCrateBindingIsInitializedConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kIsInitializedConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingIsInitializedConstMeta => const TaskConstMeta( debugName: "is_initialized", argNames: [], ); @override - Future> listFiatCurrencies({dynamic hint}) { + Future> crateBindingListFiatCurrencies({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_list_fiat_currencies(port_); + return wire.wire__crate__binding__list_fiat_currencies(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_fiat_currency, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kListFiatCurrenciesConstMeta, + constMeta: kCrateBindingListFiatCurrenciesConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kListFiatCurrenciesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingListFiatCurrenciesConstMeta => const TaskConstMeta( debugName: "list_fiat_currencies", argNames: [], ); @override - Future> listLsps({dynamic hint}) { + Future> crateBindingListLsps({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_list_lsps(port_); + return wire.wire__crate__binding__list_lsps(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_lsp_information, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kListLspsConstMeta, + constMeta: kCrateBindingListLspsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kListLspsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingListLspsConstMeta => const TaskConstMeta( debugName: "list_lsps", argNames: [], ); @override - Future> listPayments({required ListPaymentsRequest req, dynamic hint}) { + Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_list_payments_request(req); - return wire.wire_list_payments(port_, arg0); + return wire.wire__crate__binding__list_payments(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_payment, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kListPaymentsConstMeta, + constMeta: kCrateBindingListPaymentsConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kListPaymentsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingListPaymentsConstMeta => const TaskConstMeta( debugName: "list_payments", argNames: ["req"], ); @override - Future> listRefundables({dynamic hint}) { + Future> crateBindingListRefundables({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_list_refundables(port_); + return wire.wire__crate__binding__list_refundables(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kListRefundablesConstMeta, + constMeta: kCrateBindingListRefundablesConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kListRefundablesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingListRefundablesConstMeta => const TaskConstMeta( debugName: "list_refundables", argNames: [], ); @override - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { + Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); - return wire.wire_lnurl_auth(port_, arg0); + return wire.wire__crate__binding__lnurl_auth(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_ln_url_callback_status, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kLnurlAuthConstMeta, + constMeta: kCrateBindingLnurlAuthConstMeta, argValues: [reqData], apiImpl: this, hint: hint, )); } - TaskConstMeta get kLnurlAuthConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingLnurlAuthConstMeta => const TaskConstMeta( debugName: "lnurl_auth", argNames: ["reqData"], ); @override - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) { + Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_pay_request(req); - return wire.wire_lnurl_pay(port_, arg0); + return wire.wire__crate__binding__lnurl_pay(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_ln_url_pay_result, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kLnurlPayConstMeta, + constMeta: kCrateBindingLnurlPayConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kLnurlPayConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingLnurlPayConstMeta => const TaskConstMeta( debugName: "lnurl_pay", argNames: ["req"], ); @override - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { + Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_withdraw_request(req); - return wire.wire_lnurl_withdraw(port_, arg0); + return wire.wire__crate__binding__lnurl_withdraw(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_ln_url_withdraw_result, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kLnurlWithdrawConstMeta, + constMeta: kCrateBindingLnurlWithdrawConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kLnurlWithdrawConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingLnurlWithdrawConstMeta => const TaskConstMeta( debugName: "lnurl_withdraw", argNames: ["req"], ); @override - Future lspId({dynamic hint}) { + Future crateBindingLspId({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_lsp_id(port_); + return wire.wire__crate__binding__lsp_id(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kLspIdConstMeta, + constMeta: kCrateBindingLspIdConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kLspIdConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingLspIdConstMeta => const TaskConstMeta( debugName: "lsp_id", argNames: [], ); @override - Future lspInfo({dynamic hint}) { + Future crateBindingLspInfo({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_lsp_info(port_); + return wire.wire__crate__binding__lsp_info(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_lsp_information, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kLspInfoConstMeta, + constMeta: kCrateBindingLspInfoConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kLspInfoConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingLspInfoConstMeta => const TaskConstMeta( debugName: "lsp_info", argNames: [], ); @override - Future maxReverseSwapAmount({dynamic hint}) { + Future crateBindingMaxReverseSwapAmount({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_max_reverse_swap_amount(port_); + return wire.wire__crate__binding__max_reverse_swap_amount(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_max_reverse_swap_amount_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kMaxReverseSwapAmountConstMeta, + constMeta: kCrateBindingMaxReverseSwapAmountConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMaxReverseSwapAmountConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingMaxReverseSwapAmountConstMeta => const TaskConstMeta( debugName: "max_reverse_swap_amount", argNames: [], ); @override - Future mnemonicToSeed({required String phrase, dynamic hint}) { + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(phrase); - return wire.wire_mnemonic_to_seed(port_, arg0); + return wire.wire__crate__binding__mnemonic_to_seed(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_list_prim_u_8_strict, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kMnemonicToSeedConstMeta, + constMeta: kCrateBindingMnemonicToSeedConstMeta, argValues: [phrase], apiImpl: this, hint: hint, )); } - TaskConstMeta get kMnemonicToSeedConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingMnemonicToSeedConstMeta => const TaskConstMeta( debugName: "mnemonic_to_seed", argNames: ["phrase"], ); @override - Future nodeCredentials({dynamic hint}) { + Future crateBindingNodeCredentials({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_node_credentials(port_); + return wire.wire__crate__binding__node_credentials(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_node_credentials, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kNodeCredentialsConstMeta, + constMeta: kCrateBindingNodeCredentialsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kNodeCredentialsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingNodeCredentialsConstMeta => const TaskConstMeta( debugName: "node_credentials", argNames: [], ); @override - Future nodeInfo({dynamic hint}) { + Future crateBindingNodeInfo({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_node_info(port_); + return wire.wire__crate__binding__node_info(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_node_state, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kNodeInfoConstMeta, + constMeta: kCrateBindingNodeInfoConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kNodeInfoConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingNodeInfoConstMeta => const TaskConstMeta( debugName: "node_info", argNames: [], ); @override - Future onchainPaymentLimits({dynamic hint}) { + Future crateBindingOnchainPaymentLimits({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_onchain_payment_limits(port_); + return wire.wire__crate__binding__onchain_payment_limits(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_onchain_payment_limits_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kOnchainPaymentLimitsConstMeta, + constMeta: kCrateBindingOnchainPaymentLimitsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kOnchainPaymentLimitsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingOnchainPaymentLimitsConstMeta => const TaskConstMeta( debugName: "onchain_payment_limits", argNames: [], ); @override - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) { + Future crateBindingOpenChannelFee( + {required OpenChannelFeeRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_open_channel_fee_request(req); - return wire.wire_open_channel_fee(port_, arg0); + return wire.wire__crate__binding__open_channel_fee(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_open_channel_fee_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kOpenChannelFeeConstMeta, + constMeta: kCrateBindingOpenChannelFeeConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kOpenChannelFeeConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingOpenChannelFeeConstMeta => const TaskConstMeta( debugName: "open_channel_fee", argNames: ["req"], ); @override - Future parseInput({required String input, dynamic hint}) { + Future crateBindingParseInput({required String input, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(input); - return wire.wire_parse_input(port_, arg0); + return wire.wire__crate__binding__parse_input(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_input_type, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kParseInputConstMeta, + constMeta: kCrateBindingParseInputConstMeta, argValues: [input], apiImpl: this, hint: hint, )); } - TaskConstMeta get kParseInputConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingParseInputConstMeta => const TaskConstMeta( debugName: "parse_input", argNames: ["input"], ); @override - Future parseInvoice({required String invoice, dynamic hint}) { + Future crateBindingParseInvoice({required String invoice, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(invoice); - return wire.wire_parse_invoice(port_, arg0); + return wire.wire__crate__binding__parse_invoice(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_ln_invoice, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kParseInvoiceConstMeta, + constMeta: kCrateBindingParseInvoiceConstMeta, argValues: [invoice], apiImpl: this, hint: hint, )); } - TaskConstMeta get kParseInvoiceConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingParseInvoiceConstMeta => const TaskConstMeta( debugName: "parse_invoice", argNames: ["invoice"], ); @override - Future payOnchain({required PayOnchainRequest req, dynamic hint}) { + Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_pay_onchain_request(req); - return wire.wire_pay_onchain(port_, arg0); + return wire.wire__crate__binding__pay_onchain(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_pay_onchain_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kPayOnchainConstMeta, + constMeta: kCrateBindingPayOnchainConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPayOnchainConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingPayOnchainConstMeta => const TaskConstMeta( debugName: "pay_onchain", argNames: ["req"], ); @override - Future paymentByHash({required String hash, dynamic hint}) { + Future crateBindingPaymentByHash({required String hash, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(hash); - return wire.wire_payment_by_hash(port_, arg0); + return wire.wire__crate__binding__payment_by_hash(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_opt_box_autoadd_payment, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kPaymentByHashConstMeta, + constMeta: kCrateBindingPaymentByHashConstMeta, argValues: [hash], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPaymentByHashConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingPaymentByHashConstMeta => const TaskConstMeta( debugName: "payment_by_hash", argNames: ["hash"], ); @override - Future prepareOnchainPayment( + Future crateBindingPrepareOnchainPayment( {required PrepareOnchainPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); - return wire.wire_prepare_onchain_payment(port_, arg0); + return wire.wire__crate__binding__prepare_onchain_payment(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_prepare_onchain_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kPrepareOnchainPaymentConstMeta, + constMeta: kCrateBindingPrepareOnchainPaymentConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPrepareOnchainPaymentConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingPrepareOnchainPaymentConstMeta => const TaskConstMeta( debugName: "prepare_onchain_payment", argNames: ["req"], ); @override - Future prepareRedeemOnchainFunds( + Future crateBindingPrepareRedeemOnchainFunds( {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); - return wire.wire_prepare_redeem_onchain_funds(port_, arg0); + return wire.wire__crate__binding__prepare_redeem_onchain_funds(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_prepare_redeem_onchain_funds_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kPrepareRedeemOnchainFundsConstMeta, + constMeta: kCrateBindingPrepareRedeemOnchainFundsConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPrepareRedeemOnchainFundsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingPrepareRedeemOnchainFundsConstMeta => const TaskConstMeta( debugName: "prepare_redeem_onchain_funds", argNames: ["req"], ); @override - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) { + Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_refund_request(req); - return wire.wire_prepare_refund(port_, arg0); + return wire.wire__crate__binding__prepare_refund(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_prepare_refund_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kPrepareRefundConstMeta, + constMeta: kCrateBindingPrepareRefundConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kPrepareRefundConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingPrepareRefundConstMeta => const TaskConstMeta( debugName: "prepare_refund", argNames: ["req"], ); @override - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { + Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_receive_onchain_request(req); - return wire.wire_receive_onchain(port_, arg0); + return wire.wire__crate__binding__receive_onchain(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kReceiveOnchainConstMeta, + constMeta: kCrateBindingReceiveOnchainConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kReceiveOnchainConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingReceiveOnchainConstMeta => const TaskConstMeta( debugName: "receive_onchain", argNames: ["req"], ); @override - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) { + Future crateBindingReceivePayment( + {required ReceivePaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_receive_payment_request(req); - return wire.wire_receive_payment(port_, arg0); + return wire.wire__crate__binding__receive_payment(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_receive_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kReceivePaymentConstMeta, + constMeta: kCrateBindingReceivePaymentConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kReceivePaymentConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingReceivePaymentConstMeta => const TaskConstMeta( debugName: "receive_payment", argNames: ["req"], ); @override - Future recommendedFees({dynamic hint}) { + Future crateBindingRecommendedFees({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_recommended_fees(port_); + return wire.wire__crate__binding__recommended_fees(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_recommended_fees, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRecommendedFeesConstMeta, + constMeta: kCrateBindingRecommendedFeesConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRecommendedFeesConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRecommendedFeesConstMeta => const TaskConstMeta( debugName: "recommended_fees", argNames: [], ); @override - Future redeemOnchainFunds( + Future crateBindingRedeemOnchainFunds( {required RedeemOnchainFundsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); - return wire.wire_redeem_onchain_funds(port_, arg0); + return wire.wire__crate__binding__redeem_onchain_funds(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_redeem_onchain_funds_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRedeemOnchainFundsConstMeta, + constMeta: kCrateBindingRedeemOnchainFundsConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRedeemOnchainFundsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRedeemOnchainFundsConstMeta => const TaskConstMeta( debugName: "redeem_onchain_funds", argNames: ["req"], ); @override - Future redeemSwap({required String swapAddress, dynamic hint}) { + Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(swapAddress); - return wire.wire_redeem_swap(port_, arg0); + return wire.wire__crate__binding__redeem_swap(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRedeemSwapConstMeta, + constMeta: kCrateBindingRedeemSwapConstMeta, argValues: [swapAddress], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRedeemSwapConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRedeemSwapConstMeta => const TaskConstMeta( debugName: "redeem_swap", argNames: ["swapAddress"], ); @override - Future refund({required RefundRequest req, dynamic hint}) { + Future crateBindingRefund({required RefundRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_refund_request(req); - return wire.wire_refund(port_, arg0); + return wire.wire__crate__binding__refund(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_refund_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRefundConstMeta, + constMeta: kCrateBindingRefundConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRefundConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRefundConstMeta => const TaskConstMeta( debugName: "refund", argNames: ["req"], ); @override - Future registerWebhook({required String webhookUrl, dynamic hint}) { + Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(webhookUrl); - return wire.wire_register_webhook(port_, arg0); + return wire.wire__crate__binding__register_webhook(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRegisterWebhookConstMeta, + constMeta: kCrateBindingRegisterWebhookConstMeta, argValues: [webhookUrl], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRegisterWebhookConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRegisterWebhookConstMeta => const TaskConstMeta( debugName: "register_webhook", argNames: ["webhookUrl"], ); @override - Future reportIssue({required ReportIssueRequest req, dynamic hint}) { + Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_report_issue_request(req); - return wire.wire_report_issue(port_, arg0); + return wire.wire__crate__binding__report_issue(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kReportIssueConstMeta, + constMeta: kCrateBindingReportIssueConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kReportIssueConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingReportIssueConstMeta => const TaskConstMeta( debugName: "report_issue", argNames: ["req"], ); @override - Future rescanSwaps({dynamic hint}) { + Future crateBindingRescanSwaps({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_rescan_swaps(port_); + return wire.wire__crate__binding__rescan_swaps(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kRescanSwapsConstMeta, + constMeta: kCrateBindingRescanSwapsConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kRescanSwapsConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingRescanSwapsConstMeta => const TaskConstMeta( debugName: "rescan_swaps", argNames: [], ); @override - Future sendOnchain({required SendOnchainRequest req, dynamic hint}) { + Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_onchain_request(req); - return wire.wire_send_onchain(port_, arg0); + return wire.wire__crate__binding__send_onchain(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_send_onchain_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSendOnchainConstMeta, + constMeta: kCrateBindingSendOnchainConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSendOnchainConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSendOnchainConstMeta => const TaskConstMeta( debugName: "send_onchain", argNames: ["req"], ); @override - Future sendPayment({required SendPaymentRequest req, dynamic hint}) { + Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_payment_request(req); - return wire.wire_send_payment(port_, arg0); + return wire.wire__crate__binding__send_payment(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_send_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSendPaymentConstMeta, + constMeta: kCrateBindingSendPaymentConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSendPaymentConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSendPaymentConstMeta => const TaskConstMeta( debugName: "send_payment", argNames: ["req"], ); @override - Future sendSpontaneousPayment( + Future crateBindingSendSpontaneousPayment( {required SendSpontaneousPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); - return wire.wire_send_spontaneous_payment(port_, arg0); + return wire.wire__crate__binding__send_spontaneous_payment(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_send_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSendSpontaneousPaymentConstMeta, + constMeta: kCrateBindingSendSpontaneousPaymentConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSendSpontaneousPaymentConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSendSpontaneousPaymentConstMeta => const TaskConstMeta( debugName: "send_spontaneous_payment", argNames: ["req"], ); @override - Future serviceHealthCheck({required String apiKey, dynamic hint}) { + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(apiKey); - return wire.wire_service_health_check(port_, arg0); + return wire.wire__crate__binding__service_health_check(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_service_health_check_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kServiceHealthCheckConstMeta, + constMeta: kCrateBindingServiceHealthCheckConstMeta, argValues: [apiKey], apiImpl: this, hint: hint, )); } - TaskConstMeta get kServiceHealthCheckConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingServiceHealthCheckConstMeta => const TaskConstMeta( debugName: "service_health_check", argNames: ["apiKey"], ); @override - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) { + Future crateBindingSetPaymentMetadata( + {required String hash, required String metadata, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(hash); var arg1 = cst_encode_String(metadata); - return wire.wire_set_payment_metadata(port_, arg0, arg1); + return wire.wire__crate__binding__set_payment_metadata(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSetPaymentMetadataConstMeta, + constMeta: kCrateBindingSetPaymentMetadataConstMeta, argValues: [hash, metadata], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSetPaymentMetadataConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSetPaymentMetadataConstMeta => const TaskConstMeta( debugName: "set_payment_metadata", argNames: ["hash", "metadata"], ); @override - Future signMessage({required SignMessageRequest req, dynamic hint}) { + Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_sign_message_request(req); - return wire.wire_sign_message(port_, arg0); + return wire.wire__crate__binding__sign_message(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_sign_message_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSignMessageConstMeta, + constMeta: kCrateBindingSignMessageConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSignMessageConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSignMessageConstMeta => const TaskConstMeta( debugName: "sign_message", argNames: ["req"], ); @override - Future staticBackup({required StaticBackupRequest req, dynamic hint}) { + Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_static_backup_request(req); - return wire.wire_static_backup(port_, arg0); + return wire.wire__crate__binding__static_backup(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_static_backup_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kStaticBackupConstMeta, + constMeta: kCrateBindingStaticBackupConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kStaticBackupConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingStaticBackupConstMeta => const TaskConstMeta( debugName: "static_backup", argNames: ["req"], ); @override - Future sync({dynamic hint}) { + Future crateBindingSync({dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire_sync(port_); + return wire.wire__crate__binding__sync(port_); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kSyncConstMeta, + constMeta: kCrateBindingSyncConstMeta, argValues: [], apiImpl: this, hint: hint, )); } - TaskConstMeta get kSyncConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingSyncConstMeta => const TaskConstMeta( debugName: "sync", argNames: [], ); @override - Future unregisterWebhook({required String webhookUrl, dynamic hint}) { + Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(webhookUrl); - return wire.wire_unregister_webhook(port_, arg0); + return wire.wire__crate__binding__unregister_webhook(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kUnregisterWebhookConstMeta, + constMeta: kCrateBindingUnregisterWebhookConstMeta, argValues: [webhookUrl], apiImpl: this, hint: hint, )); } - TaskConstMeta get kUnregisterWebhookConstMeta => const TaskConstMeta( + TaskConstMeta get kCrateBindingUnregisterWebhookConstMeta => const TaskConstMeta( debugName: "unregister_webhook", argNames: ["webhookUrl"], ); @@ -1772,7 +1779,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int dco_decode_box_autoadd_i_64(dynamic raw) { + PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return dco_decode_i_64(raw); } @@ -2030,7 +2037,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int dco_decode_box_autoadd_u_64(dynamic raw) { + 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); } @@ -2265,9 +2272,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int dco_decode_i_64(dynamic raw) { + PlatformInt64 dco_decode_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(raw); + return dcoDecodeI64(raw); } @protected @@ -2867,7 +2874,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int? dco_decode_opt_box_autoadd_i_64(dynamic raw) { + PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return raw == null ? null : dco_decode_box_autoadd_i_64(raw); } @@ -2933,7 +2940,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int? dco_decode_opt_box_autoadd_u_64(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_64(raw); } @@ -3556,9 +3563,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int dco_decode_u_64(dynamic raw) { + BigInt dco_decode_u_64(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeI64OrU64(raw); + return dcoDecodeU64(raw); } @protected @@ -3762,7 +3769,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { + PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs return (sse_decode_i_64(deserializer)); } @@ -4025,7 +4032,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + 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)); } @@ -4246,9 +4253,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int sse_decode_i_64(SseDeserializer deserializer) { + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getInt64(); + return deserializer.buffer.getPlatformInt64(); } @protected @@ -4958,7 +4965,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { + PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs if (sse_decode_bool(deserializer)) { @@ -5079,7 +5086,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { + BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs if (sse_decode_bool(deserializer)) { @@ -5718,9 +5725,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - int sse_decode_u_64(SseDeserializer deserializer) { + BigInt sse_decode_u_64(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getUint64(); + return deserializer.buffer.getBigUint64(); } @protected @@ -5869,7 +5876,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @protected void sse_encode_AnyhowException(AnyhowException self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - throw UnimplementedError('Unreachable ()'); + sse_encode_String(self.message, serializer); } @protected @@ -6022,7 +6029,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_box_autoadd_i_64(int self, SseSerializer serializer) { + void sse_encode_box_autoadd_i_64(PlatformInt64 self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_i_64(self, serializer); } @@ -6290,7 +6297,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_box_autoadd_u_64(int 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_u_64(self, serializer); } @@ -6469,9 +6476,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_i_64(int self, SseSerializer serializer) { + void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putInt64(self); + serializer.buffer.putPlatformInt64(self); } @protected @@ -7004,7 +7011,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_opt_box_autoadd_i_64(int? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_i_64(PlatformInt64? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -7115,7 +7122,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_opt_box_autoadd_u_64(int? self, SseSerializer serializer) { + void sse_encode_opt_box_autoadd_u_64(BigInt? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_bool(self != null, serializer); @@ -7611,9 +7618,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } @protected - void sse_encode_u_64(int self, SseSerializer serializer) { + void sse_encode_u_64(BigInt self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putUint64(self); + serializer.buffer.putBigUint64(self); } @protected diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index 7b647b3de..be68d2c73 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // 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 @@ -93,7 +93,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? dco_decode_opt_list_String(dynamic raw); @@ -651,7 +651,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? sse_decode_opt_list_String(SseDeserializer deserializer); @@ -1299,7 +1299,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_i_64(int raw) { + ffi.Pointer cst_encode_box_autoadd_i_64(PlatformInt64 raw) { // Codec=Cst (C-struct based), see doc to use other codecs return wire.cst_new_box_autoadd_i_64(cst_encode_i_64(raw)); } @@ -1813,7 +1813,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_u_64(int raw) { + ffi.Pointer cst_encode_box_autoadd_u_64(BigInt raw) { // Codec=Cst (C-struct based), see doc to use other codecs return wire.cst_new_box_autoadd_u_64(cst_encode_u_64(raw)); } @@ -1828,7 +1828,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_opt_box_autoadd_i_64(int? raw) { + ffi.Pointer cst_encode_opt_box_autoadd_i_64(PlatformInt64? raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_box_autoadd_i_64(raw); } @@ -2092,7 +2092,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_opt_box_autoadd_u_64(int? raw) { + ffi.Pointer cst_encode_opt_box_autoadd_u_64(BigInt? raw) { // Codec=Cst (C-struct based), see doc to use other codecs return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); } @@ -2142,9 +2142,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? self, SseSerializer serializer); @@ -4102,7 +4102,7 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl(); - void wire_backup( + void wire__crate__binding__backup( int port_, ) { - return _wire_backup( + return _wire__crate__binding__backup( port_, ); } - late final _wire_backupPtr = - _lookup>('frbgen_breez_sdk_wire_backup'); - late final _wire_backup = _wire_backupPtr.asFunction(); + late final _wire__crate__binding__backupPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__backup'); + late final _wire__crate__binding__backup = + _wire__crate__binding__backupPtr.asFunction(); - void wire_backup_status( + void wire__crate__binding__backup_status( int port_, ) { - return _wire_backup_status( + return _wire__crate__binding__backup_status( port_, ); } - late final _wire_backup_statusPtr = - _lookup>('frbgen_breez_sdk_wire_backup_status'); - late final _wire_backup_status = _wire_backup_statusPtr.asFunction(); + late final _wire__crate__binding__backup_statusPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__backup_status'); + late final _wire__crate__binding__backup_status = + _wire__crate__binding__backup_statusPtr.asFunction(); - void wire_breez_events_stream( + void wire__crate__binding__breez_events_stream( int port_, ffi.Pointer s, ) { - return _wire_breez_events_stream( + return _wire__crate__binding__breez_events_stream( port_, s, ); } - late final _wire_breez_events_streamPtr = + late final _wire__crate__binding__breez_events_streamPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_breez_events_stream'); - late final _wire_breez_events_stream = _wire_breez_events_streamPtr + 'frbgen_breez_sdk_wire__crate__binding__breez_events_stream'); + late final _wire__crate__binding__breez_events_stream = _wire__crate__binding__breez_events_streamPtr .asFunction)>(); - void wire_breez_log_stream( + void wire__crate__binding__breez_log_stream( int port_, ffi.Pointer s, ) { - return _wire_breez_log_stream( + return _wire__crate__binding__breez_log_stream( port_, s, ); } - late final _wire_breez_log_streamPtr = + late final _wire__crate__binding__breez_log_streamPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_breez_log_stream'); - late final _wire_breez_log_stream = - _wire_breez_log_streamPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__breez_log_stream'); + late final _wire__crate__binding__breez_log_stream = _wire__crate__binding__breez_log_streamPtr + .asFunction)>(); - void wire_buy_bitcoin( + void wire__crate__binding__buy_bitcoin( int port_, ffi.Pointer req, ) { - return _wire_buy_bitcoin( + return _wire__crate__binding__buy_bitcoin( port_, req, ); } - late final _wire_buy_bitcoinPtr = + late final _wire__crate__binding__buy_bitcoinPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_buy_bitcoin'); - late final _wire_buy_bitcoin = - _wire_buy_bitcoinPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__buy_bitcoin'); + late final _wire__crate__binding__buy_bitcoin = _wire__crate__binding__buy_bitcoinPtr + .asFunction)>(); - void wire_check_message( + void wire__crate__binding__check_message( int port_, ffi.Pointer req, ) { - return _wire_check_message( + return _wire__crate__binding__check_message( port_, req, ); } - late final _wire_check_messagePtr = + late final _wire__crate__binding__check_messagePtr = _lookup)>>( - 'frbgen_breez_sdk_wire_check_message'); - late final _wire_check_message = - _wire_check_messagePtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__check_message'); + late final _wire__crate__binding__check_message = _wire__crate__binding__check_messagePtr + .asFunction)>(); - void wire_close_lsp_channels( + void wire__crate__binding__close_lsp_channels( int port_, ) { - return _wire_close_lsp_channels( + return _wire__crate__binding__close_lsp_channels( port_, ); } - late final _wire_close_lsp_channelsPtr = - _lookup>('frbgen_breez_sdk_wire_close_lsp_channels'); - late final _wire_close_lsp_channels = _wire_close_lsp_channelsPtr.asFunction(); + late final _wire__crate__binding__close_lsp_channelsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__close_lsp_channels'); + late final _wire__crate__binding__close_lsp_channels = + _wire__crate__binding__close_lsp_channelsPtr.asFunction(); - void wire_configure_node( + void wire__crate__binding__configure_node( int port_, ffi.Pointer req, ) { - return _wire_configure_node( + return _wire__crate__binding__configure_node( port_, req, ); } - late final _wire_configure_nodePtr = + late final _wire__crate__binding__configure_nodePtr = _lookup)>>( - 'frbgen_breez_sdk_wire_configure_node'); - late final _wire_configure_node = - _wire_configure_nodePtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__configure_node'); + late final _wire__crate__binding__configure_node = _wire__crate__binding__configure_nodePtr + .asFunction)>(); - void wire_connect( + void wire__crate__binding__connect( int port_, ffi.Pointer req, ) { - return _wire_connect( + return _wire__crate__binding__connect( port_, req, ); } - late final _wire_connectPtr = + late final _wire__crate__binding__connectPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_connect'); - late final _wire_connect = - _wire_connectPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__connect'); + late final _wire__crate__binding__connect = _wire__crate__binding__connectPtr + .asFunction)>(); - void wire_connect_lsp( + void wire__crate__binding__connect_lsp( int port_, ffi.Pointer lsp_id, ) { - return _wire_connect_lsp( + return _wire__crate__binding__connect_lsp( port_, lsp_id, ); } - late final _wire_connect_lspPtr = + late final _wire__crate__binding__connect_lspPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_connect_lsp'); - late final _wire_connect_lsp = - _wire_connect_lspPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__connect_lsp'); + late final _wire__crate__binding__connect_lsp = _wire__crate__binding__connect_lspPtr + .asFunction)>(); - void wire_default_config( + void wire__crate__binding__default_config( int port_, int env_type, ffi.Pointer api_key, ffi.Pointer node_config, ) { - return _wire_default_config( + return _wire__crate__binding__default_config( port_, env_type, api_key, @@ -4315,749 +4320,781 @@ class BreezSdkBindingsWire implements BaseWire { ); } - late final _wire_default_configPtr = _lookup< + late final _wire__crate__binding__default_configPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('frbgen_breez_sdk_wire_default_config'); - late final _wire_default_config = _wire_default_configPtr.asFunction< + ffi.Pointer)>>('frbgen_breez_sdk_wire__crate__binding__default_config'); + late final _wire__crate__binding__default_config = _wire__crate__binding__default_configPtr.asFunction< void Function( int, int, ffi.Pointer, ffi.Pointer)>(); - void wire_disconnect( + void wire__crate__binding__disconnect( int port_, ) { - return _wire_disconnect( + return _wire__crate__binding__disconnect( port_, ); } - late final _wire_disconnectPtr = - _lookup>('frbgen_breez_sdk_wire_disconnect'); - late final _wire_disconnect = _wire_disconnectPtr.asFunction(); + late final _wire__crate__binding__disconnectPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__disconnect'); + late final _wire__crate__binding__disconnect = + _wire__crate__binding__disconnectPtr.asFunction(); - void wire_execute_command( + void wire__crate__binding__execute_command( int port_, ffi.Pointer command, ) { - return _wire_execute_command( + return _wire__crate__binding__execute_command( port_, command, ); } - late final _wire_execute_commandPtr = + late final _wire__crate__binding__execute_commandPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_execute_command'); - late final _wire_execute_command = - _wire_execute_commandPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__execute_command'); + late final _wire__crate__binding__execute_command = _wire__crate__binding__execute_commandPtr + .asFunction)>(); - void wire_fetch_fiat_rates( + void wire__crate__binding__fetch_fiat_rates( int port_, ) { - return _wire_fetch_fiat_rates( + return _wire__crate__binding__fetch_fiat_rates( port_, ); } - late final _wire_fetch_fiat_ratesPtr = - _lookup>('frbgen_breez_sdk_wire_fetch_fiat_rates'); - late final _wire_fetch_fiat_rates = _wire_fetch_fiat_ratesPtr.asFunction(); + late final _wire__crate__binding__fetch_fiat_ratesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates'); + late final _wire__crate__binding__fetch_fiat_rates = + _wire__crate__binding__fetch_fiat_ratesPtr.asFunction(); - void wire_fetch_lsp_info( + void wire__crate__binding__fetch_lsp_info( int port_, ffi.Pointer id, ) { - return _wire_fetch_lsp_info( + return _wire__crate__binding__fetch_lsp_info( port_, id, ); } - late final _wire_fetch_lsp_infoPtr = + late final _wire__crate__binding__fetch_lsp_infoPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_fetch_lsp_info'); - late final _wire_fetch_lsp_info = - _wire_fetch_lsp_infoPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info'); + late final _wire__crate__binding__fetch_lsp_info = _wire__crate__binding__fetch_lsp_infoPtr + .asFunction)>(); - void wire_fetch_reverse_swap_fees( + void wire__crate__binding__fetch_reverse_swap_fees( int port_, ffi.Pointer req, ) { - return _wire_fetch_reverse_swap_fees( + return _wire__crate__binding__fetch_reverse_swap_fees( port_, req, ); } - late final _wire_fetch_reverse_swap_feesPtr = _lookup< + late final _wire__crate__binding__fetch_reverse_swap_feesPtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_fetch_reverse_swap_fees'); - late final _wire_fetch_reverse_swap_fees = _wire_fetch_reverse_swap_feesPtr - .asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees'); + late final _wire__crate__binding__fetch_reverse_swap_fees = + _wire__crate__binding__fetch_reverse_swap_feesPtr + .asFunction)>(); - void wire_generate_diagnostic_data( + void wire__crate__binding__generate_diagnostic_data( int port_, ) { - return _wire_generate_diagnostic_data( + return _wire__crate__binding__generate_diagnostic_data( port_, ); } - late final _wire_generate_diagnostic_dataPtr = _lookup>( - 'frbgen_breez_sdk_wire_generate_diagnostic_data'); - late final _wire_generate_diagnostic_data = - _wire_generate_diagnostic_dataPtr.asFunction(); + late final _wire__crate__binding__generate_diagnostic_dataPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data'); + late final _wire__crate__binding__generate_diagnostic_data = + _wire__crate__binding__generate_diagnostic_dataPtr.asFunction(); - void wire_in_progress_onchain_payments( + void wire__crate__binding__in_progress_onchain_payments( int port_, ) { - return _wire_in_progress_onchain_payments( + return _wire__crate__binding__in_progress_onchain_payments( port_, ); } - late final _wire_in_progress_onchain_paymentsPtr = + late final _wire__crate__binding__in_progress_onchain_paymentsPtr = _lookup>( - 'frbgen_breez_sdk_wire_in_progress_onchain_payments'); - late final _wire_in_progress_onchain_payments = - _wire_in_progress_onchain_paymentsPtr.asFunction(); + 'frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments'); + late final _wire__crate__binding__in_progress_onchain_payments = + _wire__crate__binding__in_progress_onchain_paymentsPtr.asFunction(); - void wire_in_progress_reverse_swaps( + void wire__crate__binding__in_progress_reverse_swaps( int port_, ) { - return _wire_in_progress_reverse_swaps( + return _wire__crate__binding__in_progress_reverse_swaps( port_, ); } - late final _wire_in_progress_reverse_swapsPtr = _lookup>( - 'frbgen_breez_sdk_wire_in_progress_reverse_swaps'); - late final _wire_in_progress_reverse_swaps = - _wire_in_progress_reverse_swapsPtr.asFunction(); + late final _wire__crate__binding__in_progress_reverse_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps'); + late final _wire__crate__binding__in_progress_reverse_swaps = + _wire__crate__binding__in_progress_reverse_swapsPtr.asFunction(); - void wire_in_progress_swap( + void wire__crate__binding__in_progress_swap( int port_, ) { - return _wire_in_progress_swap( + return _wire__crate__binding__in_progress_swap( port_, ); } - late final _wire_in_progress_swapPtr = - _lookup>('frbgen_breez_sdk_wire_in_progress_swap'); - late final _wire_in_progress_swap = _wire_in_progress_swapPtr.asFunction(); + late final _wire__crate__binding__in_progress_swapPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__in_progress_swap'); + late final _wire__crate__binding__in_progress_swap = + _wire__crate__binding__in_progress_swapPtr.asFunction(); - void wire_is_initialized( + void wire__crate__binding__is_initialized( int port_, ) { - return _wire_is_initialized( + return _wire__crate__binding__is_initialized( port_, ); } - late final _wire_is_initializedPtr = - _lookup>('frbgen_breez_sdk_wire_is_initialized'); - late final _wire_is_initialized = _wire_is_initializedPtr.asFunction(); + late final _wire__crate__binding__is_initializedPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__is_initialized'); + late final _wire__crate__binding__is_initialized = + _wire__crate__binding__is_initializedPtr.asFunction(); - void wire_list_fiat_currencies( + void wire__crate__binding__list_fiat_currencies( int port_, ) { - return _wire_list_fiat_currencies( + return _wire__crate__binding__list_fiat_currencies( port_, ); } - late final _wire_list_fiat_currenciesPtr = - _lookup>('frbgen_breez_sdk_wire_list_fiat_currencies'); - late final _wire_list_fiat_currencies = _wire_list_fiat_currenciesPtr.asFunction(); + late final _wire__crate__binding__list_fiat_currenciesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies'); + late final _wire__crate__binding__list_fiat_currencies = + _wire__crate__binding__list_fiat_currenciesPtr.asFunction(); - void wire_list_lsps( + void wire__crate__binding__list_lsps( int port_, ) { - return _wire_list_lsps( + return _wire__crate__binding__list_lsps( port_, ); } - late final _wire_list_lspsPtr = - _lookup>('frbgen_breez_sdk_wire_list_lsps'); - late final _wire_list_lsps = _wire_list_lspsPtr.asFunction(); + late final _wire__crate__binding__list_lspsPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__list_lsps'); + late final _wire__crate__binding__list_lsps = + _wire__crate__binding__list_lspsPtr.asFunction(); - void wire_list_payments( + void wire__crate__binding__list_payments( int port_, ffi.Pointer req, ) { - return _wire_list_payments( + return _wire__crate__binding__list_payments( port_, req, ); } - late final _wire_list_paymentsPtr = + late final _wire__crate__binding__list_paymentsPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_list_payments'); - late final _wire_list_payments = - _wire_list_paymentsPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__list_payments'); + late final _wire__crate__binding__list_payments = _wire__crate__binding__list_paymentsPtr + .asFunction)>(); - void wire_list_refundables( + void wire__crate__binding__list_refundables( int port_, ) { - return _wire_list_refundables( + return _wire__crate__binding__list_refundables( port_, ); } - late final _wire_list_refundablesPtr = - _lookup>('frbgen_breez_sdk_wire_list_refundables'); - late final _wire_list_refundables = _wire_list_refundablesPtr.asFunction(); + late final _wire__crate__binding__list_refundablesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__list_refundables'); + late final _wire__crate__binding__list_refundables = + _wire__crate__binding__list_refundablesPtr.asFunction(); - void wire_lnurl_auth( + void wire__crate__binding__lnurl_auth( int port_, ffi.Pointer req_data, ) { - return _wire_lnurl_auth( + return _wire__crate__binding__lnurl_auth( port_, req_data, ); } - late final _wire_lnurl_authPtr = _lookup< + late final _wire__crate__binding__lnurl_authPtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_lnurl_auth'); - late final _wire_lnurl_auth = - _wire_lnurl_authPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__lnurl_auth'); + late final _wire__crate__binding__lnurl_auth = _wire__crate__binding__lnurl_authPtr + .asFunction)>(); - void wire_lnurl_pay( + void wire__crate__binding__lnurl_pay( int port_, ffi.Pointer req, ) { - return _wire_lnurl_pay( + return _wire__crate__binding__lnurl_pay( port_, req, ); } - late final _wire_lnurl_payPtr = + late final _wire__crate__binding__lnurl_payPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_lnurl_pay'); - late final _wire_lnurl_pay = - _wire_lnurl_payPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__lnurl_pay'); + late final _wire__crate__binding__lnurl_pay = _wire__crate__binding__lnurl_payPtr + .asFunction)>(); - void wire_lnurl_withdraw( + void wire__crate__binding__lnurl_withdraw( int port_, ffi.Pointer req, ) { - return _wire_lnurl_withdraw( + return _wire__crate__binding__lnurl_withdraw( port_, req, ); } - late final _wire_lnurl_withdrawPtr = _lookup< + late final _wire__crate__binding__lnurl_withdrawPtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_lnurl_withdraw'); - late final _wire_lnurl_withdraw = - _wire_lnurl_withdrawPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw'); + late final _wire__crate__binding__lnurl_withdraw = _wire__crate__binding__lnurl_withdrawPtr + .asFunction)>(); - void wire_lsp_id( + void wire__crate__binding__lsp_id( int port_, ) { - return _wire_lsp_id( + return _wire__crate__binding__lsp_id( port_, ); } - late final _wire_lsp_idPtr = - _lookup>('frbgen_breez_sdk_wire_lsp_id'); - late final _wire_lsp_id = _wire_lsp_idPtr.asFunction(); + late final _wire__crate__binding__lsp_idPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__lsp_id'); + late final _wire__crate__binding__lsp_id = + _wire__crate__binding__lsp_idPtr.asFunction(); - void wire_lsp_info( + void wire__crate__binding__lsp_info( int port_, ) { - return _wire_lsp_info( + return _wire__crate__binding__lsp_info( port_, ); } - late final _wire_lsp_infoPtr = - _lookup>('frbgen_breez_sdk_wire_lsp_info'); - late final _wire_lsp_info = _wire_lsp_infoPtr.asFunction(); + late final _wire__crate__binding__lsp_infoPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__lsp_info'); + late final _wire__crate__binding__lsp_info = + _wire__crate__binding__lsp_infoPtr.asFunction(); - void wire_max_reverse_swap_amount( + void wire__crate__binding__max_reverse_swap_amount( int port_, ) { - return _wire_max_reverse_swap_amount( + return _wire__crate__binding__max_reverse_swap_amount( port_, ); } - late final _wire_max_reverse_swap_amountPtr = _lookup>( - 'frbgen_breez_sdk_wire_max_reverse_swap_amount'); - late final _wire_max_reverse_swap_amount = - _wire_max_reverse_swap_amountPtr.asFunction(); + late final _wire__crate__binding__max_reverse_swap_amountPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount'); + late final _wire__crate__binding__max_reverse_swap_amount = + _wire__crate__binding__max_reverse_swap_amountPtr.asFunction(); - void wire_mnemonic_to_seed( + void wire__crate__binding__mnemonic_to_seed( int port_, ffi.Pointer phrase, ) { - return _wire_mnemonic_to_seed( + return _wire__crate__binding__mnemonic_to_seed( port_, phrase, ); } - late final _wire_mnemonic_to_seedPtr = + late final _wire__crate__binding__mnemonic_to_seedPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_mnemonic_to_seed'); - late final _wire_mnemonic_to_seed = - _wire_mnemonic_to_seedPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed'); + late final _wire__crate__binding__mnemonic_to_seed = _wire__crate__binding__mnemonic_to_seedPtr + .asFunction)>(); - void wire_node_credentials( + void wire__crate__binding__node_credentials( int port_, ) { - return _wire_node_credentials( + return _wire__crate__binding__node_credentials( port_, ); } - late final _wire_node_credentialsPtr = - _lookup>('frbgen_breez_sdk_wire_node_credentials'); - late final _wire_node_credentials = _wire_node_credentialsPtr.asFunction(); + late final _wire__crate__binding__node_credentialsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__node_credentials'); + late final _wire__crate__binding__node_credentials = + _wire__crate__binding__node_credentialsPtr.asFunction(); - void wire_node_info( + void wire__crate__binding__node_info( int port_, ) { - return _wire_node_info( + return _wire__crate__binding__node_info( port_, ); } - late final _wire_node_infoPtr = - _lookup>('frbgen_breez_sdk_wire_node_info'); - late final _wire_node_info = _wire_node_infoPtr.asFunction(); + late final _wire__crate__binding__node_infoPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__node_info'); + late final _wire__crate__binding__node_info = + _wire__crate__binding__node_infoPtr.asFunction(); - void wire_onchain_payment_limits( + void wire__crate__binding__onchain_payment_limits( int port_, ) { - return _wire_onchain_payment_limits( + return _wire__crate__binding__onchain_payment_limits( port_, ); } - late final _wire_onchain_payment_limitsPtr = _lookup>( - 'frbgen_breez_sdk_wire_onchain_payment_limits'); - late final _wire_onchain_payment_limits = _wire_onchain_payment_limitsPtr.asFunction(); + late final _wire__crate__binding__onchain_payment_limitsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits'); + late final _wire__crate__binding__onchain_payment_limits = + _wire__crate__binding__onchain_payment_limitsPtr.asFunction(); - void wire_open_channel_fee( + void wire__crate__binding__open_channel_fee( int port_, ffi.Pointer req, ) { - return _wire_open_channel_fee( + return _wire__crate__binding__open_channel_fee( port_, req, ); } - late final _wire_open_channel_feePtr = _lookup< + late final _wire__crate__binding__open_channel_feePtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_open_channel_fee'); - late final _wire_open_channel_fee = _wire_open_channel_feePtr + 'frbgen_breez_sdk_wire__crate__binding__open_channel_fee'); + late final _wire__crate__binding__open_channel_fee = _wire__crate__binding__open_channel_feePtr .asFunction)>(); - void wire_parse_input( + void wire__crate__binding__parse_input( int port_, ffi.Pointer input, ) { - return _wire_parse_input( + return _wire__crate__binding__parse_input( port_, input, ); } - late final _wire_parse_inputPtr = + late final _wire__crate__binding__parse_inputPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_parse_input'); - late final _wire_parse_input = - _wire_parse_inputPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__parse_input'); + late final _wire__crate__binding__parse_input = _wire__crate__binding__parse_inputPtr + .asFunction)>(); - void wire_parse_invoice( + void wire__crate__binding__parse_invoice( int port_, ffi.Pointer invoice, ) { - return _wire_parse_invoice( + return _wire__crate__binding__parse_invoice( port_, invoice, ); } - late final _wire_parse_invoicePtr = + late final _wire__crate__binding__parse_invoicePtr = _lookup)>>( - 'frbgen_breez_sdk_wire_parse_invoice'); - late final _wire_parse_invoice = - _wire_parse_invoicePtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__parse_invoice'); + late final _wire__crate__binding__parse_invoice = _wire__crate__binding__parse_invoicePtr + .asFunction)>(); - void wire_pay_onchain( + void wire__crate__binding__pay_onchain( int port_, ffi.Pointer req, ) { - return _wire_pay_onchain( + return _wire__crate__binding__pay_onchain( port_, req, ); } - late final _wire_pay_onchainPtr = + late final _wire__crate__binding__pay_onchainPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_pay_onchain'); - late final _wire_pay_onchain = - _wire_pay_onchainPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__pay_onchain'); + late final _wire__crate__binding__pay_onchain = _wire__crate__binding__pay_onchainPtr + .asFunction)>(); - void wire_payment_by_hash( + void wire__crate__binding__payment_by_hash( int port_, ffi.Pointer hash, ) { - return _wire_payment_by_hash( + return _wire__crate__binding__payment_by_hash( port_, hash, ); } - late final _wire_payment_by_hashPtr = + late final _wire__crate__binding__payment_by_hashPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_payment_by_hash'); - late final _wire_payment_by_hash = - _wire_payment_by_hashPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__payment_by_hash'); + late final _wire__crate__binding__payment_by_hash = _wire__crate__binding__payment_by_hashPtr + .asFunction)>(); - void wire_prepare_onchain_payment( + void wire__crate__binding__prepare_onchain_payment( int port_, ffi.Pointer req, ) { - return _wire_prepare_onchain_payment( + return _wire__crate__binding__prepare_onchain_payment( port_, req, ); } - late final _wire_prepare_onchain_paymentPtr = _lookup< + late final _wire__crate__binding__prepare_onchain_paymentPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire_prepare_onchain_payment'); - late final _wire_prepare_onchain_payment = _wire_prepare_onchain_paymentPtr - .asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment'); + late final _wire__crate__binding__prepare_onchain_payment = + _wire__crate__binding__prepare_onchain_paymentPtr + .asFunction)>(); - void wire_prepare_redeem_onchain_funds( + void wire__crate__binding__prepare_redeem_onchain_funds( int port_, ffi.Pointer req, ) { - return _wire_prepare_redeem_onchain_funds( + return _wire__crate__binding__prepare_redeem_onchain_funds( port_, req, ); } - late final _wire_prepare_redeem_onchain_fundsPtr = _lookup< + late final _wire__crate__binding__prepare_redeem_onchain_fundsPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire_prepare_redeem_onchain_funds'); - late final _wire_prepare_redeem_onchain_funds = _wire_prepare_redeem_onchain_fundsPtr - .asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds'); + late final _wire__crate__binding__prepare_redeem_onchain_funds = + _wire__crate__binding__prepare_redeem_onchain_fundsPtr + .asFunction)>(); - void wire_prepare_refund( + void wire__crate__binding__prepare_refund( int port_, ffi.Pointer req, ) { - return _wire_prepare_refund( + return _wire__crate__binding__prepare_refund( port_, req, ); } - late final _wire_prepare_refundPtr = + late final _wire__crate__binding__prepare_refundPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_prepare_refund'); - late final _wire_prepare_refund = - _wire_prepare_refundPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__prepare_refund'); + late final _wire__crate__binding__prepare_refund = _wire__crate__binding__prepare_refundPtr + .asFunction)>(); - void wire_receive_onchain( + void wire__crate__binding__receive_onchain( int port_, ffi.Pointer req, ) { - return _wire_receive_onchain( + return _wire__crate__binding__receive_onchain( port_, req, ); } - late final _wire_receive_onchainPtr = _lookup< + late final _wire__crate__binding__receive_onchainPtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_receive_onchain'); - late final _wire_receive_onchain = _wire_receive_onchainPtr + 'frbgen_breez_sdk_wire__crate__binding__receive_onchain'); + late final _wire__crate__binding__receive_onchain = _wire__crate__binding__receive_onchainPtr .asFunction)>(); - void wire_receive_payment( + void wire__crate__binding__receive_payment( int port_, ffi.Pointer req, ) { - return _wire_receive_payment( + return _wire__crate__binding__receive_payment( port_, req, ); } - late final _wire_receive_paymentPtr = _lookup< + late final _wire__crate__binding__receive_paymentPtr = _lookup< ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire_receive_payment'); - late final _wire_receive_payment = _wire_receive_paymentPtr + 'frbgen_breez_sdk_wire__crate__binding__receive_payment'); + late final _wire__crate__binding__receive_payment = _wire__crate__binding__receive_paymentPtr .asFunction)>(); - void wire_recommended_fees( + void wire__crate__binding__recommended_fees( int port_, ) { - return _wire_recommended_fees( + return _wire__crate__binding__recommended_fees( port_, ); } - late final _wire_recommended_feesPtr = - _lookup>('frbgen_breez_sdk_wire_recommended_fees'); - late final _wire_recommended_fees = _wire_recommended_feesPtr.asFunction(); + late final _wire__crate__binding__recommended_feesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__recommended_fees'); + late final _wire__crate__binding__recommended_fees = + _wire__crate__binding__recommended_feesPtr.asFunction(); - void wire_redeem_onchain_funds( + void wire__crate__binding__redeem_onchain_funds( int port_, ffi.Pointer req, ) { - return _wire_redeem_onchain_funds( + return _wire__crate__binding__redeem_onchain_funds( port_, req, ); } - late final _wire_redeem_onchain_fundsPtr = _lookup< + late final _wire__crate__binding__redeem_onchain_fundsPtr = _lookup< ffi .NativeFunction)>>( - 'frbgen_breez_sdk_wire_redeem_onchain_funds'); - late final _wire_redeem_onchain_funds = _wire_redeem_onchain_fundsPtr + 'frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds'); + late final _wire__crate__binding__redeem_onchain_funds = _wire__crate__binding__redeem_onchain_fundsPtr .asFunction)>(); - void wire_redeem_swap( + void wire__crate__binding__redeem_swap( int port_, ffi.Pointer swap_address, ) { - return _wire_redeem_swap( + return _wire__crate__binding__redeem_swap( port_, swap_address, ); } - late final _wire_redeem_swapPtr = + late final _wire__crate__binding__redeem_swapPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_redeem_swap'); - late final _wire_redeem_swap = - _wire_redeem_swapPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__redeem_swap'); + late final _wire__crate__binding__redeem_swap = _wire__crate__binding__redeem_swapPtr + .asFunction)>(); - void wire_refund( + void wire__crate__binding__refund( int port_, ffi.Pointer req, ) { - return _wire_refund( + return _wire__crate__binding__refund( port_, req, ); } - late final _wire_refundPtr = + late final _wire__crate__binding__refundPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_refund'); - late final _wire_refund = - _wire_refundPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__refund'); + late final _wire__crate__binding__refund = + _wire__crate__binding__refundPtr.asFunction)>(); - void wire_register_webhook( + void wire__crate__binding__register_webhook( int port_, ffi.Pointer webhook_url, ) { - return _wire_register_webhook( + return _wire__crate__binding__register_webhook( port_, webhook_url, ); } - late final _wire_register_webhookPtr = + late final _wire__crate__binding__register_webhookPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_register_webhook'); - late final _wire_register_webhook = - _wire_register_webhookPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__register_webhook'); + late final _wire__crate__binding__register_webhook = _wire__crate__binding__register_webhookPtr + .asFunction)>(); - void wire_report_issue( + void wire__crate__binding__report_issue( int port_, ffi.Pointer req, ) { - return _wire_report_issue( + return _wire__crate__binding__report_issue( port_, req, ); } - late final _wire_report_issuePtr = + late final _wire__crate__binding__report_issuePtr = _lookup)>>( - 'frbgen_breez_sdk_wire_report_issue'); - late final _wire_report_issue = - _wire_report_issuePtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__report_issue'); + late final _wire__crate__binding__report_issue = _wire__crate__binding__report_issuePtr + .asFunction)>(); - void wire_rescan_swaps( + void wire__crate__binding__rescan_swaps( int port_, ) { - return _wire_rescan_swaps( + return _wire__crate__binding__rescan_swaps( port_, ); } - late final _wire_rescan_swapsPtr = - _lookup>('frbgen_breez_sdk_wire_rescan_swaps'); - late final _wire_rescan_swaps = _wire_rescan_swapsPtr.asFunction(); + late final _wire__crate__binding__rescan_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__rescan_swaps'); + late final _wire__crate__binding__rescan_swaps = + _wire__crate__binding__rescan_swapsPtr.asFunction(); - void wire_send_onchain( + void wire__crate__binding__send_onchain( int port_, ffi.Pointer req, ) { - return _wire_send_onchain( + return _wire__crate__binding__send_onchain( port_, req, ); } - late final _wire_send_onchainPtr = + late final _wire__crate__binding__send_onchainPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_send_onchain'); - late final _wire_send_onchain = - _wire_send_onchainPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__send_onchain'); + late final _wire__crate__binding__send_onchain = _wire__crate__binding__send_onchainPtr + .asFunction)>(); - void wire_send_payment( + void wire__crate__binding__send_payment( int port_, ffi.Pointer req, ) { - return _wire_send_payment( + return _wire__crate__binding__send_payment( port_, req, ); } - late final _wire_send_paymentPtr = + late final _wire__crate__binding__send_paymentPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_send_payment'); - late final _wire_send_payment = - _wire_send_paymentPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__send_payment'); + late final _wire__crate__binding__send_payment = _wire__crate__binding__send_paymentPtr + .asFunction)>(); - void wire_send_spontaneous_payment( + void wire__crate__binding__send_spontaneous_payment( int port_, ffi.Pointer req, ) { - return _wire_send_spontaneous_payment( + return _wire__crate__binding__send_spontaneous_payment( port_, req, ); } - late final _wire_send_spontaneous_paymentPtr = _lookup< + late final _wire__crate__binding__send_spontaneous_paymentPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire_send_spontaneous_payment'); - late final _wire_send_spontaneous_payment = _wire_send_spontaneous_paymentPtr - .asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment'); + late final _wire__crate__binding__send_spontaneous_payment = + _wire__crate__binding__send_spontaneous_paymentPtr + .asFunction)>(); - void wire_service_health_check( + void wire__crate__binding__service_health_check( int port_, ffi.Pointer api_key, ) { - return _wire_service_health_check( + return _wire__crate__binding__service_health_check( port_, api_key, ); } - late final _wire_service_health_checkPtr = + late final _wire__crate__binding__service_health_checkPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_service_health_check'); - late final _wire_service_health_check = _wire_service_health_checkPtr + 'frbgen_breez_sdk_wire__crate__binding__service_health_check'); + late final _wire__crate__binding__service_health_check = _wire__crate__binding__service_health_checkPtr .asFunction)>(); - void wire_set_payment_metadata( + void wire__crate__binding__set_payment_metadata( int port_, ffi.Pointer hash, ffi.Pointer metadata, ) { - return _wire_set_payment_metadata( + return _wire__crate__binding__set_payment_metadata( port_, hash, metadata, ); } - late final _wire_set_payment_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>('frbgen_breez_sdk_wire_set_payment_metadata'); - late final _wire_set_payment_metadata = _wire_set_payment_metadataPtr.asFunction< - void Function( - int, ffi.Pointer, ffi.Pointer)>(); - - void wire_sign_message( + late final _wire__crate__binding__set_payment_metadataPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__set_payment_metadata'); + late final _wire__crate__binding__set_payment_metadata = + _wire__crate__binding__set_payment_metadataPtr.asFunction< + void Function( + int, ffi.Pointer, ffi.Pointer)>(); + + void wire__crate__binding__sign_message( int port_, ffi.Pointer req, ) { - return _wire_sign_message( + return _wire__crate__binding__sign_message( port_, req, ); } - late final _wire_sign_messagePtr = + late final _wire__crate__binding__sign_messagePtr = _lookup)>>( - 'frbgen_breez_sdk_wire_sign_message'); - late final _wire_sign_message = - _wire_sign_messagePtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__sign_message'); + late final _wire__crate__binding__sign_message = _wire__crate__binding__sign_messagePtr + .asFunction)>(); - void wire_static_backup( + void wire__crate__binding__static_backup( int port_, ffi.Pointer req, ) { - return _wire_static_backup( + return _wire__crate__binding__static_backup( port_, req, ); } - late final _wire_static_backupPtr = + late final _wire__crate__binding__static_backupPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_static_backup'); - late final _wire_static_backup = - _wire_static_backupPtr.asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__static_backup'); + late final _wire__crate__binding__static_backup = _wire__crate__binding__static_backupPtr + .asFunction)>(); - void wire_sync( + void wire__crate__binding__sync( int port_, ) { - return _wire_sync( + return _wire__crate__binding__sync( port_, ); } - late final _wire_syncPtr = - _lookup>('frbgen_breez_sdk_wire_sync'); - late final _wire_sync = _wire_syncPtr.asFunction(); + late final _wire__crate__binding__syncPtr = _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__sync'); + late final _wire__crate__binding__sync = _wire__crate__binding__syncPtr.asFunction(); - void wire_unregister_webhook( + void wire__crate__binding__unregister_webhook( int port_, ffi.Pointer webhook_url, ) { - return _wire_unregister_webhook( + return _wire__crate__binding__unregister_webhook( port_, webhook_url, ); } - late final _wire_unregister_webhookPtr = + late final _wire__crate__binding__unregister_webhookPtr = _lookup)>>( - 'frbgen_breez_sdk_wire_unregister_webhook'); - late final _wire_unregister_webhook = _wire_unregister_webhookPtr + 'frbgen_breez_sdk_wire__crate__binding__unregister_webhook'); + late final _wire__crate__binding__unregister_webhook = _wire__crate__binding__unregister_webhookPtr .asFunction)>(); ffi.Pointer diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart index c1ccb8e61..1f16f57ac 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -14,7 +14,7 @@ part 'input_parser.freezed.dart'; class BitcoinAddressData { final String address; final Network network; - final int? amountSat; + final BigInt? amountSat; final String? label; final String? message; @@ -170,10 +170,10 @@ class LnUrlPayRequestData { final String callback; /// The minimum amount, in millisats, that this LNURL-pay endpoint accepts - final int minSendable; + final BigInt minSendable; /// The maximum amount, in millisats, that this LNURL-pay endpoint accepts - final int maxSendable; + final BigInt maxSendable; /// As per LUD-06, `metadata` is a raw string (e.g. a json representation of the inner map). /// Use `metadata_vec()` to get the parsed items. @@ -256,10 +256,10 @@ class LnUrlWithdrawRequestData { final String defaultDescription; /// The minimum amount, in millisats, that this LNURL-withdraw endpoint accepts - final int minWithdrawable; + final BigInt minWithdrawable; /// The maximum amount, in millisats, that this LNURL-withdraw endpoint accepts - final int maxWithdrawable; + final BigInt maxWithdrawable; const LnUrlWithdrawRequestData({ required this.callback, diff --git a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart index bec050b19..85966dc4b 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart @@ -99,8 +99,7 @@ abstract class $InputTypeCopyWith<$Res> { } /// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> - implements $InputTypeCopyWith<$Res> { +class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTypeCopyWith<$Res> { _$InputTypeCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -112,8 +111,7 @@ class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> /// @nodoc abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, - $Res Function(_$InputType_BitcoinAddressImpl) then) = + _$InputType_BitcoinAddressImpl value, $Res Function(_$InputType_BitcoinAddressImpl) then) = __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; @useResult $Res call({BitcoinAddressData address}); @@ -124,8 +122,7 @@ class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, - $Res Function(_$InputType_BitcoinAddressImpl) _then) + _$InputType_BitcoinAddressImpl _value, $Res Function(_$InputType_BitcoinAddressImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -169,9 +166,8 @@ class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => __$$InputType_BitcoinAddressImplCopyWithImpl< - _$InputType_BitcoinAddressImpl>(this, _$identity); + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => + __$$InputType_BitcoinAddressImplCopyWithImpl<_$InputType_BitcoinAddressImpl>(this, _$identity); @override @optionalTypeArgs @@ -273,32 +269,30 @@ class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { } abstract class InputType_BitcoinAddress extends InputType { - const factory InputType_BitcoinAddress( - {required final BitcoinAddressData address}) = + const factory InputType_BitcoinAddress({required final BitcoinAddressData address}) = _$InputType_BitcoinAddressImpl; const InputType_BitcoinAddress._() : super._(); BitcoinAddressData get address; @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => throw _privateConstructorUsedError; + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith(_$InputType_Bolt11Impl value, - $Res Function(_$InputType_Bolt11Impl) then) = + factory _$$InputType_Bolt11ImplCopyWith( + _$InputType_Bolt11Impl value, $Res Function(_$InputType_Bolt11Impl) then) = __$$InputType_Bolt11ImplCopyWithImpl<$Res>; @useResult $Res call({LNInvoice invoice}); } /// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> +class __$$InputType_Bolt11ImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl(_$InputType_Bolt11Impl _value, - $Res Function(_$InputType_Bolt11Impl) _then) + __$$InputType_Bolt11ImplCopyWithImpl( + _$InputType_Bolt11Impl _value, $Res Function(_$InputType_Bolt11Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -343,8 +337,7 @@ class _$InputType_Bolt11Impl extends InputType_Bolt11 { @override @pragma('vm:prefer-inline') _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>( - this, _$identity); + __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>(this, _$identity); @override @optionalTypeArgs @@ -446,31 +439,28 @@ class _$InputType_Bolt11Impl extends InputType_Bolt11 { } abstract class InputType_Bolt11 extends InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = - _$InputType_Bolt11Impl; + const factory InputType_Bolt11({required final LNInvoice invoice}) = _$InputType_Bolt11Impl; const InputType_Bolt11._() : super._(); LNInvoice get invoice; @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith(_$InputType_NodeIdImpl value, - $Res Function(_$InputType_NodeIdImpl) then) = + factory _$$InputType_NodeIdImplCopyWith( + _$InputType_NodeIdImpl value, $Res Function(_$InputType_NodeIdImpl) then) = __$$InputType_NodeIdImplCopyWithImpl<$Res>; @useResult $Res call({String nodeId}); } /// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> +class __$$InputType_NodeIdImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl(_$InputType_NodeIdImpl _value, - $Res Function(_$InputType_NodeIdImpl) _then) + __$$InputType_NodeIdImplCopyWithImpl( + _$InputType_NodeIdImpl _value, $Res Function(_$InputType_NodeIdImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -515,8 +505,7 @@ class _$InputType_NodeIdImpl extends InputType_NodeId { @override @pragma('vm:prefer-inline') _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>( - this, _$identity); + __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>(this, _$identity); @override @optionalTypeArgs @@ -618,31 +607,26 @@ class _$InputType_NodeIdImpl extends InputType_NodeId { } abstract class InputType_NodeId extends InputType { - const factory InputType_NodeId({required final String nodeId}) = - _$InputType_NodeIdImpl; + const factory InputType_NodeId({required final String nodeId}) = _$InputType_NodeIdImpl; const InputType_NodeId._() : super._(); String get nodeId; @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith( - _$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = + factory _$$InputType_UrlImplCopyWith(_$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = __$$InputType_UrlImplCopyWithImpl<$Res>; @useResult $Res call({String url}); } /// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> +class __$$InputType_UrlImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl( - _$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) + __$$InputType_UrlImplCopyWithImpl(_$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -789,20 +773,18 @@ class _$InputType_UrlImpl extends InputType_Url { } abstract class InputType_Url extends InputType { - const factory InputType_Url({required final String url}) = - _$InputType_UrlImpl; + const factory InputType_Url({required final String url}) = _$InputType_UrlImpl; const InputType_Url._() : super._(); String get url; @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith(_$InputType_LnUrlPayImpl value, - $Res Function(_$InputType_LnUrlPayImpl) then) = + factory _$$InputType_LnUrlPayImplCopyWith( + _$InputType_LnUrlPayImpl value, $Res Function(_$InputType_LnUrlPayImpl) then) = __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlPayRequestData data}); @@ -812,8 +794,8 @@ abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl(_$InputType_LnUrlPayImpl _value, - $Res Function(_$InputType_LnUrlPayImpl) _then) + __$$InputType_LnUrlPayImplCopyWithImpl( + _$InputType_LnUrlPayImpl _value, $Res Function(_$InputType_LnUrlPayImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -858,8 +840,7 @@ class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { @override @pragma('vm:prefer-inline') _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>( - this, _$identity); + __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>(this, _$identity); @override @optionalTypeArgs @@ -961,8 +942,7 @@ class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { } abstract class InputType_LnUrlPay extends InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = - _$InputType_LnUrlPayImpl; + const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = _$InputType_LnUrlPayImpl; const InputType_LnUrlPay._() : super._(); LnUrlPayRequestData get data; @@ -974,8 +954,7 @@ abstract class InputType_LnUrlPay extends InputType { /// @nodoc abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, - $Res Function(_$InputType_LnUrlWithdrawImpl) then) = + _$InputType_LnUrlWithdrawImpl value, $Res Function(_$InputType_LnUrlWithdrawImpl) then) = __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlWithdrawRequestData data}); @@ -986,8 +965,7 @@ class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, - $Res Function(_$InputType_LnUrlWithdrawImpl) _then) + _$InputType_LnUrlWithdrawImpl _value, $Res Function(_$InputType_LnUrlWithdrawImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1031,9 +1009,8 @@ class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => __$$InputType_LnUrlWithdrawImplCopyWithImpl< - _$InputType_LnUrlWithdrawImpl>(this, _$identity); + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => + __$$InputType_LnUrlWithdrawImplCopyWithImpl<_$InputType_LnUrlWithdrawImpl>(this, _$identity); @override @optionalTypeArgs @@ -1135,21 +1112,20 @@ class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { } abstract class InputType_LnUrlWithdraw extends InputType { - const factory InputType_LnUrlWithdraw( - {required final LnUrlWithdrawRequestData data}) = + const factory InputType_LnUrlWithdraw({required final LnUrlWithdrawRequestData data}) = _$InputType_LnUrlWithdrawImpl; const InputType_LnUrlWithdraw._() : super._(); LnUrlWithdrawRequestData get data; @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => throw _privateConstructorUsedError; + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith(_$InputType_LnUrlAuthImpl value, - $Res Function(_$InputType_LnUrlAuthImpl) then) = + factory _$$InputType_LnUrlAuthImplCopyWith( + _$InputType_LnUrlAuthImpl value, $Res Function(_$InputType_LnUrlAuthImpl) then) = __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlAuthRequestData data}); @@ -1159,8 +1135,8 @@ abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl(_$InputType_LnUrlAuthImpl _value, - $Res Function(_$InputType_LnUrlAuthImpl) _then) + __$$InputType_LnUrlAuthImplCopyWithImpl( + _$InputType_LnUrlAuthImpl _value, $Res Function(_$InputType_LnUrlAuthImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1205,8 +1181,7 @@ class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { @override @pragma('vm:prefer-inline') _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>( - this, _$identity); + __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>(this, _$identity); @override @optionalTypeArgs @@ -1308,8 +1283,7 @@ class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { } abstract class InputType_LnUrlAuth extends InputType { - const factory InputType_LnUrlAuth( - {required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; + const factory InputType_LnUrlAuth({required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; const InputType_LnUrlAuth._() : super._(); LnUrlAuthRequestData get data; @@ -1320,8 +1294,8 @@ abstract class InputType_LnUrlAuth extends InputType { /// @nodoc abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith(_$InputType_LnUrlErrorImpl value, - $Res Function(_$InputType_LnUrlErrorImpl) then) = + factory _$$InputType_LnUrlErrorImplCopyWith( + _$InputType_LnUrlErrorImpl value, $Res Function(_$InputType_LnUrlErrorImpl) then) = __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlErrorData data}); @@ -1331,8 +1305,8 @@ abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl(_$InputType_LnUrlErrorImpl _value, - $Res Function(_$InputType_LnUrlErrorImpl) _then) + __$$InputType_LnUrlErrorImplCopyWithImpl( + _$InputType_LnUrlErrorImpl _value, $Res Function(_$InputType_LnUrlErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1376,10 +1350,8 @@ class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>( - this, _$identity); + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => + __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>(this, _$identity); @override @optionalTypeArgs @@ -1481,12 +1453,11 @@ class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { } abstract class InputType_LnUrlError extends InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = - _$InputType_LnUrlErrorImpl; + const factory InputType_LnUrlError({required final LnUrlErrorData data}) = _$InputType_LnUrlErrorImpl; const InputType_LnUrlError._() : super._(); LnUrlErrorData get data; @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => throw _privateConstructorUsedError; + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart index 4f417e5f3..86d563b77 100644 --- a/libs/sdk-flutter/lib/generated/invoice.dart +++ b/libs/sdk-flutter/lib/generated/invoice.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -15,12 +15,12 @@ class LNInvoice { final String paymentHash; final String? description; final String? descriptionHash; - final int? amountMsat; - final int timestamp; - final int expiry; + final BigInt? amountMsat; + final BigInt timestamp; + final BigInt expiry; final List routingHints; final Uint8List paymentSecret; - final int minFinalCltvExpiryDelta; + final BigInt minFinalCltvExpiryDelta; const LNInvoice({ required this.bolt11, @@ -93,20 +93,20 @@ class RouteHintHop { final String srcNodeId; /// The short_channel_id of this channel - final int shortChannelId; + final BigInt shortChannelId; /// The fees which must be paid to use this channel final int feesBaseMsat; final int feesProportionalMillionths; /// The difference in CLTV values between this node and the next node. - final int cltvExpiryDelta; + final BigInt cltvExpiryDelta; /// The minimum value, in msat, which must be relayed to the next hop. - final int? htlcMinimumMsat; + final BigInt? htlcMinimumMsat; /// The maximum value in msat available for routing with a single HTLC. - final int? htlcMaximumMsat; + final BigInt? htlcMaximumMsat; const RouteHintHop({ required this.srcNodeId, diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart index 575f651f7..b4cae1ec0 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart index decac435a..c5887f5fa 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart @@ -37,17 +37,14 @@ mixin _$AesSuccessActionDataResult { throw _privateConstructorUsedError; @optionalTypeArgs TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -61,15 +58,13 @@ mixin _$AesSuccessActionDataResult { /// @nodoc abstract class $AesSuccessActionDataResultCopyWith<$Res> { - factory $AesSuccessActionDataResultCopyWith(AesSuccessActionDataResult value, - $Res Function(AesSuccessActionDataResult) then) = - _$AesSuccessActionDataResultCopyWithImpl<$Res, - AesSuccessActionDataResult>; + factory $AesSuccessActionDataResultCopyWith( + AesSuccessActionDataResult value, $Res Function(AesSuccessActionDataResult) then) = + _$AesSuccessActionDataResultCopyWithImpl<$Res, AesSuccessActionDataResult>; } /// @nodoc -class _$AesSuccessActionDataResultCopyWithImpl<$Res, - $Val extends AesSuccessActionDataResult> +class _$AesSuccessActionDataResultCopyWithImpl<$Res, $Val extends AesSuccessActionDataResult> implements $AesSuccessActionDataResultCopyWith<$Res> { _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); @@ -91,11 +86,9 @@ abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { /// @nodoc class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, - _$AesSuccessActionDataResult_DecryptedImpl> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_DecryptedImpl> implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl( - _$AesSuccessActionDataResult_DecryptedImpl _value, + __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl(_$AesSuccessActionDataResult_DecryptedImpl _value, $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) : super(_value, _then); @@ -115,10 +108,8 @@ class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> /// @nodoc -class _$AesSuccessActionDataResult_DecryptedImpl - extends AesSuccessActionDataResult_Decrypted { - const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}) - : super._(); +class _$AesSuccessActionDataResult_DecryptedImpl extends AesSuccessActionDataResult_Decrypted { + const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}) : super._(); @override final AesSuccessActionDataDecrypted data; @@ -142,8 +133,7 @@ class _$AesSuccessActionDataResult_DecryptedImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_DecryptedImplCopyWith< - _$AesSuccessActionDataResult_DecryptedImpl> + _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); @@ -181,10 +171,8 @@ class _$AesSuccessActionDataResult_DecryptedImpl @override @optionalTypeArgs TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, }) { return decrypted(this); } @@ -193,8 +181,7 @@ class _$AesSuccessActionDataResult_DecryptedImpl @optionalTypeArgs TResult? mapOrNull({ TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, }) { return decrypted?.call(this); } @@ -213,17 +200,14 @@ class _$AesSuccessActionDataResult_DecryptedImpl } } -abstract class AesSuccessActionDataResult_Decrypted - extends AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_Decrypted( - {required final AesSuccessActionDataDecrypted data}) = +abstract class AesSuccessActionDataResult_Decrypted extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_Decrypted({required final AesSuccessActionDataDecrypted data}) = _$AesSuccessActionDataResult_DecryptedImpl; const AesSuccessActionDataResult_Decrypted._() : super._(); AesSuccessActionDataDecrypted get data; @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_DecryptedImplCopyWith< - _$AesSuccessActionDataResult_DecryptedImpl> + _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> get copyWith => throw _privateConstructorUsedError; } @@ -239,8 +223,7 @@ abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { /// @nodoc class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, - _$AesSuccessActionDataResult_ErrorStatusImpl> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_ErrorStatusImpl> implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( _$AesSuccessActionDataResult_ErrorStatusImpl _value, @@ -263,10 +246,8 @@ class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> /// @nodoc -class _$AesSuccessActionDataResult_ErrorStatusImpl - extends AesSuccessActionDataResult_ErrorStatus { - const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}) - : super._(); +class _$AesSuccessActionDataResult_ErrorStatusImpl extends AesSuccessActionDataResult_ErrorStatus { + const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}) : super._(); @override final String reason; @@ -290,11 +271,9 @@ class _$AesSuccessActionDataResult_ErrorStatusImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< - _$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< - _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> + get copyWith => __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< + _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); @override @optionalTypeArgs @@ -330,10 +309,8 @@ class _$AesSuccessActionDataResult_ErrorStatusImpl @override @optionalTypeArgs TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, }) { return errorStatus(this); } @@ -342,8 +319,7 @@ class _$AesSuccessActionDataResult_ErrorStatusImpl @optionalTypeArgs TResult? mapOrNull({ TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, }) { return errorStatus?.call(this); } @@ -362,17 +338,14 @@ class _$AesSuccessActionDataResult_ErrorStatusImpl } } -abstract class AesSuccessActionDataResult_ErrorStatus - extends AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_ErrorStatus( - {required final String reason}) = +abstract class AesSuccessActionDataResult_ErrorStatus extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_ErrorStatus({required final String reason}) = _$AesSuccessActionDataResult_ErrorStatusImpl; const AesSuccessActionDataResult_ErrorStatus._() : super._(); String get reason; @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< - _$AesSuccessActionDataResult_ErrorStatusImpl> + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> get copyWith => throw _privateConstructorUsedError; } @@ -403,8 +376,7 @@ mixin _$LnUrlPayResult { throw _privateConstructorUsedError; @optionalTypeArgs TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, required TResult Function(LnUrlPayResult_EndpointError value) endpointError, required TResult Function(LnUrlPayResult_PayError value) payError, }) => @@ -428,8 +400,7 @@ mixin _$LnUrlPayResult { /// @nodoc abstract class $LnUrlPayResultCopyWith<$Res> { - factory $LnUrlPayResultCopyWith( - LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = + factory $LnUrlPayResultCopyWith(LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; } @@ -446,8 +417,7 @@ class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> /// @nodoc abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith( - _$LnUrlPayResult_EndpointSuccessImpl value, + factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith(_$LnUrlPayResult_EndpointSuccessImpl value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; @useResult @@ -456,12 +426,10 @@ abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { /// @nodoc class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, - _$LnUrlPayResult_EndpointSuccessImpl> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointSuccessImpl> implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( - _$LnUrlPayResult_EndpointSuccessImpl _value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) + _$LnUrlPayResult_EndpointSuccessImpl _value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -480,8 +448,7 @@ class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> /// @nodoc -class _$LnUrlPayResult_EndpointSuccessImpl - extends LnUrlPayResult_EndpointSuccess { +class _$LnUrlPayResult_EndpointSuccessImpl extends LnUrlPayResult_EndpointSuccess { const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}) : super._(); @override @@ -506,10 +473,9 @@ class _$LnUrlPayResult_EndpointSuccessImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointSuccessImplCopyWith< - _$LnUrlPayResult_EndpointSuccessImpl> - get copyWith => __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl< - _$LnUrlPayResult_EndpointSuccessImpl>(this, _$identity); + _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<_$LnUrlPayResult_EndpointSuccessImpl>( + this, _$identity); @override @optionalTypeArgs @@ -548,8 +514,7 @@ class _$LnUrlPayResult_EndpointSuccessImpl @override @optionalTypeArgs TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, required TResult Function(LnUrlPayResult_EndpointError value) endpointError, required TResult Function(LnUrlPayResult_PayError value) payError, }) { @@ -582,24 +547,21 @@ class _$LnUrlPayResult_EndpointSuccessImpl } abstract class LnUrlPayResult_EndpointSuccess extends LnUrlPayResult { - const factory LnUrlPayResult_EndpointSuccess( - {required final LnUrlPaySuccessData data}) = + const factory LnUrlPayResult_EndpointSuccess({required final LnUrlPaySuccessData data}) = _$LnUrlPayResult_EndpointSuccessImpl; const LnUrlPayResult_EndpointSuccess._() : super._(); @override LnUrlPaySuccessData get data; @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointSuccessImplCopyWith< - _$LnUrlPayResult_EndpointSuccessImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( - _$LnUrlPayResult_EndpointErrorImpl value, - $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = + _$LnUrlPayResult_EndpointErrorImpl value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlErrorData data}); @@ -607,12 +569,10 @@ abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { /// @nodoc class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, - _$LnUrlPayResult_EndpointErrorImpl> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointErrorImpl> implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( - _$LnUrlPayResult_EndpointErrorImpl _value, - $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) + _$LnUrlPayResult_EndpointErrorImpl _value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -656,10 +616,8 @@ class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointErrorImplCopyWith< - _$LnUrlPayResult_EndpointErrorImpl> - get copyWith => __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl< - _$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); + _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<_$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); @override @optionalTypeArgs @@ -698,8 +656,7 @@ class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { @override @optionalTypeArgs TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, required TResult Function(LnUrlPayResult_EndpointError value) endpointError, required TResult Function(LnUrlPayResult_PayError value) payError, }) { @@ -732,24 +689,21 @@ class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { } abstract class LnUrlPayResult_EndpointError extends LnUrlPayResult { - const factory LnUrlPayResult_EndpointError( - {required final LnUrlErrorData data}) = + const factory LnUrlPayResult_EndpointError({required final LnUrlErrorData data}) = _$LnUrlPayResult_EndpointErrorImpl; const LnUrlPayResult_EndpointError._() : super._(); @override LnUrlErrorData get data; @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointErrorImplCopyWith< - _$LnUrlPayResult_EndpointErrorImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { factory _$$LnUrlPayResult_PayErrorImplCopyWith( - _$LnUrlPayResult_PayErrorImpl value, - $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = + _$LnUrlPayResult_PayErrorImpl value, $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlPayErrorData data}); @@ -760,8 +714,7 @@ class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { __$$LnUrlPayResult_PayErrorImplCopyWithImpl( - _$LnUrlPayResult_PayErrorImpl _value, - $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) + _$LnUrlPayResult_PayErrorImpl _value, $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -805,9 +758,8 @@ class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> - get copyWith => __$$LnUrlPayResult_PayErrorImplCopyWithImpl< - _$LnUrlPayResult_PayErrorImpl>(this, _$identity); + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => + __$$LnUrlPayResult_PayErrorImplCopyWithImpl<_$LnUrlPayResult_PayErrorImpl>(this, _$identity); @override @optionalTypeArgs @@ -846,8 +798,7 @@ class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { @override @optionalTypeArgs TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, required TResult Function(LnUrlPayResult_EndpointError value) endpointError, required TResult Function(LnUrlPayResult_PayError value) payError, }) { @@ -880,15 +831,15 @@ class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { } abstract class LnUrlPayResult_PayError extends LnUrlPayResult { - const factory LnUrlPayResult_PayError( - {required final LnUrlPayErrorData data}) = _$LnUrlPayResult_PayErrorImpl; + const factory LnUrlPayResult_PayError({required final LnUrlPayErrorData data}) = + _$LnUrlPayResult_PayErrorImpl; const LnUrlPayResult_PayError._() : super._(); @override LnUrlPayErrorData get data; @JsonKey(ignore: true) - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -941,14 +892,13 @@ mixin _$SuccessActionProcessed { /// @nodoc abstract class $SuccessActionProcessedCopyWith<$Res> { - factory $SuccessActionProcessedCopyWith(SuccessActionProcessed value, - $Res Function(SuccessActionProcessed) then) = + factory $SuccessActionProcessedCopyWith( + SuccessActionProcessed value, $Res Function(SuccessActionProcessed) then) = _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; } /// @nodoc -class _$SuccessActionProcessedCopyWithImpl<$Res, - $Val extends SuccessActionProcessed> +class _$SuccessActionProcessedCopyWithImpl<$Res, $Val extends SuccessActionProcessed> implements $SuccessActionProcessedCopyWith<$Res> { _$SuccessActionProcessedCopyWithImpl(this._value, this._then); @@ -961,8 +911,7 @@ class _$SuccessActionProcessedCopyWithImpl<$Res, /// @nodoc abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { factory _$$SuccessActionProcessed_AesImplCopyWith( - _$SuccessActionProcessed_AesImpl value, - $Res Function(_$SuccessActionProcessed_AesImpl) then) = + _$SuccessActionProcessed_AesImpl value, $Res Function(_$SuccessActionProcessed_AesImpl) then) = __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; @useResult $Res call({AesSuccessActionDataResult result}); @@ -972,12 +921,10 @@ abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { /// @nodoc class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_AesImpl> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_AesImpl> implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { __$$SuccessActionProcessed_AesImplCopyWithImpl( - _$SuccessActionProcessed_AesImpl _value, - $Res Function(_$SuccessActionProcessed_AesImpl) _then) + _$SuccessActionProcessed_AesImpl _value, $Res Function(_$SuccessActionProcessed_AesImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1029,9 +976,8 @@ class _$SuccessActionProcessed_AesImpl extends SuccessActionProcessed_Aes { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> - get copyWith => __$$SuccessActionProcessed_AesImplCopyWithImpl< - _$SuccessActionProcessed_AesImpl>(this, _$identity); + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => + __$$SuccessActionProcessed_AesImplCopyWithImpl<_$SuccessActionProcessed_AesImpl>(this, _$identity); @override @optionalTypeArgs @@ -1103,21 +1049,19 @@ class _$SuccessActionProcessed_AesImpl extends SuccessActionProcessed_Aes { } abstract class SuccessActionProcessed_Aes extends SuccessActionProcessed { - const factory SuccessActionProcessed_Aes( - {required final AesSuccessActionDataResult result}) = + const factory SuccessActionProcessed_Aes({required final AesSuccessActionDataResult result}) = _$SuccessActionProcessed_AesImpl; const SuccessActionProcessed_Aes._() : super._(); AesSuccessActionDataResult get result; @JsonKey(ignore: true) - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> - get copyWith => throw _privateConstructorUsedError; + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_MessageImplCopyWith( - _$SuccessActionProcessed_MessageImpl value, + factory _$$SuccessActionProcessed_MessageImplCopyWith(_$SuccessActionProcessed_MessageImpl value, $Res Function(_$SuccessActionProcessed_MessageImpl) then) = __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; @useResult @@ -1126,12 +1070,10 @@ abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { /// @nodoc class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_MessageImpl> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_MessageImpl> implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { __$$SuccessActionProcessed_MessageImplCopyWithImpl( - _$SuccessActionProcessed_MessageImpl _value, - $Res Function(_$SuccessActionProcessed_MessageImpl) _then) + _$SuccessActionProcessed_MessageImpl _value, $Res Function(_$SuccessActionProcessed_MessageImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1150,8 +1092,7 @@ class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> /// @nodoc -class _$SuccessActionProcessed_MessageImpl - extends SuccessActionProcessed_Message { +class _$SuccessActionProcessed_MessageImpl extends SuccessActionProcessed_Message { const _$SuccessActionProcessed_MessageImpl({required this.data}) : super._(); @override @@ -1176,10 +1117,9 @@ class _$SuccessActionProcessed_MessageImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_MessageImplCopyWith< - _$SuccessActionProcessed_MessageImpl> - get copyWith => __$$SuccessActionProcessed_MessageImplCopyWithImpl< - _$SuccessActionProcessed_MessageImpl>(this, _$identity); + _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => + __$$SuccessActionProcessed_MessageImplCopyWithImpl<_$SuccessActionProcessed_MessageImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1251,23 +1191,20 @@ class _$SuccessActionProcessed_MessageImpl } abstract class SuccessActionProcessed_Message extends SuccessActionProcessed { - const factory SuccessActionProcessed_Message( - {required final MessageSuccessActionData data}) = + const factory SuccessActionProcessed_Message({required final MessageSuccessActionData data}) = _$SuccessActionProcessed_MessageImpl; const SuccessActionProcessed_Message._() : super._(); MessageSuccessActionData get data; @JsonKey(ignore: true) - _$$SuccessActionProcessed_MessageImplCopyWith< - _$SuccessActionProcessed_MessageImpl> - get copyWith => throw _privateConstructorUsedError; + _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { factory _$$SuccessActionProcessed_UrlImplCopyWith( - _$SuccessActionProcessed_UrlImpl value, - $Res Function(_$SuccessActionProcessed_UrlImpl) then) = + _$SuccessActionProcessed_UrlImpl value, $Res Function(_$SuccessActionProcessed_UrlImpl) then) = __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; @useResult $Res call({UrlSuccessActionData data}); @@ -1275,12 +1212,10 @@ abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { /// @nodoc class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_UrlImpl> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_UrlImpl> implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { __$$SuccessActionProcessed_UrlImplCopyWithImpl( - _$SuccessActionProcessed_UrlImpl _value, - $Res Function(_$SuccessActionProcessed_UrlImpl) _then) + _$SuccessActionProcessed_UrlImpl _value, $Res Function(_$SuccessActionProcessed_UrlImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1324,9 +1259,8 @@ class _$SuccessActionProcessed_UrlImpl extends SuccessActionProcessed_Url { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> - get copyWith => __$$SuccessActionProcessed_UrlImplCopyWithImpl< - _$SuccessActionProcessed_UrlImpl>(this, _$identity); + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => + __$$SuccessActionProcessed_UrlImplCopyWithImpl<_$SuccessActionProcessed_UrlImpl>(this, _$identity); @override @optionalTypeArgs @@ -1398,13 +1332,12 @@ class _$SuccessActionProcessed_UrlImpl extends SuccessActionProcessed_Url { } abstract class SuccessActionProcessed_Url extends SuccessActionProcessed { - const factory SuccessActionProcessed_Url( - {required final UrlSuccessActionData data}) = + const factory SuccessActionProcessed_Url({required final UrlSuccessActionData data}) = _$SuccessActionProcessed_UrlImpl; const SuccessActionProcessed_Url._() : super._(); UrlSuccessActionData get data; @JsonKey(ignore: true) - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> - get copyWith => throw _privateConstructorUsedError; + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index 9a86d66b6..09379d413 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -24,7 +24,7 @@ class LspInformation { final String host; /// The base fee charged regardless of the number of milli-satoshis sent - final int baseFeeMsat; + final PlatformInt64 baseFeeMsat; /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. final double feeRate; @@ -33,7 +33,7 @@ class LspInformation { final int timeLockDelta; /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minHtlcMsat; + final PlatformInt64 minHtlcMsat; final Uint8List lspPubkey; final OpeningFeeParamsMenu openingFeeParamsList; diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index 9fcefda0f..da93a18b3 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.33. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -15,7 +15,7 @@ class BackupStatus { final bool backedUp; /// Epoch time, in seconds - final int? lastBackupTime; + final BigInt? lastBackupTime; const BackupStatus({ required this.backedUp, @@ -149,7 +149,7 @@ class Config { final double maxfeePercent; /// Maps to the CLN `exemptfee` config when paying invoices (`lightning-pay`) - final int exemptfeeMsat; + final BigInt exemptfeeMsat; final NodeConfig nodeConfig; const Config({ @@ -308,10 +308,10 @@ class ListPaymentsRequest { final List? metadataFilters; /// Epoch time, in seconds - final int? fromTimestamp; + final PlatformInt64? fromTimestamp; /// Epoch time, in seconds - final int? toTimestamp; + final PlatformInt64? toTimestamp; final bool? includeFailures; final int? offset; final int? limit; @@ -471,7 +471,7 @@ class LnUrlPayRequest { final LnUrlPayRequestData data; /// The amount in millisatoshis for this payment - final int amountMsat; + final BigInt amountMsat; /// An optional comment for this payment final String? comment; @@ -508,7 +508,7 @@ class LnUrlWithdrawRequest { /// The amount to withdraw from the lnurl withdraw endpoint. Must be between /// `min_withdrawable` and `max_withdrawable`. - final int amountMsat; + final BigInt amountMsat; /// Optional description that will be put in the payment request for the /// lnurl withdraw endpoint. @@ -582,7 +582,7 @@ class LogEntry { class MaxReverseSwapAmountResponse { /// The total sats that can be sent onchain. - final int totalSat; + final BigInt totalSat; const MaxReverseSwapAmountResponse({ required this.totalSat, @@ -659,16 +659,16 @@ sealed class NodeCredentials with _$NodeCredentials { class NodeState { final String id; final int blockHeight; - final int channelsBalanceMsat; - final int onchainBalanceMsat; - final int pendingOnchainBalanceMsat; + final BigInt channelsBalanceMsat; + final BigInt onchainBalanceMsat; + final BigInt pendingOnchainBalanceMsat; final List utxos; - final int maxPayableMsat; - final int maxReceivableMsat; - final int maxSinglePaymentAmountMsat; - final int maxChanReserveMsats; + final BigInt maxPayableMsat; + final BigInt maxReceivableMsat; + final BigInt maxSinglePaymentAmountMsat; + final BigInt maxChanReserveMsats; final List connectedPeers; - final int inboundLiquidityMsats; + final BigInt inboundLiquidityMsats; const NodeState({ required this.id, @@ -723,12 +723,12 @@ class OnchainPaymentLimitsResponse { /// Minimum amount that can be sent. This value is influenced by /// - what can be sent given the available channels and balance /// - the lower limit of what the reverse swap service accepts as a send amount - final int minSat; + final BigInt minSat; /// Maximum amount that can be sent. This value is influenced by /// - what can be sent given the available channels and balance /// - the upper limit of what the reverse swap service accepts as a send amount - final int maxSat; + final BigInt maxSat; const OnchainPaymentLimitsResponse({ required this.minSat, @@ -748,7 +748,7 @@ class OnchainPaymentLimitsResponse { } class OpenChannelFeeRequest { - final int? amountMsat; + final BigInt? amountMsat; final int? expiry; const OpenChannelFeeRequest({ @@ -771,7 +771,7 @@ class OpenChannelFeeRequest { class OpenChannelFeeResponse { /// Opening fee for receiving the amount set in the [OpenChannelFeeRequest], in case it was set. /// It may be zero if no new channel needs to be opened. - final int? feeMsat; + final BigInt? feeMsat; /// The fee params for receiving more than the current inbound liquidity. final OpeningFeeParams feeParams; @@ -799,7 +799,7 @@ class OpenChannelFeeResponse { /// otherwise the LSP may reject the call. class OpeningFeeParams { /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minMsat; + final BigInt minMsat; /// The fee in ppm charged over liquidity when buying a channel final int proportional; @@ -905,9 +905,9 @@ class Payment { final PaymentType paymentType; /// Epoch time, in seconds - final int paymentTime; - final int amountMsat; - final int feeMsat; + final PlatformInt64 paymentTime; + final BigInt amountMsat; + final BigInt feeMsat; final PaymentStatus status; final String? error; final String? description; @@ -996,7 +996,7 @@ enum PaymentTypeFilter { /// See [ReverseSwapFeesRequest] class PrepareOnchainPaymentRequest { /// Depending on `amount_type`, this may be the desired send amount or the desired receive amount. - final int amountSat; + final BigInt amountSat; final SwapAmountType amountType; /// Feerate (sat / vByte) for the claim transaction @@ -1026,11 +1026,11 @@ class PrepareOnchainPaymentRequest { class PrepareOnchainPaymentResponse { final String feesHash; final double feesPercentage; - final int feesLockup; - final int feesClaim; - final int senderAmountSat; - final int recipientAmountSat; - final int totalFees; + final BigInt feesLockup; + final BigInt feesClaim; + final BigInt senderAmountSat; + final BigInt recipientAmountSat; + final BigInt totalFees; const PrepareOnchainPaymentResponse({ required this.feesHash, @@ -1093,8 +1093,8 @@ class PrepareRedeemOnchainFundsRequest { /// We need to prepare a redeem_onchain_funds transaction to know what a fee it will be charged in satoshis /// this model holds the response data, which consists of the weight and the absolute fee in sats class PrepareRedeemOnchainFundsResponse { - final int txWeight; - final int txFeeSat; + final BigInt txWeight; + final BigInt txFeeSat; const PrepareRedeemOnchainFundsResponse({ required this.txWeight, @@ -1139,7 +1139,7 @@ class PrepareRefundRequest { class PrepareRefundResponse { final int refundTxWeight; - final int refundTxFeeSat; + final BigInt refundTxFeeSat; const PrepareRefundResponse({ required this.refundTxWeight, @@ -1179,7 +1179,7 @@ class ReceiveOnchainRequest { /// Represents a receive payment request. class ReceivePaymentRequest { /// The amount in satoshis for this payment request - final int amountMsat; + final BigInt amountMsat; /// The description for this payment request. final String description; @@ -1248,7 +1248,7 @@ class ReceivePaymentResponse { final OpeningFeeParams? openingFeeParams; /// If set, this is the channel opening fee that will be deduced from the invoice amount. - final int? openingFeeMsat; + final BigInt? openingFeeMsat; const ReceivePaymentResponse({ required this.lnInvoice, @@ -1381,7 +1381,7 @@ class ReportPaymentFailureDetails { class ReverseSwapFeesRequest { /// Amount to be sent - final int? sendAmountSat; + final BigInt? sendAmountSat; /// Feerate (sat / vByte) for the claim transaction final int? claimTxFeerate; @@ -1413,7 +1413,7 @@ class ReverseSwapInfo { /// The claim tx id, available from the moment the claim tx is broadcast by the SDK final String? claimTxid; - final int onchainAmountSat; + final BigInt onchainAmountSat; final ReverseSwapStatus status; const ReverseSwapInfo({ @@ -1450,10 +1450,10 @@ class ReverseSwapInfo { /// Details about the reverse swap fees and parameters, at this point in time class ReverseSwapPairInfo { /// Minimum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int min; + final BigInt min; /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int max; + final BigInt max; /// Hash of the pair info JSON final String feesHash; @@ -1462,10 +1462,10 @@ class ReverseSwapPairInfo { final double feesPercentage; /// Miner fees in sats for locking up funds - final int feesLockup; + final BigInt feesLockup; /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. - final int feesClaim; + final BigInt feesClaim; /// Total fees for the reverse swap, in sats, based on the given send amount. /// @@ -1473,7 +1473,7 @@ class ReverseSwapPairInfo { /// /// If the [ReverseSwapFeesRequest] has the `claim_tx_feerate` empty, this is an estimate. If /// the `claim_tx_feerate` is set, this is the exact value of the total reverse swap fees. - final int? totalFees; + final BigInt? totalFees; const ReverseSwapPairInfo({ required this.min, @@ -1535,7 +1535,7 @@ enum ReverseSwapStatus { } class SendOnchainRequest { - final int amountSat; + final BigInt amountSat; final String onchainRecipientAddress; final String pairHash; final int satPerVbyte; @@ -1586,7 +1586,7 @@ class SendPaymentRequest { final String bolt11; /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. - final int? amountMsat; + final BigInt? amountMsat; /// The external label or identifier of the [Payment] final String? label; @@ -1633,7 +1633,7 @@ class SendSpontaneousPaymentRequest { final String nodeId; /// The amount in millisatoshis for this payment - final int amountMsat; + final BigInt amountMsat; final List? extraTlvs; /// The external label or identifier of the [Payment] @@ -1727,10 +1727,10 @@ class SwapInfo { final String bitcoinAddress; /// Relative time lock start, received from [SwapperAPI::create_swap]. - final int createdAt; + final PlatformInt64 createdAt; /// Relative time lock for the timeout for the script to be redeemed before swap fails. - final int lockHeight; + final PlatformInt64 lockHeight; /// sha256 hash of preimage to used in the claim sript. final Uint8List paymentHash; @@ -1754,16 +1754,16 @@ class SwapInfo { final String? bolt11; /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. - final int paidMsat; + final BigInt paidMsat; /// Total amount of transactions sent to the swap address. - final int totalIncomingTxs; + final BigInt totalIncomingTxs; /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. - final int confirmedSats; + final BigInt confirmedSats; /// Unconfirmed sats waiting to be confirmed onchain. - final int unconfirmedSats; + final BigInt unconfirmedSats; /// Shows the current status of the swap, either `Initial` or `Expired`. final SwapStatus status; @@ -1778,13 +1778,13 @@ class SwapInfo { final List confirmedTxIds; /// The minimum amount of sats one can send in order for the swap to succeed. Received from [SwapperAPI::create_swap]. - final int minAllowedDeposit; + final PlatformInt64 minAllowedDeposit; /// The maximum amount of sats one can send in order for the swap to succeed. This is determined based on `max_swapper_payable` and the node's local balance. - final int maxAllowedDeposit; + final PlatformInt64 maxAllowedDeposit; /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. - final int maxSwapperPayable; + final PlatformInt64 maxSwapperPayable; /// Error reason for when swap fails. final String? lastRedeemError; @@ -1905,7 +1905,7 @@ enum SwapStatus { /// Represents a TLV entry for a keysend payment. class TlvEntry { /// The type field for the TLV - final int fieldNumber; + final BigInt fieldNumber; /// The value bytes for the TLV final Uint8List value; @@ -1931,7 +1931,7 @@ class TlvEntry { class UnspentTransactionOutput { final Uint8List txid; final int outnum; - final int amountMillisatoshi; + final BigInt amountMillisatoshi; final String address; final bool reserved; diff --git a/libs/sdk-flutter/lib/generated/models.freezed.dart b/libs/sdk-flutter/lib/generated/models.freezed.dart index dc84a8a1b..f056ff34b 100644 --- a/libs/sdk-flutter/lib/generated/models.freezed.dart +++ b/libs/sdk-flutter/lib/generated/models.freezed.dart @@ -38,8 +38,7 @@ mixin _$LnUrlCallbackStatus { @optionalTypeArgs TResult map({ required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -59,8 +58,7 @@ mixin _$LnUrlCallbackStatus { /// @nodoc abstract class $LnUrlCallbackStatusCopyWith<$Res> { - factory $LnUrlCallbackStatusCopyWith( - LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = + factory $LnUrlCallbackStatusCopyWith(LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; } @@ -78,19 +76,16 @@ class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> /// @nodoc abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { factory _$$LnUrlCallbackStatus_OkImplCopyWith( - _$LnUrlCallbackStatus_OkImpl value, - $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = + _$LnUrlCallbackStatus_OkImpl value, $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; } /// @nodoc class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, - _$LnUrlCallbackStatus_OkImpl> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_OkImpl> implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { __$$LnUrlCallbackStatus_OkImplCopyWithImpl( - _$LnUrlCallbackStatus_OkImpl _value, - $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) + _$LnUrlCallbackStatus_OkImpl _value, $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) : super(_value, _then); } @@ -107,8 +102,7 @@ class _$LnUrlCallbackStatus_OkImpl extends LnUrlCallbackStatus_Ok { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_OkImpl); + (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); } @override @@ -149,8 +143,7 @@ class _$LnUrlCallbackStatus_OkImpl extends LnUrlCallbackStatus_Ok { @optionalTypeArgs TResult map({ required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, }) { return ok(this); } @@ -185,8 +178,7 @@ abstract class LnUrlCallbackStatus_Ok extends LnUrlCallbackStatus { /// @nodoc abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith( - _$LnUrlCallbackStatus_ErrorStatusImpl value, + factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith(_$LnUrlCallbackStatus_ErrorStatusImpl value, $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; @useResult @@ -195,11 +187,9 @@ abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { /// @nodoc class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, - _$LnUrlCallbackStatus_ErrorStatusImpl> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_ErrorStatusImpl> implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl( - _$LnUrlCallbackStatus_ErrorStatusImpl _value, + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl(_$LnUrlCallbackStatus_ErrorStatusImpl _value, $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) : super(_value, _then); @@ -219,8 +209,7 @@ class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> /// @nodoc -class _$LnUrlCallbackStatus_ErrorStatusImpl - extends LnUrlCallbackStatus_ErrorStatus { +class _$LnUrlCallbackStatus_ErrorStatusImpl extends LnUrlCallbackStatus_ErrorStatus { const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}) : super._(); @override @@ -245,10 +234,9 @@ class _$LnUrlCallbackStatus_ErrorStatusImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< - _$LnUrlCallbackStatus_ErrorStatusImpl> - get copyWith => __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl< - _$LnUrlCallbackStatus_ErrorStatusImpl>(this, _$identity); + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<_$LnUrlCallbackStatus_ErrorStatusImpl>( + this, _$identity); @override @optionalTypeArgs @@ -285,8 +273,7 @@ class _$LnUrlCallbackStatus_ErrorStatusImpl @optionalTypeArgs TResult map({ required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, }) { return errorStatus(this); } @@ -315,16 +302,14 @@ class _$LnUrlCallbackStatus_ErrorStatusImpl } abstract class LnUrlCallbackStatus_ErrorStatus extends LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_ErrorStatus( - {required final LnUrlErrorData data}) = + const factory LnUrlCallbackStatus_ErrorStatus({required final LnUrlErrorData data}) = _$LnUrlCallbackStatus_ErrorStatusImpl; const LnUrlCallbackStatus_ErrorStatus._() : super._(); LnUrlErrorData get data; @JsonKey(ignore: true) - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< - _$LnUrlCallbackStatus_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -352,8 +337,7 @@ mixin _$LnUrlWithdrawResult { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -373,8 +357,7 @@ mixin _$LnUrlWithdrawResult { /// @nodoc abstract class $LnUrlWithdrawResultCopyWith<$Res> { - factory $LnUrlWithdrawResultCopyWith( - LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = + factory $LnUrlWithdrawResultCopyWith(LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; } @@ -392,8 +375,7 @@ class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> /// @nodoc abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { factory _$$LnUrlWithdrawResult_OkImplCopyWith( - _$LnUrlWithdrawResult_OkImpl value, - $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = + _$LnUrlWithdrawResult_OkImpl value, $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlWithdrawSuccessData data}); @@ -401,12 +383,10 @@ abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { /// @nodoc class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, - _$LnUrlWithdrawResult_OkImpl> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_OkImpl> implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { __$$LnUrlWithdrawResult_OkImplCopyWithImpl( - _$LnUrlWithdrawResult_OkImpl _value, - $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) + _$LnUrlWithdrawResult_OkImpl _value, $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -450,9 +430,8 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> - get copyWith => __$$LnUrlWithdrawResult_OkImplCopyWithImpl< - _$LnUrlWithdrawResult_OkImpl>(this, _$identity); + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => + __$$LnUrlWithdrawResult_OkImplCopyWithImpl<_$LnUrlWithdrawResult_OkImpl>(this, _$identity); @override @optionalTypeArgs @@ -489,8 +468,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return ok(this); } @@ -519,22 +497,20 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { } abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Ok( - {required final LnUrlWithdrawSuccessData data}) = + const factory LnUrlWithdrawResult_Ok({required final LnUrlWithdrawSuccessData data}) = _$LnUrlWithdrawResult_OkImpl; const LnUrlWithdrawResult_Ok._() : super._(); @override LnUrlWithdrawSuccessData get data; @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith( - _$LnUrlWithdrawResult_ErrorStatusImpl value, + factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; @useResult @@ -543,11 +519,9 @@ abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { /// @nodoc class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, - _$LnUrlWithdrawResult_ErrorStatusImpl> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_ErrorStatusImpl> implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl( - _$LnUrlWithdrawResult_ErrorStatusImpl _value, + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl(_$LnUrlWithdrawResult_ErrorStatusImpl _value, $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) : super(_value, _then); @@ -567,8 +541,7 @@ class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> /// @nodoc -class _$LnUrlWithdrawResult_ErrorStatusImpl - extends LnUrlWithdrawResult_ErrorStatus { +class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorStatus { const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}) : super._(); @override @@ -593,10 +566,9 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< - _$LnUrlWithdrawResult_ErrorStatusImpl> - get copyWith => __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl< - _$LnUrlWithdrawResult_ErrorStatusImpl>(this, _$identity); + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<_$LnUrlWithdrawResult_ErrorStatusImpl>( + this, _$identity); @override @optionalTypeArgs @@ -633,8 +605,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return errorStatus(this); } @@ -663,17 +634,15 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl } abstract class LnUrlWithdrawResult_ErrorStatus extends LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_ErrorStatus( - {required final LnUrlErrorData data}) = + const factory LnUrlWithdrawResult_ErrorStatus({required final LnUrlErrorData data}) = _$LnUrlWithdrawResult_ErrorStatusImpl; const LnUrlWithdrawResult_ErrorStatus._() : super._(); @override LnUrlErrorData get data; @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< - _$LnUrlWithdrawResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -713,22 +682,19 @@ mixin _$NodeConfig { throw _privateConstructorUsedError; @JsonKey(ignore: true) - $NodeConfigCopyWith get copyWith => - throw _privateConstructorUsedError; + $NodeConfigCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $NodeConfigCopyWith<$Res> { - factory $NodeConfigCopyWith( - NodeConfig value, $Res Function(NodeConfig) then) = + factory $NodeConfigCopyWith(NodeConfig value, $Res Function(NodeConfig) then) = _$NodeConfigCopyWithImpl<$Res, NodeConfig>; @useResult $Res call({GreenlightNodeConfig config}); } /// @nodoc -class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> - implements $NodeConfigCopyWith<$Res> { +class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> implements $NodeConfigCopyWith<$Res> { _$NodeConfigCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -751,11 +717,9 @@ class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> } /// @nodoc -abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> - implements $NodeConfigCopyWith<$Res> { +abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> implements $NodeConfigCopyWith<$Res> { factory _$$NodeConfig_GreenlightImplCopyWith( - _$NodeConfig_GreenlightImpl value, - $Res Function(_$NodeConfig_GreenlightImpl) then) = + _$NodeConfig_GreenlightImpl value, $Res Function(_$NodeConfig_GreenlightImpl) then) = __$$NodeConfig_GreenlightImplCopyWithImpl<$Res>; @override @useResult @@ -766,8 +730,8 @@ abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> class __$$NodeConfig_GreenlightImplCopyWithImpl<$Res> extends _$NodeConfigCopyWithImpl<$Res, _$NodeConfig_GreenlightImpl> implements _$$NodeConfig_GreenlightImplCopyWith<$Res> { - __$$NodeConfig_GreenlightImplCopyWithImpl(_$NodeConfig_GreenlightImpl _value, - $Res Function(_$NodeConfig_GreenlightImpl) _then) + __$$NodeConfig_GreenlightImplCopyWithImpl( + _$NodeConfig_GreenlightImpl _value, $Res Function(_$NodeConfig_GreenlightImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -811,9 +775,8 @@ class _$NodeConfig_GreenlightImpl extends NodeConfig_Greenlight { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> - get copyWith => __$$NodeConfig_GreenlightImplCopyWithImpl< - _$NodeConfig_GreenlightImpl>(this, _$identity); + _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => + __$$NodeConfig_GreenlightImplCopyWithImpl<_$NodeConfig_GreenlightImpl>(this, _$identity); @override @optionalTypeArgs @@ -873,8 +836,7 @@ class _$NodeConfig_GreenlightImpl extends NodeConfig_Greenlight { } abstract class NodeConfig_Greenlight extends NodeConfig { - const factory NodeConfig_Greenlight( - {required final GreenlightNodeConfig config}) = + const factory NodeConfig_Greenlight({required final GreenlightNodeConfig config}) = _$NodeConfig_GreenlightImpl; const NodeConfig_Greenlight._() : super._(); @@ -882,8 +844,8 @@ abstract class NodeConfig_Greenlight extends NodeConfig { GreenlightNodeConfig get config; @override @JsonKey(ignore: true) - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> - get copyWith => throw _privateConstructorUsedError; + _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -923,14 +885,12 @@ mixin _$NodeCredentials { throw _privateConstructorUsedError; @JsonKey(ignore: true) - $NodeCredentialsCopyWith get copyWith => - throw _privateConstructorUsedError; + $NodeCredentialsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $NodeCredentialsCopyWith<$Res> { - factory $NodeCredentialsCopyWith( - NodeCredentials value, $Res Function(NodeCredentials) then) = + factory $NodeCredentialsCopyWith(NodeCredentials value, $Res Function(NodeCredentials) then) = _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; @useResult $Res call({GreenlightCredentials credentials}); @@ -961,11 +921,9 @@ class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> } /// @nodoc -abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> - implements $NodeCredentialsCopyWith<$Res> { +abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> implements $NodeCredentialsCopyWith<$Res> { factory _$$NodeCredentials_GreenlightImplCopyWith( - _$NodeCredentials_GreenlightImpl value, - $Res Function(_$NodeCredentials_GreenlightImpl) then) = + _$NodeCredentials_GreenlightImpl value, $Res Function(_$NodeCredentials_GreenlightImpl) then) = __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; @override @useResult @@ -974,12 +932,10 @@ abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> /// @nodoc class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> - extends _$NodeCredentialsCopyWithImpl<$Res, - _$NodeCredentials_GreenlightImpl> + extends _$NodeCredentialsCopyWithImpl<$Res, _$NodeCredentials_GreenlightImpl> implements _$$NodeCredentials_GreenlightImplCopyWith<$Res> { __$$NodeCredentials_GreenlightImplCopyWithImpl( - _$NodeCredentials_GreenlightImpl _value, - $Res Function(_$NodeCredentials_GreenlightImpl) _then) + _$NodeCredentials_GreenlightImpl _value, $Res Function(_$NodeCredentials_GreenlightImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -999,8 +955,7 @@ class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> /// @nodoc class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { - const _$NodeCredentials_GreenlightImpl({required this.credentials}) - : super._(); + const _$NodeCredentials_GreenlightImpl({required this.credentials}) : super._(); @override final GreenlightCredentials credentials; @@ -1015,8 +970,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NodeCredentials_GreenlightImpl && - (identical(other.credentials, credentials) || - other.credentials == credentials)); + (identical(other.credentials, credentials) || other.credentials == credentials)); } @override @@ -1025,9 +979,8 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> - get copyWith => __$$NodeCredentials_GreenlightImplCopyWithImpl< - _$NodeCredentials_GreenlightImpl>(this, _$identity); + _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => + __$$NodeCredentials_GreenlightImplCopyWithImpl<_$NodeCredentials_GreenlightImpl>(this, _$identity); @override @optionalTypeArgs @@ -1087,8 +1040,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { } abstract class NodeCredentials_Greenlight extends NodeCredentials { - const factory NodeCredentials_Greenlight( - {required final GreenlightCredentials credentials}) = + const factory NodeCredentials_Greenlight({required final GreenlightCredentials credentials}) = _$NodeCredentials_GreenlightImpl; const NodeCredentials_Greenlight._() : super._(); @@ -1096,8 +1048,8 @@ abstract class NodeCredentials_Greenlight extends NodeCredentials { GreenlightCredentials get credentials; @override @JsonKey(ignore: true) - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> - get copyWith => throw _privateConstructorUsedError; + _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -1145,8 +1097,7 @@ mixin _$PaymentDetails { /// @nodoc abstract class $PaymentDetailsCopyWith<$Res> { - factory $PaymentDetailsCopyWith( - PaymentDetails value, $Res Function(PaymentDetails) then) = + factory $PaymentDetailsCopyWith(PaymentDetails value, $Res Function(PaymentDetails) then) = _$PaymentDetailsCopyWithImpl<$Res, PaymentDetails>; } @@ -1163,8 +1114,8 @@ class _$PaymentDetailsCopyWithImpl<$Res, $Val extends PaymentDetails> /// @nodoc abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { - factory _$$PaymentDetails_LnImplCopyWith(_$PaymentDetails_LnImpl value, - $Res Function(_$PaymentDetails_LnImpl) then) = + factory _$$PaymentDetails_LnImplCopyWith( + _$PaymentDetails_LnImpl value, $Res Function(_$PaymentDetails_LnImpl) then) = __$$PaymentDetails_LnImplCopyWithImpl<$Res>; @useResult $Res call({LnPaymentDetails data}); @@ -1174,8 +1125,8 @@ abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { class __$$PaymentDetails_LnImplCopyWithImpl<$Res> extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_LnImpl> implements _$$PaymentDetails_LnImplCopyWith<$Res> { - __$$PaymentDetails_LnImplCopyWithImpl(_$PaymentDetails_LnImpl _value, - $Res Function(_$PaymentDetails_LnImpl) _then) + __$$PaymentDetails_LnImplCopyWithImpl( + _$PaymentDetails_LnImpl _value, $Res Function(_$PaymentDetails_LnImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1220,8 +1171,7 @@ class _$PaymentDetails_LnImpl extends PaymentDetails_Ln { @override @pragma('vm:prefer-inline') _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>( - this, _$identity); + __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>(this, _$identity); @override @optionalTypeArgs @@ -1287,8 +1237,7 @@ class _$PaymentDetails_LnImpl extends PaymentDetails_Ln { } abstract class PaymentDetails_Ln extends PaymentDetails { - const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = - _$PaymentDetails_LnImpl; + const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = _$PaymentDetails_LnImpl; const PaymentDetails_Ln._() : super._(); @override @@ -1301,8 +1250,7 @@ abstract class PaymentDetails_Ln extends PaymentDetails { /// @nodoc abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { factory _$$PaymentDetails_ClosedChannelImplCopyWith( - _$PaymentDetails_ClosedChannelImpl value, - $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = + _$PaymentDetails_ClosedChannelImpl value, $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res>; @useResult $Res call({ClosedChannelPaymentDetails data}); @@ -1310,12 +1258,10 @@ abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { /// @nodoc class __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, - _$PaymentDetails_ClosedChannelImpl> + extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_ClosedChannelImpl> implements _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { __$$PaymentDetails_ClosedChannelImplCopyWithImpl( - _$PaymentDetails_ClosedChannelImpl _value, - $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) + _$PaymentDetails_ClosedChannelImpl _value, $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1359,10 +1305,8 @@ class _$PaymentDetails_ClosedChannelImpl extends PaymentDetails_ClosedChannel { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PaymentDetails_ClosedChannelImplCopyWith< - _$PaymentDetails_ClosedChannelImpl> - get copyWith => __$$PaymentDetails_ClosedChannelImplCopyWithImpl< - _$PaymentDetails_ClosedChannelImpl>(this, _$identity); + _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => + __$$PaymentDetails_ClosedChannelImplCopyWithImpl<_$PaymentDetails_ClosedChannelImpl>(this, _$identity); @override @optionalTypeArgs @@ -1428,17 +1372,15 @@ class _$PaymentDetails_ClosedChannelImpl extends PaymentDetails_ClosedChannel { } abstract class PaymentDetails_ClosedChannel extends PaymentDetails { - const factory PaymentDetails_ClosedChannel( - {required final ClosedChannelPaymentDetails data}) = + const factory PaymentDetails_ClosedChannel({required final ClosedChannelPaymentDetails data}) = _$PaymentDetails_ClosedChannelImpl; const PaymentDetails_ClosedChannel._() : super._(); @override ClosedChannelPaymentDetails get data; @JsonKey(ignore: true) - _$$PaymentDetails_ClosedChannelImplCopyWith< - _$PaymentDetails_ClosedChannelImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc @@ -1462,8 +1404,7 @@ mixin _$ReportIssueRequest { throw _privateConstructorUsedError; @optionalTypeArgs TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) - paymentFailure, + required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, }) => throw _privateConstructorUsedError; @optionalTypeArgs @@ -1479,14 +1420,12 @@ mixin _$ReportIssueRequest { throw _privateConstructorUsedError; @JsonKey(ignore: true) - $ReportIssueRequestCopyWith get copyWith => - throw _privateConstructorUsedError; + $ReportIssueRequestCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ReportIssueRequestCopyWith<$Res> { - factory $ReportIssueRequestCopyWith( - ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = + factory $ReportIssueRequestCopyWith(ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = _$ReportIssueRequestCopyWithImpl<$Res, ReportIssueRequest>; @useResult $Res call({ReportPaymentFailureDetails data}); @@ -1519,8 +1458,7 @@ class _$ReportIssueRequestCopyWithImpl<$Res, $Val extends ReportIssueRequest> /// @nodoc abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> implements $ReportIssueRequestCopyWith<$Res> { - factory _$$ReportIssueRequest_PaymentFailureImplCopyWith( - _$ReportIssueRequest_PaymentFailureImpl value, + factory _$$ReportIssueRequest_PaymentFailureImplCopyWith(_$ReportIssueRequest_PaymentFailureImpl value, $Res Function(_$ReportIssueRequest_PaymentFailureImpl) then) = __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res>; @override @@ -1530,11 +1468,9 @@ abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> /// @nodoc class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> - extends _$ReportIssueRequestCopyWithImpl<$Res, - _$ReportIssueRequest_PaymentFailureImpl> + extends _$ReportIssueRequestCopyWithImpl<$Res, _$ReportIssueRequest_PaymentFailureImpl> implements _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> { - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl( - _$ReportIssueRequest_PaymentFailureImpl _value, + __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl(_$ReportIssueRequest_PaymentFailureImpl _value, $Res Function(_$ReportIssueRequest_PaymentFailureImpl) _then) : super(_value, _then); @@ -1554,10 +1490,8 @@ class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> /// @nodoc -class _$ReportIssueRequest_PaymentFailureImpl - extends ReportIssueRequest_PaymentFailure { - const _$ReportIssueRequest_PaymentFailureImpl({required this.data}) - : super._(); +class _$ReportIssueRequest_PaymentFailureImpl extends ReportIssueRequest_PaymentFailure { + const _$ReportIssueRequest_PaymentFailureImpl({required this.data}) : super._(); @override final ReportPaymentFailureDetails data; @@ -1581,10 +1515,9 @@ class _$ReportIssueRequest_PaymentFailureImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$ReportIssueRequest_PaymentFailureImplCopyWith< - _$ReportIssueRequest_PaymentFailureImpl> - get copyWith => __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl< - _$ReportIssueRequest_PaymentFailureImpl>(this, _$identity); + _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => + __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<_$ReportIssueRequest_PaymentFailureImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1617,8 +1550,7 @@ class _$ReportIssueRequest_PaymentFailureImpl @override @optionalTypeArgs TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) - paymentFailure, + required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, }) { return paymentFailure(this); } @@ -1645,8 +1577,7 @@ class _$ReportIssueRequest_PaymentFailureImpl } abstract class ReportIssueRequest_PaymentFailure extends ReportIssueRequest { - const factory ReportIssueRequest_PaymentFailure( - {required final ReportPaymentFailureDetails data}) = + const factory ReportIssueRequest_PaymentFailure({required final ReportPaymentFailureDetails data}) = _$ReportIssueRequest_PaymentFailureImpl; const ReportIssueRequest_PaymentFailure._() : super._(); @@ -1654,7 +1585,6 @@ abstract class ReportIssueRequest_PaymentFailure extends ReportIssueRequest { ReportPaymentFailureDetails get data; @override @JsonKey(ignore: true) - _$$ReportIssueRequest_PaymentFailureImplCopyWith< - _$ReportIssueRequest_PaymentFailureImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => + throw _privateConstructorUsedError; } diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 09a5c6a9c..0aa621c93 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.33 + cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.36 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate From ad964a18c1f0d47f343c12ea4bdc8d87800dc3c2 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Tue, 28 May 2024 12:19:42 +0300 Subject: [PATCH 11/23] Regenerate bindings Remove old files --- libs/sdk-flutter/lib/generated/frb_generated.io.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index be68d2c73..a56185b22 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -5947,9 +5947,12 @@ class BreezSdkBindingsWire implements BaseWire { _dummy_method_to_enforce_bundlingPtr.asFunction(); } -typedef DartPostCObjectFnType - = ffi.Pointer message)>>; +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_list_prim_u_8_strict extends ffi.Struct { external ffi.Pointer ptr; From e0f207af79aa5d4b50ce0d06dfce4fb0d1d5bea3 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Tue, 28 May 2024 12:35:10 +0300 Subject: [PATCH 12/23] Apply BigInt changes --- libs/sdk-flutter/lib/breez_sdk.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 01ebd3e13..3cf35cc26 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -605,7 +605,7 @@ extension SDKConfig on Config { String? defaultLspId, String? apiKey, double? maxfeePercent, - int? exemptfeeMsat, + BigInt? exemptfeeMsat, NodeConfig? nodeConfig, }) { return Config( From 545dc7d010e23dba07213b9d6899e16fd9189863 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 10 Jun 2024 14:52:20 +0300 Subject: [PATCH 13/23] Bump flutter_rust_bridge to 2.0.0-dev.38 --- libs/Cargo.lock | 136 ++- libs/sdk-core/src/binding.rs | 10 +- libs/sdk-core/src/frb_generated.io.rs | 60 +- libs/sdk-core/src/frb_generated.rs | 139 ++- libs/sdk-flutter/README.md | 2 +- libs/sdk-flutter/flutter_rust_bridge.yaml | 3 +- libs/sdk-flutter/ios/Classes/frb_generated.h | 509 ++++---- libs/sdk-flutter/lib/generated/binding.dart | 245 ++-- .../lib/generated/breez_services.dart | 2 +- libs/sdk-flutter/lib/generated/chain.dart | 2 +- libs/sdk-flutter/lib/generated/fiat.dart | 2 +- .../lib/generated/frb_generated.dart | 430 +++---- .../lib/generated/frb_generated.io.dart | 1020 +++++++++-------- .../lib/generated/input_parser.dart | 2 +- libs/sdk-flutter/lib/generated/invoice.dart | 2 +- .../lib/generated/lnurl/pay/model.dart | 2 +- libs/sdk-flutter/lib/generated/lsp.dart | 2 +- libs/sdk-flutter/lib/generated/models.dart | 2 +- libs/sdk-flutter/makefile | 2 +- tools/sdk-cli/Cargo.lock | 182 ++- 20 files changed, 1624 insertions(+), 1130 deletions(-) diff --git a/libs/Cargo.lock b/libs/Cargo.lock index aac2f2e60..0d17f0481 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -116,14 +116,13 @@ dependencies = [ [[package]] name = "allo-isolate" -version = "0.1.20" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b7997817c178b853573e8bdfb6c3afe02810b43f17d766d6703560074b0c3" +checksum = "1f67642eb6773fb42a95dd3b348c305ee18dee6642274c6b412d67e985e3befc" dependencies = [ "anyhow", "atomic", "backtrace", - "chrono", ] [[package]] @@ -138,6 +137,24 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +[[package]] +name = "android_log-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" + +[[package]] +name = "android_logger" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" +dependencies = [ + "android_log-sys", + "env_logger 0.10.1", + "log", + "once_cell", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -1044,20 +1061,41 @@ dependencies = [ ] [[package]] -name = "dart-sys" -version = "4.0.2" +name = "dart-sys-fork" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8b5680b5c2cc52f50acb2457d9b3a3b58adcca785db13a0e3655626f601de6" +checksum = "933dafff26172b719bb9695dd3715a1e7792f62dcdc8a5d4c740db7e0fedee8b" dependencies = [ "cc", ] +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", +] + [[package]] name = "data-encoding" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +[[package]] +name = "delegate-attr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "der" version = "0.7.9" @@ -1256,35 +1294,45 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.6" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" +checksum = "2f052ec223b70cbdf2248376a9ad5af9281b3fdf8ea3c7d3f66fff52a9aaf1fa" dependencies = [ "allo-isolate", + "android_logger", "anyhow", - "backtrace", "build-target", "bytemuck", - "cc", - "chrono", + "byteorder", "console_error_panic_hook", - "dart-sys", + "dart-sys-fork", + "delegate-attr", "flutter_rust_bridge_macros", + "futures", "js-sys", "lazy_static", - "libc", "log", - "parking_lot", + "oslog", + "portable-atomic", "threadpool", + "tokio", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "flutter_rust_bridge_macros" -version = "1.82.4" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2fe4c18349a2b17b980a1214e19a4cb7888a86f70ce5a9a0fccb5611f77bdb" +checksum = "23414fe526f51870c6d89d27bbffbee52ebe0900164a4147b32caf1d3e131682" +dependencies = [ + "hex", + "md-5", + "proc-macro2", + "quote", + "syn 2.0.48", +] [[package]] name = "fnv" @@ -1886,9 +1934,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2032,6 +2080,16 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.6.4" @@ -2340,6 +2398,17 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "oslog" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" +dependencies = [ + "cc", + "dashmap", + "log", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2605,6 +2674,12 @@ dependencies = [ "universal-hash 0.5.1", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -4325,19 +4400,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -4350,9 +4426,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4362,9 +4438,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4372,9 +4448,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -4385,9 +4461,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 959f0f817..98c2261dd 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -306,7 +306,7 @@ pub fn connect(req: ConnectRequest) -> Result<()> { match *locked { None => { let breez_services = - BreezServices::connect(req, Box::new(BindingEventListener {})).await?; + BreezServices::connect(req, Box::new(BindingEventListener::new())).await?; *locked = Some(breez_services); Ok(()) @@ -791,7 +791,13 @@ pub fn generate_diagnostic_data() -> Result { /* Binding Related Logic */ -struct BindingEventListener; +pub struct BindingEventListener {} + +impl BindingEventListener { + fn new() -> Self { + Self {} + } +} impl EventListener for BindingEventListener { fn on_event(&self, e: BreezEvent) { diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 873db2bd9..e83f3a799 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -1,11 +1,12 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // Section: imports use super::*; +use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate @@ -104,6 +105,12 @@ impl CstDecode for wire_cst_backup_status { } } } +impl CstDecode for wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + crate::binding::BindingEventListener {} + } +} impl CstDecode for wire_cst_bitcoin_address_data { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { @@ -142,6 +149,13 @@ impl CstDecode for *mut wire_cst_backup CstDecode::::cst_decode(*wrap).into() } } +impl CstDecode for *mut wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut wire_cst_bitcoin_address_data { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { @@ -155,6 +169,13 @@ impl CstDecode for *mut bool { unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } } } +impl CstDecode for *mut wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut wire_cst_buy_bitcoin_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::models::BuyBitcoinRequest { @@ -1891,6 +1912,16 @@ impl Default for wire_cst_backup_status { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_binding_event_listener { + fn new_with_null_ptr() -> Self { + Self {} + } +} +impl Default for wire_cst_binding_event_listener { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_bitcoin_address_data { fn new_with_null_ptr() -> Self { Self { @@ -3203,6 +3234,15 @@ pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup_status(port_: i6 wire__crate__binding__backup_status_impl(port_) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event( + port_: i64, + that: *mut wire_cst_binding_event_listener, + e: *mut wire_cst_breez_event, +) { + wire__crate__binding__binding_event_listener_on_event_impl(port_, that, e) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_events_stream( port_: i64, @@ -3642,6 +3682,14 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data( ) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener( +) -> *mut wire_cst_binding_event_listener { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_binding_event_listener::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data( ) -> *mut wire_cst_bitcoin_address_data { @@ -3655,6 +3703,11 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bool(value: bool) -> *mut flutter_rust_bridge::for_generated::new_leak_box_ptr(value) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_breez_event() -> *mut wire_cst_breez_event { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_breez_event::new_with_null_ptr()) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request( ) -> *mut wire_cst_buy_bitcoin_request { @@ -4315,6 +4368,9 @@ pub struct wire_cst_backup_status { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_binding_event_listener {} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_bitcoin_address_data { address: *mut wire_cst_list_prim_u_8_strict, network: i32, diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index d3c83e39a..94679685f 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. #![allow( non_camel_case_types, @@ -21,8 +21,9 @@ // Section: imports +use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::transform_result_dco; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate @@ -32,8 +33,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-dev.36"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1499828454; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.38"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 847148110; // Section: executor @@ -63,6 +64,30 @@ fn wire__crate__binding__backup_status_impl( move || move |context| transform_result_dco((move || crate::binding::backup_status())()), ) } +fn wire__crate__binding__binding_event_listener_on_event_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode, + e: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "binding_event_listener_on_event", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_that = that.cst_decode(); + let api_e = e.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok({ + crate::binding::BindingEventListener::on_event(&api_that, api_e); + }) + })()) + } + }, + ) +} fn wire__crate__binding__breez_events_stream_impl( port_: flutter_rust_bridge::for_generated::MessagePort, s: impl CstDecode< @@ -1242,6 +1267,13 @@ impl SseDecode for crate::models::BackupStatus { } } +impl SseDecode for crate::binding::BindingEventListener { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + return crate::binding::BindingEventListener {}; + } +} + impl SseDecode for crate::input_parser::BitcoinAddressData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -3494,6 +3526,9 @@ impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActio crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { reason } => { [1.into_dart(), reason.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -3544,6 +3579,23 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::binding::BindingEventListener { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + Vec::::new().into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::binding::BindingEventListener +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::binding::BindingEventListener +{ + fn into_into_dart(self) -> crate::binding::BindingEventListener { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::input_parser::BitcoinAddressData { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -3592,6 +3644,9 @@ impl flutter_rust_bridge::IntoDart for crate::breez_services::BreezEvent { crate::breez_services::BreezEvent::SwapUpdated { details } => { [8.into_dart(), details.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -3611,6 +3666,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinProvider { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { match self { Self::Moonpay => 0.into_dart(), + _ => unreachable!(), } } } @@ -3675,6 +3731,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::ChannelState { Self::Opened => 1.into_dart(), Self::PendingClose => 2.into_dart(), Self::Closed => 3.into_dart(), + _ => unreachable!(), } } } @@ -3836,6 +3893,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::EnvironmentType { match self { Self::Production => 0.into_dart(), Self::Staging => 1.into_dart(), + _ => unreachable!(), } } } @@ -3915,6 +3973,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::HealthCheckStatus { Self::Operational => 0.into_dart(), Self::Maintenance => 1.into_dart(), Self::ServiceDisruption => 2.into_dart(), + _ => unreachable!(), } } } @@ -3957,6 +4016,9 @@ impl flutter_rust_bridge::IntoDart for crate::input_parser::InputType { crate::input_parser::InputType::LnUrlError { data } => { [7.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4113,6 +4175,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::LnUrlCallbackStatus { crate::models::LnUrlCallbackStatus::ErrorStatus { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4229,6 +4294,9 @@ impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPayResult crate::lnurl::pay::model::LnUrlPayResult::PayError { data } => { [2.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4320,6 +4388,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawResult { crate::models::LnUrlWithdrawResult::ErrorStatus { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4487,6 +4558,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::Network { Self::Testnet => 1.into_dart(), Self::Signet => 2.into_dart(), Self::Regtest => 3.into_dart(), + _ => unreachable!(), } } } @@ -4503,6 +4575,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::NodeConfig { crate::models::NodeConfig::Greenlight { config } => { [0.into_dart(), config.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4519,6 +4594,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::NodeCredentials { crate::models::NodeCredentials::Greenlight { credentials } => { [0.into_dart(), credentials.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4740,6 +4818,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::PaymentDetails { crate::models::PaymentDetails::ClosedChannel { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -4781,6 +4862,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::PaymentStatus { Self::Pending => 0.into_dart(), Self::Complete => 1.into_dart(), Self::Failed => 2.into_dart(), + _ => unreachable!(), } } } @@ -4799,6 +4881,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::PaymentType { Self::Sent => 0.into_dart(), Self::Received => 1.into_dart(), Self::ClosedChannel => 2.into_dart(), + _ => unreachable!(), } } } @@ -4815,6 +4898,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::PaymentTypeFilter { Self::Sent => 0.into_dart(), Self::Received => 1.into_dart(), Self::ClosedChannel => 2.into_dart(), + _ => unreachable!(), } } } @@ -5142,6 +5226,9 @@ impl flutter_rust_bridge::IntoDart for crate::models::ReportIssueRequest { crate::models::ReportIssueRequest::PaymentFailure { data } => { [0.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -5258,6 +5345,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::ReverseSwapStatus { Self::Cancelled => 2.into_dart(), Self::CompletedSeen => 3.into_dart(), Self::CompletedConfirmed => 4.into_dart(), + _ => unreachable!(), } } } @@ -5509,6 +5597,9 @@ impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::SuccessActionPr crate::lnurl::pay::model::SuccessActionProcessed::Url { data } => { [2.into_dart(), data.into_into_dart().into_dart()].into_dart() } + _ => { + unimplemented!(""); + } } } } @@ -5529,6 +5620,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::SwapAmountType { match self { Self::Send => 0.into_dart(), Self::Receive => 1.into_dart(), + _ => unreachable!(), } } } @@ -5588,6 +5680,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::SwapStatus { Self::Redeemed => 3.into_dart(), Self::Refundable => 4.into_dart(), Self::Completed => 5.into_dart(), + _ => unreachable!(), } } } @@ -5731,6 +5824,9 @@ impl SseEncode for crate::lnurl::pay::model::AesSuccessActionDataResult { ::sse_encode(1, serializer); ::sse_encode(reason, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -5750,6 +5846,11 @@ impl SseEncode for crate::models::BackupStatus { } } +impl SseEncode for crate::binding::BindingEventListener { + // 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 crate::input_parser::BitcoinAddressData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -5805,6 +5906,9 @@ impl SseEncode for crate::breez_services::BreezEvent { ::sse_encode(8, serializer); ::sse_encode(details, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6047,6 +6151,9 @@ impl SseEncode for crate::input_parser::InputType { ::sse_encode(7, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6307,6 +6414,9 @@ impl SseEncode for crate::models::LnUrlCallbackStatus { ::sse_encode(1, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6367,6 +6477,9 @@ impl SseEncode for crate::lnurl::pay::model::LnUrlPayResult { ::sse_encode(2, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6414,6 +6527,9 @@ impl SseEncode for crate::models::LnUrlWithdrawResult { ::sse_encode(1, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6515,6 +6631,9 @@ impl SseEncode for crate::models::NodeConfig { ::sse_encode(0, serializer); ::sse_encode(config, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6527,6 +6646,9 @@ impl SseEncode for crate::models::NodeCredentials { ::sse_encode(0, serializer); ::sse_encode(credentials, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -6855,6 +6977,9 @@ impl SseEncode for crate::models::PaymentDetails { ::sse_encode(1, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -7062,6 +7187,9 @@ impl SseEncode for crate::models::ReportIssueRequest { ::sse_encode(0, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } @@ -7242,6 +7370,9 @@ impl SseEncode for crate::lnurl::pay::model::SuccessActionProcessed { ::sse_encode(2, serializer); ::sse_encode(data, serializer); } + _ => { + unimplemented!(""); + } } } } diff --git a/libs/sdk-flutter/README.md b/libs/sdk-flutter/README.md index fc460eca4..ae1a8c63a 100644 --- a/libs/sdk-flutter/README.md +++ b/libs/sdk-flutter/README.md @@ -26,7 +26,7 @@ cargo install cargo-ndk ``` * Install [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge): ``` -cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.36 +cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.38 ``` ## Building the plugin diff --git a/libs/sdk-flutter/flutter_rust_bridge.yaml b/libs/sdk-flutter/flutter_rust_bridge.yaml index dd9184d5f..c2061cce3 100644 --- a/libs/sdk-flutter/flutter_rust_bridge.yaml +++ b/libs/sdk-flutter/flutter_rust_bridge.yaml @@ -1,4 +1,5 @@ -rust_input: ../sdk-core/src/binding.rs +rust_input: crate::binding +rust_root: ../sdk-core/ dart_output: lib/generated/ c_output: ios/Classes/frb_generated.h dart_entrypoint_class_name: BreezSdkBindings diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index 47168ce1f..f5ef06a3b 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -22,11 +22,79 @@ typedef struct _Dart_Handle* Dart_Handle; #define ESTIMATED_LOCKUP_TX_VSIZE 153 +typedef struct wire_cst_binding_event_listener { + +} wire_cst_binding_event_listener; + +typedef struct wire_cst_BreezEvent_NewBlock { + uint32_t block; +} wire_cst_BreezEvent_NewBlock; + 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_aes_success_action_data_decrypted { + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *plaintext; +} wire_cst_aes_success_action_data_decrypted; + +typedef struct wire_cst_AesSuccessActionDataResult_Decrypted { + struct wire_cst_aes_success_action_data_decrypted *data; +} wire_cst_AesSuccessActionDataResult_Decrypted; + +typedef struct wire_cst_AesSuccessActionDataResult_ErrorStatus { + struct wire_cst_list_prim_u_8_strict *reason; +} wire_cst_AesSuccessActionDataResult_ErrorStatus; + +typedef union AesSuccessActionDataResultKind { + struct wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; + struct wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; +} AesSuccessActionDataResultKind; + +typedef struct wire_cst_aes_success_action_data_result { + int32_t tag; + union AesSuccessActionDataResultKind kind; +} wire_cst_aes_success_action_data_result; + +typedef struct wire_cst_SuccessActionProcessed_Aes { + struct wire_cst_aes_success_action_data_result *result; +} wire_cst_SuccessActionProcessed_Aes; + +typedef struct wire_cst_message_success_action_data { + struct wire_cst_list_prim_u_8_strict *message; +} wire_cst_message_success_action_data; + +typedef struct wire_cst_SuccessActionProcessed_Message { + struct wire_cst_message_success_action_data *data; +} wire_cst_SuccessActionProcessed_Message; + +typedef struct wire_cst_url_success_action_data { + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *url; +} wire_cst_url_success_action_data; + +typedef struct wire_cst_SuccessActionProcessed_Url { + struct wire_cst_url_success_action_data *data; +} wire_cst_SuccessActionProcessed_Url; + +typedef union SuccessActionProcessedKind { + struct wire_cst_SuccessActionProcessed_Aes Aes; + struct wire_cst_SuccessActionProcessed_Message Message; + struct wire_cst_SuccessActionProcessed_Url Url; +} SuccessActionProcessedKind; + +typedef struct wire_cst_success_action_processed { + int32_t tag; + union SuccessActionProcessedKind kind; +} wire_cst_success_action_processed; + +typedef struct wire_cst_list_String { + struct wire_cst_list_prim_u_8_strict **ptr; + int32_t len; +} wire_cst_list_String; + typedef struct wire_cst_opening_fee_params { uint64_t min_msat; uint32_t proportional; @@ -36,6 +104,189 @@ typedef struct wire_cst_opening_fee_params { struct wire_cst_list_prim_u_8_strict *promise; } wire_cst_opening_fee_params; +typedef struct wire_cst_swap_info { + struct wire_cst_list_prim_u_8_strict *bitcoin_address; + int64_t created_at; + int64_t lock_height; + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *preimage; + struct wire_cst_list_prim_u_8_strict *private_key; + struct wire_cst_list_prim_u_8_strict *public_key; + struct wire_cst_list_prim_u_8_strict *swapper_public_key; + struct wire_cst_list_prim_u_8_strict *script; + struct wire_cst_list_prim_u_8_strict *bolt11; + uint64_t paid_msat; + uint64_t total_incoming_txs; + uint64_t confirmed_sats; + uint64_t unconfirmed_sats; + int32_t status; + struct wire_cst_list_String *refund_tx_ids; + struct wire_cst_list_String *unconfirmed_tx_ids; + struct wire_cst_list_String *confirmed_tx_ids; + int64_t min_allowed_deposit; + int64_t max_allowed_deposit; + int64_t max_swapper_payable; + struct wire_cst_list_prim_u_8_strict *last_redeem_error; + struct wire_cst_opening_fee_params *channel_opening_fees; + uint32_t *confirmed_at; +} wire_cst_swap_info; + +typedef struct wire_cst_reverse_swap_info { + struct wire_cst_list_prim_u_8_strict *id; + struct wire_cst_list_prim_u_8_strict *claim_pubkey; + struct wire_cst_list_prim_u_8_strict *lockup_txid; + struct wire_cst_list_prim_u_8_strict *claim_txid; + uint64_t onchain_amount_sat; + int32_t status; +} wire_cst_reverse_swap_info; + +typedef struct wire_cst_ln_payment_details { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *label; + struct wire_cst_list_prim_u_8_strict *destination_pubkey; + struct wire_cst_list_prim_u_8_strict *payment_preimage; + bool keysend; + struct wire_cst_list_prim_u_8_strict *bolt11; + struct wire_cst_list_prim_u_8_strict *open_channel_bolt11; + struct wire_cst_success_action_processed *lnurl_success_action; + struct wire_cst_list_prim_u_8_strict *lnurl_pay_domain; + struct wire_cst_list_prim_u_8_strict *lnurl_pay_comment; + struct wire_cst_list_prim_u_8_strict *ln_address; + struct wire_cst_list_prim_u_8_strict *lnurl_metadata; + struct wire_cst_list_prim_u_8_strict *lnurl_withdraw_endpoint; + struct wire_cst_swap_info *swap_info; + struct wire_cst_reverse_swap_info *reverse_swap_info; + uint32_t *pending_expiration_block; +} wire_cst_ln_payment_details; + +typedef struct wire_cst_PaymentDetails_Ln { + struct wire_cst_ln_payment_details *data; +} wire_cst_PaymentDetails_Ln; + +typedef struct wire_cst_closed_channel_payment_details { + int32_t state; + struct wire_cst_list_prim_u_8_strict *funding_txid; + struct wire_cst_list_prim_u_8_strict *short_channel_id; + struct wire_cst_list_prim_u_8_strict *closing_txid; +} wire_cst_closed_channel_payment_details; + +typedef struct wire_cst_PaymentDetails_ClosedChannel { + struct wire_cst_closed_channel_payment_details *data; +} wire_cst_PaymentDetails_ClosedChannel; + +typedef union PaymentDetailsKind { + struct wire_cst_PaymentDetails_Ln Ln; + struct wire_cst_PaymentDetails_ClosedChannel ClosedChannel; +} PaymentDetailsKind; + +typedef struct wire_cst_payment_details { + int32_t tag; + union PaymentDetailsKind kind; +} wire_cst_payment_details; + +typedef struct wire_cst_payment { + struct wire_cst_list_prim_u_8_strict *id; + int32_t payment_type; + int64_t payment_time; + uint64_t amount_msat; + uint64_t fee_msat; + int32_t status; + struct wire_cst_list_prim_u_8_strict *error; + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_payment_details details; + struct wire_cst_list_prim_u_8_strict *metadata; +} wire_cst_payment; + +typedef struct wire_cst_invoice_paid_details { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *bolt11; + struct wire_cst_payment *payment; +} wire_cst_invoice_paid_details; + +typedef struct wire_cst_BreezEvent_InvoicePaid { + struct wire_cst_invoice_paid_details *details; +} wire_cst_BreezEvent_InvoicePaid; + +typedef struct wire_cst_BreezEvent_PaymentSucceed { + struct wire_cst_payment *details; +} wire_cst_BreezEvent_PaymentSucceed; + +typedef struct wire_cst_route_hint_hop { + struct wire_cst_list_prim_u_8_strict *src_node_id; + uint64_t short_channel_id; + uint32_t fees_base_msat; + uint32_t fees_proportional_millionths; + uint64_t cltv_expiry_delta; + uint64_t *htlc_minimum_msat; + uint64_t *htlc_maximum_msat; +} wire_cst_route_hint_hop; + +typedef struct wire_cst_list_route_hint_hop { + struct wire_cst_route_hint_hop *ptr; + int32_t len; +} wire_cst_list_route_hint_hop; + +typedef struct wire_cst_route_hint { + struct wire_cst_list_route_hint_hop *hops; +} wire_cst_route_hint; + +typedef struct wire_cst_list_route_hint { + struct wire_cst_route_hint *ptr; + int32_t len; +} wire_cst_list_route_hint; + +typedef struct wire_cst_ln_invoice { + struct wire_cst_list_prim_u_8_strict *bolt11; + int32_t network; + struct wire_cst_list_prim_u_8_strict *payee_pubkey; + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *description; + struct wire_cst_list_prim_u_8_strict *description_hash; + uint64_t *amount_msat; + uint64_t timestamp; + uint64_t expiry; + struct wire_cst_list_route_hint *routing_hints; + struct wire_cst_list_prim_u_8_strict *payment_secret; + uint64_t min_final_cltv_expiry_delta; +} wire_cst_ln_invoice; + +typedef struct wire_cst_payment_failed_data { + struct wire_cst_list_prim_u_8_strict *error; + struct wire_cst_list_prim_u_8_strict *node_id; + struct wire_cst_ln_invoice *invoice; + struct wire_cst_list_prim_u_8_strict *label; +} wire_cst_payment_failed_data; + +typedef struct wire_cst_BreezEvent_PaymentFailed { + struct wire_cst_payment_failed_data *details; +} wire_cst_BreezEvent_PaymentFailed; + +typedef struct wire_cst_backup_failed_data { + struct wire_cst_list_prim_u_8_strict *error; +} wire_cst_backup_failed_data; + +typedef struct wire_cst_BreezEvent_BackupFailed { + struct wire_cst_backup_failed_data *details; +} wire_cst_BreezEvent_BackupFailed; + +typedef struct wire_cst_BreezEvent_SwapUpdated { + struct wire_cst_swap_info *details; +} wire_cst_BreezEvent_SwapUpdated; + +typedef union BreezEventKind { + struct wire_cst_BreezEvent_NewBlock NewBlock; + struct wire_cst_BreezEvent_InvoicePaid InvoicePaid; + struct wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; + struct wire_cst_BreezEvent_PaymentFailed PaymentFailed; + struct wire_cst_BreezEvent_BackupFailed BackupFailed; + struct wire_cst_BreezEvent_SwapUpdated SwapUpdated; +} BreezEventKind; + +typedef struct wire_cst_breez_event { + int32_t tag; + union BreezEventKind kind; +} wire_cst_breez_event; + typedef struct wire_cst_buy_bitcoin_request { int32_t provider; struct wire_cst_opening_fee_params *opening_fee_params; @@ -282,33 +533,6 @@ typedef struct wire_cst_static_backup_request { struct wire_cst_list_prim_u_8_strict *working_dir; } wire_cst_static_backup_request; -typedef struct wire_cst_aes_success_action_data_decrypted { - struct wire_cst_list_prim_u_8_strict *description; - struct wire_cst_list_prim_u_8_strict *plaintext; -} wire_cst_aes_success_action_data_decrypted; - -typedef struct wire_cst_AesSuccessActionDataResult_Decrypted { - struct wire_cst_aes_success_action_data_decrypted *data; -} wire_cst_AesSuccessActionDataResult_Decrypted; - -typedef struct wire_cst_AesSuccessActionDataResult_ErrorStatus { - struct wire_cst_list_prim_u_8_strict *reason; -} wire_cst_AesSuccessActionDataResult_ErrorStatus; - -typedef union AesSuccessActionDataResultKind { - struct wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; - struct wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; -} AesSuccessActionDataResultKind; - -typedef struct wire_cst_aes_success_action_data_result { - int32_t tag; - union AesSuccessActionDataResultKind kind; -} wire_cst_aes_success_action_data_result; - -typedef struct wire_cst_backup_failed_data { - struct wire_cst_list_prim_u_8_strict *error; -} wire_cst_backup_failed_data; - typedef struct wire_cst_bitcoin_address_data { struct wire_cst_list_prim_u_8_strict *address; int32_t network; @@ -317,181 +541,6 @@ typedef struct wire_cst_bitcoin_address_data { struct wire_cst_list_prim_u_8_strict *message; } wire_cst_bitcoin_address_data; -typedef struct wire_cst_closed_channel_payment_details { - int32_t state; - struct wire_cst_list_prim_u_8_strict *funding_txid; - struct wire_cst_list_prim_u_8_strict *short_channel_id; - struct wire_cst_list_prim_u_8_strict *closing_txid; -} wire_cst_closed_channel_payment_details; - -typedef struct wire_cst_SuccessActionProcessed_Aes { - struct wire_cst_aes_success_action_data_result *result; -} wire_cst_SuccessActionProcessed_Aes; - -typedef struct wire_cst_message_success_action_data { - struct wire_cst_list_prim_u_8_strict *message; -} wire_cst_message_success_action_data; - -typedef struct wire_cst_SuccessActionProcessed_Message { - struct wire_cst_message_success_action_data *data; -} wire_cst_SuccessActionProcessed_Message; - -typedef struct wire_cst_url_success_action_data { - struct wire_cst_list_prim_u_8_strict *description; - struct wire_cst_list_prim_u_8_strict *url; -} wire_cst_url_success_action_data; - -typedef struct wire_cst_SuccessActionProcessed_Url { - struct wire_cst_url_success_action_data *data; -} wire_cst_SuccessActionProcessed_Url; - -typedef union SuccessActionProcessedKind { - struct wire_cst_SuccessActionProcessed_Aes Aes; - struct wire_cst_SuccessActionProcessed_Message Message; - struct wire_cst_SuccessActionProcessed_Url Url; -} SuccessActionProcessedKind; - -typedef struct wire_cst_success_action_processed { - int32_t tag; - union SuccessActionProcessedKind kind; -} wire_cst_success_action_processed; - -typedef struct wire_cst_list_String { - struct wire_cst_list_prim_u_8_strict **ptr; - int32_t len; -} wire_cst_list_String; - -typedef struct wire_cst_swap_info { - struct wire_cst_list_prim_u_8_strict *bitcoin_address; - int64_t created_at; - int64_t lock_height; - struct wire_cst_list_prim_u_8_strict *payment_hash; - struct wire_cst_list_prim_u_8_strict *preimage; - struct wire_cst_list_prim_u_8_strict *private_key; - struct wire_cst_list_prim_u_8_strict *public_key; - struct wire_cst_list_prim_u_8_strict *swapper_public_key; - struct wire_cst_list_prim_u_8_strict *script; - struct wire_cst_list_prim_u_8_strict *bolt11; - uint64_t paid_msat; - uint64_t total_incoming_txs; - uint64_t confirmed_sats; - uint64_t unconfirmed_sats; - int32_t status; - struct wire_cst_list_String *refund_tx_ids; - struct wire_cst_list_String *unconfirmed_tx_ids; - struct wire_cst_list_String *confirmed_tx_ids; - int64_t min_allowed_deposit; - int64_t max_allowed_deposit; - int64_t max_swapper_payable; - struct wire_cst_list_prim_u_8_strict *last_redeem_error; - struct wire_cst_opening_fee_params *channel_opening_fees; - uint32_t *confirmed_at; -} wire_cst_swap_info; - -typedef struct wire_cst_reverse_swap_info { - struct wire_cst_list_prim_u_8_strict *id; - struct wire_cst_list_prim_u_8_strict *claim_pubkey; - struct wire_cst_list_prim_u_8_strict *lockup_txid; - struct wire_cst_list_prim_u_8_strict *claim_txid; - uint64_t onchain_amount_sat; - int32_t status; -} wire_cst_reverse_swap_info; - -typedef struct wire_cst_ln_payment_details { - struct wire_cst_list_prim_u_8_strict *payment_hash; - struct wire_cst_list_prim_u_8_strict *label; - struct wire_cst_list_prim_u_8_strict *destination_pubkey; - struct wire_cst_list_prim_u_8_strict *payment_preimage; - bool keysend; - struct wire_cst_list_prim_u_8_strict *bolt11; - struct wire_cst_list_prim_u_8_strict *open_channel_bolt11; - struct wire_cst_success_action_processed *lnurl_success_action; - struct wire_cst_list_prim_u_8_strict *lnurl_pay_domain; - struct wire_cst_list_prim_u_8_strict *lnurl_pay_comment; - struct wire_cst_list_prim_u_8_strict *ln_address; - struct wire_cst_list_prim_u_8_strict *lnurl_metadata; - struct wire_cst_list_prim_u_8_strict *lnurl_withdraw_endpoint; - struct wire_cst_swap_info *swap_info; - struct wire_cst_reverse_swap_info *reverse_swap_info; - uint32_t *pending_expiration_block; -} wire_cst_ln_payment_details; - -typedef struct wire_cst_PaymentDetails_Ln { - struct wire_cst_ln_payment_details *data; -} wire_cst_PaymentDetails_Ln; - -typedef struct wire_cst_PaymentDetails_ClosedChannel { - struct wire_cst_closed_channel_payment_details *data; -} wire_cst_PaymentDetails_ClosedChannel; - -typedef union PaymentDetailsKind { - struct wire_cst_PaymentDetails_Ln Ln; - struct wire_cst_PaymentDetails_ClosedChannel ClosedChannel; -} PaymentDetailsKind; - -typedef struct wire_cst_payment_details { - int32_t tag; - union PaymentDetailsKind kind; -} wire_cst_payment_details; - -typedef struct wire_cst_payment { - struct wire_cst_list_prim_u_8_strict *id; - int32_t payment_type; - int64_t payment_time; - uint64_t amount_msat; - uint64_t fee_msat; - int32_t status; - struct wire_cst_list_prim_u_8_strict *error; - struct wire_cst_list_prim_u_8_strict *description; - struct wire_cst_payment_details details; - struct wire_cst_list_prim_u_8_strict *metadata; -} wire_cst_payment; - -typedef struct wire_cst_invoice_paid_details { - struct wire_cst_list_prim_u_8_strict *payment_hash; - struct wire_cst_list_prim_u_8_strict *bolt11; - struct wire_cst_payment *payment; -} wire_cst_invoice_paid_details; - -typedef struct wire_cst_route_hint_hop { - struct wire_cst_list_prim_u_8_strict *src_node_id; - uint64_t short_channel_id; - uint32_t fees_base_msat; - uint32_t fees_proportional_millionths; - uint64_t cltv_expiry_delta; - uint64_t *htlc_minimum_msat; - uint64_t *htlc_maximum_msat; -} wire_cst_route_hint_hop; - -typedef struct wire_cst_list_route_hint_hop { - struct wire_cst_route_hint_hop *ptr; - int32_t len; -} wire_cst_list_route_hint_hop; - -typedef struct wire_cst_route_hint { - struct wire_cst_list_route_hint_hop *hops; -} wire_cst_route_hint; - -typedef struct wire_cst_list_route_hint { - struct wire_cst_route_hint *ptr; - int32_t len; -} wire_cst_list_route_hint; - -typedef struct wire_cst_ln_invoice { - struct wire_cst_list_prim_u_8_strict *bolt11; - int32_t network; - struct wire_cst_list_prim_u_8_strict *payee_pubkey; - struct wire_cst_list_prim_u_8_strict *payment_hash; - struct wire_cst_list_prim_u_8_strict *description; - struct wire_cst_list_prim_u_8_strict *description_hash; - uint64_t *amount_msat; - uint64_t timestamp; - uint64_t expiry; - struct wire_cst_list_route_hint *routing_hints; - struct wire_cst_list_prim_u_8_strict *payment_secret; - uint64_t min_final_cltv_expiry_delta; -} wire_cst_ln_invoice; - typedef struct wire_cst_ln_url_error_data { struct wire_cst_list_prim_u_8_strict *reason; } wire_cst_ln_url_error_data; @@ -546,13 +595,6 @@ typedef struct wire_cst_node_credentials { union NodeCredentialsKind kind; } wire_cst_node_credentials; -typedef struct wire_cst_payment_failed_data { - struct wire_cst_list_prim_u_8_strict *error; - struct wire_cst_list_prim_u_8_strict *node_id; - struct wire_cst_ln_invoice *invoice; - struct wire_cst_list_prim_u_8_strict *label; -} wire_cst_payment_failed_data; - typedef struct wire_cst_symbol { struct wire_cst_list_prim_u_8_strict *grapheme; struct wire_cst_list_prim_u_8_strict *template_; @@ -649,44 +691,6 @@ typedef struct wire_cst_backup_status { uint64_t *last_backup_time; } wire_cst_backup_status; -typedef struct wire_cst_BreezEvent_NewBlock { - uint32_t block; -} wire_cst_BreezEvent_NewBlock; - -typedef struct wire_cst_BreezEvent_InvoicePaid { - struct wire_cst_invoice_paid_details *details; -} wire_cst_BreezEvent_InvoicePaid; - -typedef struct wire_cst_BreezEvent_PaymentSucceed { - struct wire_cst_payment *details; -} wire_cst_BreezEvent_PaymentSucceed; - -typedef struct wire_cst_BreezEvent_PaymentFailed { - struct wire_cst_payment_failed_data *details; -} wire_cst_BreezEvent_PaymentFailed; - -typedef struct wire_cst_BreezEvent_BackupFailed { - struct wire_cst_backup_failed_data *details; -} wire_cst_BreezEvent_BackupFailed; - -typedef struct wire_cst_BreezEvent_SwapUpdated { - struct wire_cst_swap_info *details; -} wire_cst_BreezEvent_SwapUpdated; - -typedef union BreezEventKind { - struct wire_cst_BreezEvent_NewBlock NewBlock; - struct wire_cst_BreezEvent_InvoicePaid InvoicePaid; - struct wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; - struct wire_cst_BreezEvent_PaymentFailed PaymentFailed; - struct wire_cst_BreezEvent_BackupFailed BackupFailed; - struct wire_cst_BreezEvent_SwapUpdated SwapUpdated; -} BreezEventKind; - -typedef struct wire_cst_breez_event { - int32_t tag; - union BreezEventKind kind; -} wire_cst_breez_event; - typedef struct wire_cst_buy_bitcoin_response { struct wire_cst_list_prim_u_8_strict *url; struct wire_cst_opening_fee_params *opening_fee_params; @@ -902,6 +906,10 @@ void frbgen_breez_sdk_wire__crate__binding__backup(int64_t port_); void frbgen_breez_sdk_wire__crate__binding__backup_status(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event(int64_t port_, + struct wire_cst_binding_event_listener *that, + struct wire_cst_breez_event *e); + void frbgen_breez_sdk_wire__crate__binding__breez_events_stream(int64_t port_, struct wire_cst_list_prim_u_8_strict *s); @@ -1068,10 +1076,14 @@ struct wire_cst_aes_success_action_data_result *frbgen_breez_sdk_cst_new_box_aut struct wire_cst_backup_failed_data *frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data(void); +struct wire_cst_binding_event_listener *frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener(void); + struct wire_cst_bitcoin_address_data *frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data(void); bool *frbgen_breez_sdk_cst_new_box_autoadd_bool(bool value); +struct wire_cst_breez_event *frbgen_breez_sdk_cst_new_box_autoadd_breez_event(void); + struct wire_cst_buy_bitcoin_request *frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request(void); struct wire_cst_check_message_request *frbgen_breez_sdk_cst_new_box_autoadd_check_message_request(void); @@ -1214,8 +1226,10 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_bool); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_breez_event); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_check_message_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details); @@ -1287,6 +1301,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_events_stream); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_log_stream); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__buy_bitcoin); diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 40a27f5fb..af5d58f07 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -14,248 +14,243 @@ import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -// The type `BindingEventListener` is not used by any `pub` functions, thus it is ignored. -// The type `BindingLogger` is not used by any `pub` functions, thus it is ignored. +// These functions are ignored because they are not marked as `pub`: `block_on`, `get_breez_services`, `init`, `new`, `rt` +// These types are ignored because they are not used by any `pub` functions: `BindingLogger` /// Wrapper around [BreezServices::connect] which also initializes SDK logging -Future connect({required ConnectRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingConnect(req: req, hint: hint); +Future connect({required ConnectRequest req}) => + BreezSdkBindings.instance.api.crateBindingConnect(req: req); /// Check whether node service is initialized or not -Future isInitialized({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingIsInitialized(hint: hint); +Future isInitialized() => BreezSdkBindings.instance.api.crateBindingIsInitialized(); /// See [BreezServices::sync] -Future sync({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingSync(hint: hint); +Future sync() => BreezSdkBindings.instance.api.crateBindingSync(); /// See [BreezServices::node_credentials] -Future nodeCredentials({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingNodeCredentials(hint: hint); +Future nodeCredentials() => BreezSdkBindings.instance.api.crateBindingNodeCredentials(); /// See [BreezServices::node_info] -Future nodeInfo({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingNodeInfo(hint: hint); +Future nodeInfo() => BreezSdkBindings.instance.api.crateBindingNodeInfo(); /// See [BreezServices::configure_node] -Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingConfigureNode(req: req, hint: hint); +Future configureNode({required ConfigureNodeRequest req}) => + BreezSdkBindings.instance.api.crateBindingConfigureNode(req: req); /// Cleanup node resources and stop the signer. -Future disconnect({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingDisconnect(hint: hint); +Future disconnect() => BreezSdkBindings.instance.api.crateBindingDisconnect(); /// See [BreezServices::sign_message] -Future signMessage({required SignMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSignMessage(req: req, hint: hint); +Future signMessage({required SignMessageRequest req}) => + BreezSdkBindings.instance.api.crateBindingSignMessage(req: req); /// See [BreezServices::check_message] -Future checkMessage({required CheckMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingCheckMessage(req: req, hint: hint); +Future checkMessage({required CheckMessageRequest req}) => + BreezSdkBindings.instance.api.crateBindingCheckMessage(req: req); /// See [breez_services::mnemonic_to_seed] -Future mnemonicToSeed({required String phrase, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingMnemonicToSeed(phrase: phrase, hint: hint); +Future mnemonicToSeed({required String phrase}) => + BreezSdkBindings.instance.api.crateBindingMnemonicToSeed(phrase: phrase); /// See [BreezServices::default_config] Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) => + {required EnvironmentType envType, required String apiKey, required NodeConfig nodeConfig}) => BreezSdkBindings.instance.api - .crateBindingDefaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, hint: hint); + .crateBindingDefaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig); /// See [BreezServices::static_backup] -Future staticBackup({required StaticBackupRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingStaticBackup(req: req, hint: hint); +Future staticBackup({required StaticBackupRequest req}) => + BreezSdkBindings.instance.api.crateBindingStaticBackup(req: req); /// See [BreezServices::service_health_check] -Future serviceHealthCheck({required String apiKey, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingServiceHealthCheck(apiKey: apiKey, hint: hint); +Future serviceHealthCheck({required String apiKey}) => + BreezSdkBindings.instance.api.crateBindingServiceHealthCheck(apiKey: apiKey); /// If used, this must be called before `connect`. It can only be called once. -Stream breezEventsStream({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBreezEventsStream(hint: hint); +Stream breezEventsStream() => BreezSdkBindings.instance.api.crateBindingBreezEventsStream(); /// If used, this must be called before `connect`. It can only be called once. -Stream breezLogStream({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBreezLogStream(hint: hint); +Stream breezLogStream() => BreezSdkBindings.instance.api.crateBindingBreezLogStream(); /// See [BreezServices::list_lsps] -Future> listLsps({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListLsps(hint: hint); +Future> listLsps() => BreezSdkBindings.instance.api.crateBindingListLsps(); /// See [BreezServices::connect_lsp] -Future connectLsp({required String lspId, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingConnectLsp(lspId: lspId, hint: hint); +Future connectLsp({required String lspId}) => + BreezSdkBindings.instance.api.crateBindingConnectLsp(lspId: lspId); /// See [BreezServices::lsp_id] -Future lspId({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingLspId(hint: hint); +Future lspId() => BreezSdkBindings.instance.api.crateBindingLspId(); /// See [BreezServices::fetch_lsp_info] -Future fetchLspInfo({required String id, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchLspInfo(id: id, hint: hint); +Future fetchLspInfo({required String id}) => + BreezSdkBindings.instance.api.crateBindingFetchLspInfo(id: id); /// See [BreezServices::lsp_info] -Future lspInfo({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLspInfo(hint: hint); +Future lspInfo() => BreezSdkBindings.instance.api.crateBindingLspInfo(); /// See [BreezServices::close_lsp_channels] -Future closeLspChannels({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingCloseLspChannels(hint: hint); +Future closeLspChannels() => BreezSdkBindings.instance.api.crateBindingCloseLspChannels(); -Future registerWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRegisterWebhook(webhookUrl: webhookUrl, hint: hint); +Future registerWebhook({required String webhookUrl}) => + BreezSdkBindings.instance.api.crateBindingRegisterWebhook(webhookUrl: webhookUrl); -Future unregisterWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingUnregisterWebhook(webhookUrl: webhookUrl, hint: hint); +Future unregisterWebhook({required String webhookUrl}) => + BreezSdkBindings.instance.api.crateBindingUnregisterWebhook(webhookUrl: webhookUrl); /// See [BreezServices::backup] -Future backup({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingBackup(hint: hint); +Future backup() => BreezSdkBindings.instance.api.crateBindingBackup(); /// See [BreezServices::backup_status] -Future backupStatus({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBackupStatus(hint: hint); +Future backupStatus() => BreezSdkBindings.instance.api.crateBindingBackupStatus(); -Future parseInvoice({required String invoice, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice, hint: hint); +Future parseInvoice({required String invoice}) => + BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice); -Future parseInput({required String input, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingParseInput(input: input, hint: hint); +Future parseInput({required String input}) => + BreezSdkBindings.instance.api.crateBindingParseInput(input: input); /// See [BreezServices::list_payments] -Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListPayments(req: req, hint: hint); +Future> listPayments({required ListPaymentsRequest req}) => + BreezSdkBindings.instance.api.crateBindingListPayments(req: req); /// See [BreezServices::list_payments] -Future paymentByHash({required String hash, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPaymentByHash(hash: hash, hint: hint); +Future paymentByHash({required String hash}) => + BreezSdkBindings.instance.api.crateBindingPaymentByHash(hash: hash); /// See [BreezServices::set_payment_metadata] -Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSetPaymentMetadata(hash: hash, metadata: metadata, hint: hint); +Future setPaymentMetadata({required String hash, required String metadata}) => + BreezSdkBindings.instance.api.crateBindingSetPaymentMetadata(hash: hash, metadata: metadata); /// See [BreezServices::send_payment] -Future sendPayment({required SendPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendPayment(req: req, hint: hint); +Future sendPayment({required SendPaymentRequest req}) => + BreezSdkBindings.instance.api.crateBindingSendPayment(req: req); /// See [BreezServices::send_spontaneous_payment] -Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendSpontaneousPayment(req: req, hint: hint); +Future sendSpontaneousPayment({required SendSpontaneousPaymentRequest req}) => + BreezSdkBindings.instance.api.crateBindingSendSpontaneousPayment(req: req); /// See [BreezServices::receive_payment] -Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReceivePayment(req: req, hint: hint); +Future receivePayment({required ReceivePaymentRequest req}) => + BreezSdkBindings.instance.api.crateBindingReceivePayment(req: req); /// See [BreezServices::lnurl_pay] -Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlPay(req: req, hint: hint); +Future lnurlPay({required LnUrlPayRequest req}) => + BreezSdkBindings.instance.api.crateBindingLnurlPay(req: req); /// See [BreezServices::lnurl_withdraw] -Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlWithdraw(req: req, hint: hint); +Future lnurlWithdraw({required LnUrlWithdrawRequest req}) => + BreezSdkBindings.instance.api.crateBindingLnurlWithdraw(req: req); /// See [BreezServices::lnurl_auth] -Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlAuth(reqData: reqData, hint: hint); +Future lnurlAuth({required LnUrlAuthRequestData reqData}) => + BreezSdkBindings.instance.api.crateBindingLnurlAuth(reqData: reqData); /// See [BreezServices::report_issue] -Future reportIssue({required ReportIssueRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReportIssue(req: req, hint: hint); +Future reportIssue({required ReportIssueRequest req}) => + BreezSdkBindings.instance.api.crateBindingReportIssue(req: req); /// See [BreezServices::fetch_fiat_rates] -Future> fetchFiatRates({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchFiatRates(hint: hint); +Future> fetchFiatRates() => BreezSdkBindings.instance.api.crateBindingFetchFiatRates(); /// See [BreezServices::list_fiat_currencies] -Future> listFiatCurrencies({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListFiatCurrencies(hint: hint); +Future> listFiatCurrencies() => + BreezSdkBindings.instance.api.crateBindingListFiatCurrencies(); /// See [BreezServices::max_reverse_swap_amount] -Future maxReverseSwapAmount({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingMaxReverseSwapAmount(hint: hint); +Future maxReverseSwapAmount() => + BreezSdkBindings.instance.api.crateBindingMaxReverseSwapAmount(); /// See [BreezServices::send_onchain] -Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendOnchain(req: req, hint: hint); +Future sendOnchain({required SendOnchainRequest req}) => + BreezSdkBindings.instance.api.crateBindingSendOnchain(req: req); /// See [BreezServices::pay_onchain] -Future payOnchain({required PayOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPayOnchain(req: req, hint: hint); +Future payOnchain({required PayOnchainRequest req}) => + BreezSdkBindings.instance.api.crateBindingPayOnchain(req: req); /// See [BreezServices::receive_onchain] -Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReceiveOnchain(req: req, hint: hint); +Future receiveOnchain({required ReceiveOnchainRequest req}) => + BreezSdkBindings.instance.api.crateBindingReceiveOnchain(req: req); /// See [BreezServices::buy_bitcoin] -Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBuyBitcoin(req: req, hint: hint); +Future buyBitcoin({required BuyBitcoinRequest req}) => + BreezSdkBindings.instance.api.crateBindingBuyBitcoin(req: req); /// See [BreezServices::redeem_onchain_funds] -Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRedeemOnchainFunds(req: req, hint: hint); +Future redeemOnchainFunds({required RedeemOnchainFundsRequest req}) => + BreezSdkBindings.instance.api.crateBindingRedeemOnchainFunds(req: req); /// See [BreezServices::prepare_redeem_onchain_funds] Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareRedeemOnchainFunds(req: req, hint: hint); + {required PrepareRedeemOnchainFundsRequest req}) => + BreezSdkBindings.instance.api.crateBindingPrepareRedeemOnchainFunds(req: req); /// See [BreezServices::list_refundables] -Future> listRefundables({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListRefundables(hint: hint); +Future> listRefundables() => BreezSdkBindings.instance.api.crateBindingListRefundables(); /// See [BreezServices::prepare_refund] -Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareRefund(req: req, hint: hint); +Future prepareRefund({required PrepareRefundRequest req}) => + BreezSdkBindings.instance.api.crateBindingPrepareRefund(req: req); /// See [BreezServices::refund] -Future refund({required RefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRefund(req: req, hint: hint); +Future refund({required RefundRequest req}) => + BreezSdkBindings.instance.api.crateBindingRefund(req: req); /// See [BreezServices::rescan_swaps] -Future rescanSwaps({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingRescanSwaps(hint: hint); +Future rescanSwaps() => BreezSdkBindings.instance.api.crateBindingRescanSwaps(); /// See [BreezServices::redeem_swap] -Future redeemSwap({required String swapAddress, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRedeemSwap(swapAddress: swapAddress, hint: hint); +Future redeemSwap({required String swapAddress}) => + BreezSdkBindings.instance.api.crateBindingRedeemSwap(swapAddress: swapAddress); /// See [BreezServices::in_progress_swap] -Future inProgressSwap({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressSwap(hint: hint); +Future inProgressSwap() => BreezSdkBindings.instance.api.crateBindingInProgressSwap(); /// See [BreezServices::in_progress_reverse_swaps] -Future> inProgressReverseSwaps({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(hint: hint); +Future> inProgressReverseSwaps() => + BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(); /// See [BreezServices::open_channel_fee] -Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req, hint: hint); +Future openChannelFee({required OpenChannelFeeRequest req}) => + BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req); /// See [BreezServices::fetch_reverse_swap_fees] -Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchReverseSwapFees(req: req, hint: hint); +Future fetchReverseSwapFees({required ReverseSwapFeesRequest req}) => + BreezSdkBindings.instance.api.crateBindingFetchReverseSwapFees(req: req); /// See [BreezServices::onchain_payment_limits] -Future onchainPaymentLimits({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingOnchainPaymentLimits(hint: hint); +Future onchainPaymentLimits() => + BreezSdkBindings.instance.api.crateBindingOnchainPaymentLimits(); /// See [BreezServices::prepare_onchain_payment] -Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareOnchainPayment(req: req, hint: hint); +Future prepareOnchainPayment({required PrepareOnchainPaymentRequest req}) => + BreezSdkBindings.instance.api.crateBindingPrepareOnchainPayment(req: req); /// See [BreezServices::in_progress_onchain_payments] -Future> inProgressOnchainPayments({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressOnchainPayments(hint: hint); +Future> inProgressOnchainPayments() => + BreezSdkBindings.instance.api.crateBindingInProgressOnchainPayments(); /// See [BreezServices::recommended_fees] -Future recommendedFees({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRecommendedFees(hint: hint); +Future recommendedFees() => BreezSdkBindings.instance.api.crateBindingRecommendedFees(); /// See [BreezServices::execute_dev_command] -Future executeCommand({required String command, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingExecuteCommand(command: command, hint: hint); +Future executeCommand({required String command}) => + BreezSdkBindings.instance.api.crateBindingExecuteCommand(command: command); /// See [BreezServices::generate_diagnostic_data] -Future generateDiagnosticData({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(hint: hint); +Future generateDiagnosticData() => BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(); + +class BindingEventListener { + const BindingEventListener(); + + Future onEvent({required BreezEvent e}) => + BreezSdkBindings.instance.api.crateBindingBindingEventListenerOnEvent(that: this, e: e); + + @override + int get hashCode => 0; + + @override + bool operator ==(Object other) => + identical(this, other) || other is BindingEventListener && runtimeType == other.runtimeType; +} diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 9c9af8a7f..c86a404fc 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 45a52924e..02fbdfb4a 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart index 5e37f8d22..b150142a1 100644 --- a/libs/sdk-flutter/lib/generated/fiat.dart +++ b/libs/sdk-flutter/lib/generated/fiat.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 99dc53fa0..9011e8c42 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // 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 @@ -9,6 +9,7 @@ import 'chain.dart'; import 'dart:async'; import 'dart:convert'; import 'fiat.dart'; +import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; import 'input_parser.dart'; import 'invoice.dart'; @@ -58,10 +59,10 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.36'; + String get codegenVersion => '2.0.0-dev.38'; @override - int get rustContentHash => 1499828454; + int get rustContentHash => 847148110; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( stem: 'breez_sdk_core', @@ -71,138 +72,134 @@ class BreezSdkBindings } abstract class BreezSdkBindingsApi extends BaseApi { - Future crateBindingBackup({dynamic hint}); + Future crateBindingBackup(); - Future crateBindingBackupStatus({dynamic hint}); + Future crateBindingBackupStatus(); - Stream crateBindingBreezEventsStream({dynamic hint}); + Future crateBindingBindingEventListenerOnEvent( + {required BindingEventListener that, required BreezEvent e}); - Stream crateBindingBreezLogStream({dynamic hint}); + Stream crateBindingBreezEventsStream(); - Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}); + Stream crateBindingBreezLogStream(); - Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}); + Future crateBindingBuyBitcoin({required BuyBitcoinRequest req}); - Future crateBindingCloseLspChannels({dynamic hint}); + Future crateBindingCheckMessage({required CheckMessageRequest req}); - Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}); + Future crateBindingCloseLspChannels(); - Future crateBindingConnect({required ConnectRequest req, dynamic hint}); + Future crateBindingConfigureNode({required ConfigureNodeRequest req}); - Future crateBindingConnectLsp({required String lspId, dynamic hint}); + Future crateBindingConnect({required ConnectRequest req}); + + Future crateBindingConnectLsp({required String lspId}); Future crateBindingDefaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}); + {required EnvironmentType envType, required String apiKey, required NodeConfig nodeConfig}); - Future crateBindingDisconnect({dynamic hint}); + Future crateBindingDisconnect(); - Future crateBindingExecuteCommand({required String command, dynamic hint}); + Future crateBindingExecuteCommand({required String command}); - Future> crateBindingFetchFiatRates({dynamic hint}); + Future> crateBindingFetchFiatRates(); - Future crateBindingFetchLspInfo({required String id, dynamic hint}); + Future crateBindingFetchLspInfo({required String id}); - Future crateBindingFetchReverseSwapFees( - {required ReverseSwapFeesRequest req, dynamic hint}); + Future crateBindingFetchReverseSwapFees({required ReverseSwapFeesRequest req}); - Future crateBindingGenerateDiagnosticData({dynamic hint}); + Future crateBindingGenerateDiagnosticData(); - Future> crateBindingInProgressOnchainPayments({dynamic hint}); + Future> crateBindingInProgressOnchainPayments(); - Future> crateBindingInProgressReverseSwaps({dynamic hint}); + Future> crateBindingInProgressReverseSwaps(); - Future crateBindingInProgressSwap({dynamic hint}); + Future crateBindingInProgressSwap(); - Future crateBindingIsInitialized({dynamic hint}); + Future crateBindingIsInitialized(); - Future> crateBindingListFiatCurrencies({dynamic hint}); + Future> crateBindingListFiatCurrencies(); - Future> crateBindingListLsps({dynamic hint}); + Future> crateBindingListLsps(); - Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}); + Future> crateBindingListPayments({required ListPaymentsRequest req}); - Future> crateBindingListRefundables({dynamic hint}); + Future> crateBindingListRefundables(); - Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); + Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData}); - Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}); + Future crateBindingLnurlPay({required LnUrlPayRequest req}); - Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); + Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req}); - Future crateBindingLspId({dynamic hint}); + Future crateBindingLspId(); - Future crateBindingLspInfo({dynamic hint}); + Future crateBindingLspInfo(); - Future crateBindingMaxReverseSwapAmount({dynamic hint}); + Future crateBindingMaxReverseSwapAmount(); - Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}); + Future crateBindingMnemonicToSeed({required String phrase}); - Future crateBindingNodeCredentials({dynamic hint}); + Future crateBindingNodeCredentials(); - Future crateBindingNodeInfo({dynamic hint}); + Future crateBindingNodeInfo(); - Future crateBindingOnchainPaymentLimits({dynamic hint}); + Future crateBindingOnchainPaymentLimits(); - Future crateBindingOpenChannelFee( - {required OpenChannelFeeRequest req, dynamic hint}); + Future crateBindingOpenChannelFee({required OpenChannelFeeRequest req}); - Future crateBindingParseInput({required String input, dynamic hint}); + Future crateBindingParseInput({required String input}); - Future crateBindingParseInvoice({required String invoice, dynamic hint}); + Future crateBindingParseInvoice({required String invoice}); - Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}); + Future crateBindingPayOnchain({required PayOnchainRequest req}); - Future crateBindingPaymentByHash({required String hash, dynamic hint}); + Future crateBindingPaymentByHash({required String hash}); Future crateBindingPrepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}); + {required PrepareOnchainPaymentRequest req}); Future crateBindingPrepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); + {required PrepareRedeemOnchainFundsRequest req}); - Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}); + Future crateBindingPrepareRefund({required PrepareRefundRequest req}); - Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); + Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req}); - Future crateBindingReceivePayment( - {required ReceivePaymentRequest req, dynamic hint}); + Future crateBindingReceivePayment({required ReceivePaymentRequest req}); - Future crateBindingRecommendedFees({dynamic hint}); + Future crateBindingRecommendedFees(); - Future crateBindingRedeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}); + Future crateBindingRedeemOnchainFunds({required RedeemOnchainFundsRequest req}); - Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}); + Future crateBindingRedeemSwap({required String swapAddress}); - Future crateBindingRefund({required RefundRequest req, dynamic hint}); + Future crateBindingRefund({required RefundRequest req}); - Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}); + Future crateBindingRegisterWebhook({required String webhookUrl}); - Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}); + Future crateBindingReportIssue({required ReportIssueRequest req}); - Future crateBindingRescanSwaps({dynamic hint}); + Future crateBindingRescanSwaps(); - Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}); + Future crateBindingSendOnchain({required SendOnchainRequest req}); - Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}); + Future crateBindingSendPayment({required SendPaymentRequest req}); Future crateBindingSendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}); + {required SendSpontaneousPaymentRequest req}); - Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}); + Future crateBindingServiceHealthCheck({required String apiKey}); - Future crateBindingSetPaymentMetadata({required String hash, required String metadata, dynamic hint}); + Future crateBindingSetPaymentMetadata({required String hash, required String metadata}); - Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}); + Future crateBindingSignMessage({required SignMessageRequest req}); - Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}); + Future crateBindingStaticBackup({required StaticBackupRequest req}); - Future crateBindingSync({dynamic hint}); + Future crateBindingSync(); - Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}); + Future crateBindingUnregisterWebhook({required String webhookUrl}); } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -214,7 +211,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements }); @override - Future crateBindingBackup({dynamic hint}) { + Future crateBindingBackup() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__backup(port_); @@ -226,7 +223,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingBackupConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -236,7 +232,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingBackupStatus({dynamic hint}) { + Future crateBindingBackupStatus() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__backup_status(port_); @@ -248,7 +244,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingBackupStatusConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -258,7 +253,31 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Stream crateBindingBreezEventsStream({dynamic hint}) { + Future crateBindingBindingEventListenerOnEvent( + {required BindingEventListener that, required BreezEvent e}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_box_autoadd_binding_event_listener(that); + var arg1 = cst_encode_box_autoadd_breez_event(e); + return wire.wire__crate__binding__binding_event_listener_on_event(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: null, + ), + constMeta: kCrateBindingBindingEventListenerOnEventConstMeta, + argValues: [that, e], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateBindingBindingEventListenerOnEventConstMeta => const TaskConstMeta( + debugName: "binding_event_listener_on_event", + argNames: ["that", "e"], + ); + + @override + Stream crateBindingBreezEventsStream() { final s = RustStreamSink(); unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { @@ -272,7 +291,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingBreezEventsStreamConstMeta, argValues: [s], apiImpl: this, - hint: hint, ))); return s.stream; } @@ -283,7 +301,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Stream crateBindingBreezLogStream({dynamic hint}) { + Stream crateBindingBreezLogStream() { final s = RustStreamSink(); unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { @@ -297,7 +315,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingBreezLogStreamConstMeta, argValues: [s], apiImpl: this, - hint: hint, ))); return s.stream; } @@ -308,7 +325,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { + Future crateBindingBuyBitcoin({required BuyBitcoinRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_buy_bitcoin_request(req); @@ -321,7 +338,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingBuyBitcoinConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -331,7 +347,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}) { + Future crateBindingCheckMessage({required CheckMessageRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_check_message_request(req); @@ -344,7 +360,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingCheckMessageConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -354,7 +369,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingCloseLspChannels({dynamic hint}) { + Future crateBindingCloseLspChannels() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__close_lsp_channels(port_); @@ -366,7 +381,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingCloseLspChannelsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -376,7 +390,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}) { + Future crateBindingConfigureNode({required ConfigureNodeRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_configure_node_request(req); @@ -389,7 +403,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingConfigureNodeConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -399,7 +412,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingConnect({required ConnectRequest req, dynamic hint}) { + Future crateBindingConnect({required ConnectRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_connect_request(req); @@ -412,7 +425,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingConnectConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -422,7 +434,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingConnectLsp({required String lspId, dynamic hint}) { + Future crateBindingConnectLsp({required String lspId}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(lspId); @@ -435,7 +447,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingConnectLspConstMeta, argValues: [lspId], apiImpl: this, - hint: hint, )); } @@ -446,10 +457,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @override Future crateBindingDefaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) { + {required EnvironmentType envType, required String apiKey, required NodeConfig nodeConfig}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_environment_type(envType); @@ -464,7 +472,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingDefaultConfigConstMeta, argValues: [envType, apiKey, nodeConfig], apiImpl: this, - hint: hint, )); } @@ -474,7 +481,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingDisconnect({dynamic hint}) { + Future crateBindingDisconnect() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__disconnect(port_); @@ -486,7 +493,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingDisconnectConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -496,7 +502,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingExecuteCommand({required String command, dynamic hint}) { + Future crateBindingExecuteCommand({required String command}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(command); @@ -509,7 +515,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingExecuteCommandConstMeta, argValues: [command], apiImpl: this, - hint: hint, )); } @@ -519,7 +524,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingFetchFiatRates({dynamic hint}) { + Future> crateBindingFetchFiatRates() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__fetch_fiat_rates(port_); @@ -531,7 +536,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingFetchFiatRatesConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -541,7 +545,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingFetchLspInfo({required String id, dynamic hint}) { + Future crateBindingFetchLspInfo({required String id}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(id); @@ -554,7 +558,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingFetchLspInfoConstMeta, argValues: [id], apiImpl: this, - hint: hint, )); } @@ -564,8 +567,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingFetchReverseSwapFees( - {required ReverseSwapFeesRequest req, dynamic hint}) { + Future crateBindingFetchReverseSwapFees({required ReverseSwapFeesRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_reverse_swap_fees_request(req); @@ -578,7 +580,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingFetchReverseSwapFeesConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -588,7 +589,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingGenerateDiagnosticData({dynamic hint}) { + Future crateBindingGenerateDiagnosticData() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__generate_diagnostic_data(port_); @@ -600,7 +601,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingGenerateDiagnosticDataConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -610,7 +610,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingInProgressOnchainPayments({dynamic hint}) { + Future> crateBindingInProgressOnchainPayments() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__in_progress_onchain_payments(port_); @@ -622,7 +622,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingInProgressOnchainPaymentsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -632,7 +631,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingInProgressReverseSwaps({dynamic hint}) { + Future> crateBindingInProgressReverseSwaps() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__in_progress_reverse_swaps(port_); @@ -644,7 +643,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingInProgressReverseSwapsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -654,7 +652,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingInProgressSwap({dynamic hint}) { + Future crateBindingInProgressSwap() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__in_progress_swap(port_); @@ -666,7 +664,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingInProgressSwapConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -676,7 +673,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingIsInitialized({dynamic hint}) { + Future crateBindingIsInitialized() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__is_initialized(port_); @@ -688,7 +685,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingIsInitializedConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -698,7 +694,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingListFiatCurrencies({dynamic hint}) { + Future> crateBindingListFiatCurrencies() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__list_fiat_currencies(port_); @@ -710,7 +706,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingListFiatCurrenciesConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -720,7 +715,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingListLsps({dynamic hint}) { + Future> crateBindingListLsps() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__list_lsps(port_); @@ -732,7 +727,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingListLspsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -742,7 +736,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}) { + Future> crateBindingListPayments({required ListPaymentsRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_list_payments_request(req); @@ -755,7 +749,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingListPaymentsConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -765,7 +758,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future> crateBindingListRefundables({dynamic hint}) { + Future> crateBindingListRefundables() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__list_refundables(port_); @@ -777,7 +770,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingListRefundablesConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -787,7 +779,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { + Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); @@ -800,7 +792,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingLnurlAuthConstMeta, argValues: [reqData], apiImpl: this, - hint: hint, )); } @@ -810,7 +801,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}) { + Future crateBindingLnurlPay({required LnUrlPayRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_pay_request(req); @@ -823,7 +814,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingLnurlPayConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -833,7 +823,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { + Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_ln_url_withdraw_request(req); @@ -846,7 +836,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingLnurlWithdrawConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -856,7 +845,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingLspId({dynamic hint}) { + Future crateBindingLspId() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__lsp_id(port_); @@ -868,7 +857,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingLspIdConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -878,7 +866,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingLspInfo({dynamic hint}) { + Future crateBindingLspInfo() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__lsp_info(port_); @@ -890,7 +878,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingLspInfoConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -900,7 +887,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingMaxReverseSwapAmount({dynamic hint}) { + Future crateBindingMaxReverseSwapAmount() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__max_reverse_swap_amount(port_); @@ -912,7 +899,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingMaxReverseSwapAmountConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -922,7 +908,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}) { + Future crateBindingMnemonicToSeed({required String phrase}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(phrase); @@ -935,7 +921,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingMnemonicToSeedConstMeta, argValues: [phrase], apiImpl: this, - hint: hint, )); } @@ -945,7 +930,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingNodeCredentials({dynamic hint}) { + Future crateBindingNodeCredentials() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__node_credentials(port_); @@ -957,7 +942,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingNodeCredentialsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -967,7 +951,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingNodeInfo({dynamic hint}) { + Future crateBindingNodeInfo() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__node_info(port_); @@ -979,7 +963,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingNodeInfoConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -989,7 +972,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingOnchainPaymentLimits({dynamic hint}) { + Future crateBindingOnchainPaymentLimits() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__onchain_payment_limits(port_); @@ -1001,7 +984,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingOnchainPaymentLimitsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -1011,8 +993,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingOpenChannelFee( - {required OpenChannelFeeRequest req, dynamic hint}) { + Future crateBindingOpenChannelFee({required OpenChannelFeeRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_open_channel_fee_request(req); @@ -1025,7 +1006,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingOpenChannelFeeConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1035,7 +1015,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingParseInput({required String input, dynamic hint}) { + Future crateBindingParseInput({required String input}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(input); @@ -1048,7 +1028,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingParseInputConstMeta, argValues: [input], apiImpl: this, - hint: hint, )); } @@ -1058,7 +1037,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingParseInvoice({required String invoice, dynamic hint}) { + Future crateBindingParseInvoice({required String invoice}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(invoice); @@ -1071,7 +1050,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingParseInvoiceConstMeta, argValues: [invoice], apiImpl: this, - hint: hint, )); } @@ -1081,7 +1059,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}) { + Future crateBindingPayOnchain({required PayOnchainRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_pay_onchain_request(req); @@ -1094,7 +1072,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingPayOnchainConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1104,7 +1081,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingPaymentByHash({required String hash, dynamic hint}) { + Future crateBindingPaymentByHash({required String hash}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(hash); @@ -1117,7 +1094,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingPaymentByHashConstMeta, argValues: [hash], apiImpl: this, - hint: hint, )); } @@ -1128,7 +1104,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @override Future crateBindingPrepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) { + {required PrepareOnchainPaymentRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); @@ -1141,7 +1117,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingPrepareOnchainPaymentConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1152,7 +1127,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @override Future crateBindingPrepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { + {required PrepareRedeemOnchainFundsRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); @@ -1165,7 +1140,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingPrepareRedeemOnchainFundsConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1175,7 +1149,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}) { + Future crateBindingPrepareRefund({required PrepareRefundRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_prepare_refund_request(req); @@ -1188,7 +1162,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingPrepareRefundConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1198,7 +1171,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { + Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_receive_onchain_request(req); @@ -1211,7 +1184,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingReceiveOnchainConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1221,8 +1193,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingReceivePayment( - {required ReceivePaymentRequest req, dynamic hint}) { + Future crateBindingReceivePayment({required ReceivePaymentRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_receive_payment_request(req); @@ -1235,7 +1206,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingReceivePaymentConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1245,7 +1215,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingRecommendedFees({dynamic hint}) { + Future crateBindingRecommendedFees() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__recommended_fees(port_); @@ -1257,7 +1227,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRecommendedFeesConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -1268,7 +1237,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @override Future crateBindingRedeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) { + {required RedeemOnchainFundsRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); @@ -1281,7 +1250,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRedeemOnchainFundsConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1291,7 +1259,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}) { + Future crateBindingRedeemSwap({required String swapAddress}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(swapAddress); @@ -1304,7 +1272,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRedeemSwapConstMeta, argValues: [swapAddress], apiImpl: this, - hint: hint, )); } @@ -1314,7 +1281,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingRefund({required RefundRequest req, dynamic hint}) { + Future crateBindingRefund({required RefundRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_refund_request(req); @@ -1327,7 +1294,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRefundConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1337,7 +1303,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}) { + Future crateBindingRegisterWebhook({required String webhookUrl}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(webhookUrl); @@ -1350,7 +1316,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRegisterWebhookConstMeta, argValues: [webhookUrl], apiImpl: this, - hint: hint, )); } @@ -1360,7 +1325,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}) { + Future crateBindingReportIssue({required ReportIssueRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_report_issue_request(req); @@ -1373,7 +1338,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingReportIssueConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1383,7 +1347,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingRescanSwaps({dynamic hint}) { + Future crateBindingRescanSwaps() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__rescan_swaps(port_); @@ -1395,7 +1359,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingRescanSwapsConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -1405,7 +1368,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}) { + Future crateBindingSendOnchain({required SendOnchainRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_onchain_request(req); @@ -1418,7 +1381,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSendOnchainConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1428,7 +1390,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}) { + Future crateBindingSendPayment({required SendPaymentRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_payment_request(req); @@ -1441,7 +1403,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSendPaymentConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1452,7 +1413,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @override Future crateBindingSendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) { + {required SendSpontaneousPaymentRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); @@ -1465,7 +1426,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSendSpontaneousPaymentConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1475,7 +1435,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}) { + Future crateBindingServiceHealthCheck({required String apiKey}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(apiKey); @@ -1488,7 +1448,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingServiceHealthCheckConstMeta, argValues: [apiKey], apiImpl: this, - hint: hint, )); } @@ -1498,8 +1457,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingSetPaymentMetadata( - {required String hash, required String metadata, dynamic hint}) { + Future crateBindingSetPaymentMetadata({required String hash, required String metadata}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(hash); @@ -1513,7 +1471,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSetPaymentMetadataConstMeta, argValues: [hash, metadata], apiImpl: this, - hint: hint, )); } @@ -1523,7 +1480,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}) { + Future crateBindingSignMessage({required SignMessageRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_sign_message_request(req); @@ -1536,7 +1493,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSignMessageConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1546,7 +1502,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}) { + Future crateBindingStaticBackup({required StaticBackupRequest req}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_box_autoadd_static_backup_request(req); @@ -1559,7 +1515,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingStaticBackupConstMeta, argValues: [req], apiImpl: this, - hint: hint, )); } @@ -1569,7 +1524,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingSync({dynamic hint}) { + Future crateBindingSync() { return handler.executeNormal(NormalTask( callFfi: (port_) { return wire.wire__crate__binding__sync(port_); @@ -1581,7 +1536,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingSyncConstMeta, argValues: [], apiImpl: this, - hint: hint, )); } @@ -1591,7 +1545,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); @override - Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}) { + Future crateBindingUnregisterWebhook({required String webhookUrl}) { return handler.executeNormal(NormalTask( callFfi: (port_) { var arg0 = cst_encode_String(webhookUrl); @@ -1604,7 +1558,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements constMeta: kCrateBindingUnregisterWebhookConstMeta, argValues: [webhookUrl], apiImpl: this, - hint: hint, )); } @@ -1686,6 +1639,14 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + BindingEventListener dco_decode_binding_event_listener(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + final arr = raw as List; + if (arr.length != 0) throw Exception('unexpected arr length: expect 0 but see ${arr.length}'); + return BindingEventListener(); + } + @protected BitcoinAddressData dco_decode_bitcoin_address_data(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1724,6 +1685,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_backup_failed_data(raw); } + @protected + BindingEventListener dco_decode_box_autoadd_binding_event_listener(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_binding_event_listener(raw); + } + @protected BitcoinAddressData dco_decode_box_autoadd_bitcoin_address_data(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1736,6 +1703,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return raw as bool; } + @protected + BreezEvent dco_decode_box_autoadd_breez_event(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_breez_event(raw); + } + @protected BuyBitcoinRequest dco_decode_box_autoadd_buy_bitcoin_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3671,6 +3644,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return BackupStatus(backedUp: var_backedUp, lastBackupTime: var_lastBackupTime); } + @protected + BindingEventListener sse_decode_binding_event_listener(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingEventListener(); + } + @protected BitcoinAddressData sse_decode_bitcoin_address_data(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3713,6 +3692,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_backup_failed_data(deserializer)); } + @protected + BindingEventListener sse_decode_box_autoadd_binding_event_listener(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_binding_event_listener(deserializer)); + } + @protected BitcoinAddressData sse_decode_box_autoadd_bitcoin_address_data(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3725,6 +3710,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_bool(deserializer)); } + @protected + BreezEvent sse_decode_box_autoadd_breez_event(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_breez_event(deserializer)); + } + @protected BuyBitcoinRequest sse_decode_box_autoadd_buy_bitcoin_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5921,6 +5912,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case AesSuccessActionDataResult_ErrorStatus(reason: final reason): sse_encode_i_32(1, serializer); sse_encode_String(reason, serializer); + default: + throw UnimplementedError(''); } } @@ -5937,6 +5930,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_box_autoadd_u_64(self.lastBackupTime, serializer); } + @protected + void sse_encode_binding_event_listener(BindingEventListener self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + } + @protected void sse_encode_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5973,6 +5971,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_backup_failed_data(self, serializer); } + @protected + void sse_encode_box_autoadd_binding_event_listener(BindingEventListener self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_binding_event_listener(self, serializer); + } + @protected void sse_encode_box_autoadd_bitcoin_address_data(BitcoinAddressData self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5985,6 +5989,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_bool(self, serializer); } + @protected + void sse_encode_box_autoadd_breez_event(BreezEvent self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_breez_event(self, serializer); + } + @protected void sse_encode_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6336,6 +6346,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case BreezEvent_SwapUpdated(details: final details): sse_encode_i_32(8, serializer); sse_encode_box_autoadd_swap_info(details, serializer); + default: + throw UnimplementedError(''); } } @@ -6509,6 +6521,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case InputType_LnUrlError(data: final data): sse_encode_i_32(7, serializer); sse_encode_box_autoadd_ln_url_error_data(data, serializer); + default: + throw UnimplementedError(''); } } @@ -6740,6 +6754,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case LnUrlCallbackStatus_ErrorStatus(data: final data): sse_encode_i_32(1, serializer); sse_encode_box_autoadd_ln_url_error_data(data, serializer); + default: + throw UnimplementedError(''); } } @@ -6792,6 +6808,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case LnUrlPayResult_PayError(data: final data): sse_encode_i_32(2, serializer); sse_encode_box_autoadd_ln_url_pay_error_data(data, serializer); + default: + throw UnimplementedError(''); } } @@ -6830,6 +6848,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case LnUrlWithdrawResult_ErrorStatus(data: final data): sse_encode_i_32(1, serializer); sse_encode_box_autoadd_ln_url_error_data(data, serializer); + default: + throw UnimplementedError(''); } } @@ -6910,6 +6930,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case NodeConfig_Greenlight(config: final config): sse_encode_i_32(0, serializer); sse_encode_box_autoadd_greenlight_node_config(config, serializer); + default: + throw UnimplementedError(''); } } @@ -6920,6 +6942,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case NodeCredentials_Greenlight(credentials: final credentials): sse_encode_i_32(0, serializer); sse_encode_box_autoadd_greenlight_credentials(credentials, serializer); + default: + throw UnimplementedError(''); } } @@ -7239,6 +7263,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case PaymentDetails_ClosedChannel(data: final data): sse_encode_i_32(1, serializer); sse_encode_box_autoadd_closed_channel_payment_details(data, serializer); + default: + throw UnimplementedError(''); } } @@ -7399,6 +7425,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case ReportIssueRequest_PaymentFailure(data: final data): sse_encode_i_32(0, serializer); sse_encode_box_autoadd_report_payment_failure_details(data, serializer); + default: + throw UnimplementedError(''); } } @@ -7545,6 +7573,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case SuccessActionProcessed_Url(data: final data): sse_encode_i_32(2, serializer); sse_encode_box_autoadd_url_success_action_data(data, serializer); + default: + throw UnimplementedError(''); } } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index a56185b22..b91cbbb11 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // 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 @@ -50,6 +50,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_binding_event_listener( + BindingEventListener raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_binding_event_listener(); + + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_bitcoin_address_data( BitcoinAddressData raw) { @@ -1382,6 +1409,14 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_breez_event(BreezEvent raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_breez_event(); + cst_api_fill_to_wire_breez_event(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_buy_bitcoin_request( BuyBitcoinRequest raw) { @@ -2182,6 +2217,10 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { + cst_api_fill_to_wire_breez_event(apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_buy_bitcoin_request( BuyBitcoinRequest apiObj, ffi.Pointer wireObj) { @@ -3479,6 +3524,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl(); + void wire__crate__binding__binding_event_listener_on_event( + int port_, + ffi.Pointer that, + ffi.Pointer e, + ) { + return _wire__crate__binding__binding_event_listener_on_event( + port_, + that, + e, + ); + } + + late final _wire__crate__binding__binding_event_listener_on_eventPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event'); + late final _wire__crate__binding__binding_event_listener_on_event = + _wire__crate__binding__binding_event_listener_on_eventPtr.asFunction< + void Function( + int, ffi.Pointer, ffi.Pointer)>(); + void wire__crate__binding__breez_events_stream( int port_, ffi.Pointer s, @@ -5130,6 +5206,16 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_backup_failed_data = _cst_new_box_autoadd_backup_failed_dataPtr .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_binding_event_listener() { + return _cst_new_box_autoadd_binding_event_listener(); + } + + late final _cst_new_box_autoadd_binding_event_listenerPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener'); + late final _cst_new_box_autoadd_binding_event_listener = _cst_new_box_autoadd_binding_event_listenerPtr + .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_bitcoin_address_data() { return _cst_new_box_autoadd_bitcoin_address_data(); } @@ -5154,6 +5240,16 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_bool = _cst_new_box_autoadd_boolPtr.asFunction Function(bool)>(); + ffi.Pointer cst_new_box_autoadd_breez_event() { + return _cst_new_box_autoadd_breez_event(); + } + + late final _cst_new_box_autoadd_breez_eventPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_breez_event'); + late final _cst_new_box_autoadd_breez_event = + _cst_new_box_autoadd_breez_eventPtr.asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_buy_bitcoin_request() { return _cst_new_box_autoadd_buy_bitcoin_request(); } @@ -5954,6 +6050,13 @@ typedef DartDartPostCObjectFnTypeFunction = bool Function( typedef DartPort = ffi.Int64; typedef DartDartPort = int; +final class wire_cst_binding_event_listener extends ffi.Opaque {} + +final class wire_cst_BreezEvent_NewBlock extends ffi.Struct { + @ffi.Uint32() + external int block; +} + final class wire_cst_list_prim_u_8_strict extends ffi.Struct { external ffi.Pointer ptr; @@ -5961,720 +6064,771 @@ final class wire_cst_list_prim_u_8_strict extends ffi.Struct { external int len; } -final class wire_cst_opening_fee_params extends ffi.Struct { - @ffi.Uint64() - external int min_msat; +final class wire_cst_aes_success_action_data_decrypted extends ffi.Struct { + external ffi.Pointer description; - @ffi.Uint32() - external int proportional; + external ffi.Pointer plaintext; +} - external ffi.Pointer valid_until; +final class wire_cst_AesSuccessActionDataResult_Decrypted extends ffi.Struct { + external ffi.Pointer data; +} - @ffi.Uint32() - external int max_idle_time; +final class wire_cst_AesSuccessActionDataResult_ErrorStatus extends ffi.Struct { + external ffi.Pointer reason; +} - @ffi.Uint32() - external int max_client_to_self_delay; +final class AesSuccessActionDataResultKind extends ffi.Union { + external wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; - external ffi.Pointer promise; + external wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; } -final class wire_cst_buy_bitcoin_request extends ffi.Struct { +final class wire_cst_aes_success_action_data_result extends ffi.Struct { @ffi.Int32() - external int provider; + external int tag; - external ffi.Pointer opening_fee_params; + external AesSuccessActionDataResultKind kind; } -final class wire_cst_check_message_request extends ffi.Struct { - external ffi.Pointer message; - - external ffi.Pointer pubkey; - - external ffi.Pointer signature; +final class wire_cst_SuccessActionProcessed_Aes extends ffi.Struct { + external ffi.Pointer result; } -final class wire_cst_configure_node_request extends ffi.Struct { - external ffi.Pointer close_to_address; +final class wire_cst_message_success_action_data extends ffi.Struct { + external ffi.Pointer message; } -final class wire_cst_greenlight_credentials extends ffi.Struct { - external ffi.Pointer device_key; - - external ffi.Pointer device_cert; +final class wire_cst_SuccessActionProcessed_Message extends ffi.Struct { + external ffi.Pointer data; } -final class wire_cst_greenlight_node_config extends ffi.Struct { - external ffi.Pointer partner_credentials; +final class wire_cst_url_success_action_data extends ffi.Struct { + external ffi.Pointer description; - external ffi.Pointer invite_code; + external ffi.Pointer url; } -final class wire_cst_NodeConfig_Greenlight extends ffi.Struct { - external ffi.Pointer config; +final class wire_cst_SuccessActionProcessed_Url extends ffi.Struct { + external ffi.Pointer data; } -final class NodeConfigKind extends ffi.Union { - external wire_cst_NodeConfig_Greenlight Greenlight; +final class SuccessActionProcessedKind extends ffi.Union { + external wire_cst_SuccessActionProcessed_Aes Aes; + + external wire_cst_SuccessActionProcessed_Message Message; + + external wire_cst_SuccessActionProcessed_Url Url; } -final class wire_cst_node_config extends ffi.Struct { +final class wire_cst_success_action_processed extends ffi.Struct { @ffi.Int32() external int tag; - external NodeConfigKind kind; + external SuccessActionProcessedKind kind; } -final class wire_cst_config extends ffi.Struct { - external ffi.Pointer breezserver; +final class wire_cst_list_String extends ffi.Struct { + external ffi.Pointer> ptr; - external ffi.Pointer chainnotifier_url; + @ffi.Int32() + external int len; +} - external ffi.Pointer mempoolspace_url; +final class wire_cst_opening_fee_params extends ffi.Struct { + @ffi.Uint64() + external int min_msat; - external ffi.Pointer working_dir; + @ffi.Uint32() + external int proportional; - @ffi.Int32() - external int network; + external ffi.Pointer valid_until; @ffi.Uint32() - external int payment_timeout_sec; + external int max_idle_time; - external ffi.Pointer default_lsp_id; + @ffi.Uint32() + external int max_client_to_self_delay; - external ffi.Pointer api_key; + external ffi.Pointer promise; +} - @ffi.Double() - external double maxfee_percent; +final class wire_cst_swap_info extends ffi.Struct { + external ffi.Pointer bitcoin_address; - @ffi.Uint64() - external int exemptfee_msat; + @ffi.Int64() + external int created_at; - external wire_cst_node_config node_config; -} + @ffi.Int64() + external int lock_height; -final class wire_cst_connect_request extends ffi.Struct { - external wire_cst_config config; + external ffi.Pointer payment_hash; - external ffi.Pointer seed; + external ffi.Pointer preimage; - external ffi.Pointer restore_only; -} + external ffi.Pointer private_key; -final class wire_cst_reverse_swap_fees_request extends ffi.Struct { - external ffi.Pointer send_amount_sat; + external ffi.Pointer public_key; - external ffi.Pointer claim_tx_feerate; -} + external ffi.Pointer swapper_public_key; -final class wire_cst_list_payment_type_filter extends ffi.Struct { - external ffi.Pointer ptr; + external ffi.Pointer script; - @ffi.Int32() - external int len; -} + external ffi.Pointer bolt11; -final class wire_cst_metadata_filter extends ffi.Struct { - external ffi.Pointer json_path; + @ffi.Uint64() + external int paid_msat; - external ffi.Pointer json_value; -} + @ffi.Uint64() + external int total_incoming_txs; -final class wire_cst_list_metadata_filter extends ffi.Struct { - external ffi.Pointer ptr; + @ffi.Uint64() + external int confirmed_sats; + + @ffi.Uint64() + external int unconfirmed_sats; @ffi.Int32() - external int len; -} + external int status; -final class wire_cst_list_payments_request extends ffi.Struct { - external ffi.Pointer filters; + external ffi.Pointer refund_tx_ids; - external ffi.Pointer metadata_filters; + external ffi.Pointer unconfirmed_tx_ids; - external ffi.Pointer from_timestamp; + external ffi.Pointer confirmed_tx_ids; - external ffi.Pointer to_timestamp; + @ffi.Int64() + external int min_allowed_deposit; - external ffi.Pointer include_failures; + @ffi.Int64() + external int max_allowed_deposit; - external ffi.Pointer offset; + @ffi.Int64() + external int max_swapper_payable; - external ffi.Pointer limit; -} + external ffi.Pointer last_redeem_error; -final class wire_cst_ln_url_auth_request_data extends ffi.Struct { - external ffi.Pointer k1; + external ffi.Pointer channel_opening_fees; - external ffi.Pointer action; + external ffi.Pointer confirmed_at; +} - external ffi.Pointer domain; +final class wire_cst_reverse_swap_info extends ffi.Struct { + external ffi.Pointer id; - external ffi.Pointer url; -} + external ffi.Pointer claim_pubkey; -final class wire_cst_ln_url_pay_request_data extends ffi.Struct { - external ffi.Pointer callback; + external ffi.Pointer lockup_txid; - @ffi.Uint64() - external int min_sendable; + external ffi.Pointer claim_txid; @ffi.Uint64() - external int max_sendable; + external int onchain_amount_sat; - external ffi.Pointer metadata_str; + @ffi.Int32() + external int status; +} - @ffi.Uint16() - external int comment_allowed; +final class wire_cst_ln_payment_details extends ffi.Struct { + external ffi.Pointer payment_hash; - external ffi.Pointer domain; + external ffi.Pointer label; - @ffi.Bool() - external bool allows_nostr; + external ffi.Pointer destination_pubkey; - external ffi.Pointer nostr_pubkey; + external ffi.Pointer payment_preimage; + + @ffi.Bool() + external bool keysend; + + external ffi.Pointer bolt11; + + external ffi.Pointer open_channel_bolt11; + + external ffi.Pointer lnurl_success_action; + + external ffi.Pointer lnurl_pay_domain; + + external ffi.Pointer lnurl_pay_comment; external ffi.Pointer ln_address; -} -final class wire_cst_ln_url_pay_request extends ffi.Struct { - external wire_cst_ln_url_pay_request_data data; + external ffi.Pointer lnurl_metadata; - @ffi.Uint64() - external int amount_msat; + external ffi.Pointer lnurl_withdraw_endpoint; - external ffi.Pointer comment; + external ffi.Pointer swap_info; - external ffi.Pointer payment_label; + external ffi.Pointer reverse_swap_info; + + external ffi.Pointer pending_expiration_block; } -final class wire_cst_ln_url_withdraw_request_data extends ffi.Struct { - external ffi.Pointer callback; +final class wire_cst_PaymentDetails_Ln extends ffi.Struct { + external ffi.Pointer data; +} - external ffi.Pointer k1; +final class wire_cst_closed_channel_payment_details extends ffi.Struct { + @ffi.Int32() + external int state; - external ffi.Pointer default_description; + external ffi.Pointer funding_txid; - @ffi.Uint64() - external int min_withdrawable; + external ffi.Pointer short_channel_id; - @ffi.Uint64() - external int max_withdrawable; + external ffi.Pointer closing_txid; } -final class wire_cst_ln_url_withdraw_request extends ffi.Struct { - external wire_cst_ln_url_withdraw_request_data data; +final class wire_cst_PaymentDetails_ClosedChannel extends ffi.Struct { + external ffi.Pointer data; +} - @ffi.Uint64() - external int amount_msat; +final class PaymentDetailsKind extends ffi.Union { + external wire_cst_PaymentDetails_Ln Ln; - external ffi.Pointer description; + external wire_cst_PaymentDetails_ClosedChannel ClosedChannel; } -final class wire_cst_open_channel_fee_request extends ffi.Struct { - external ffi.Pointer amount_msat; +final class wire_cst_payment_details extends ffi.Struct { + @ffi.Int32() + external int tag; - external ffi.Pointer expiry; + external PaymentDetailsKind kind; } -final class wire_cst_prepare_onchain_payment_response extends ffi.Struct { - external ffi.Pointer fees_hash; +final class wire_cst_payment extends ffi.Struct { + external ffi.Pointer id; - @ffi.Double() - external double fees_percentage; + @ffi.Int32() + external int payment_type; - @ffi.Uint64() - external int fees_lockup; + @ffi.Int64() + external int payment_time; @ffi.Uint64() - external int fees_claim; + external int amount_msat; @ffi.Uint64() - external int sender_amount_sat; + external int fee_msat; - @ffi.Uint64() - external int recipient_amount_sat; + @ffi.Int32() + external int status; - @ffi.Uint64() - external int total_fees; -} + external ffi.Pointer error; -final class wire_cst_pay_onchain_request extends ffi.Struct { - external ffi.Pointer recipient_address; + external ffi.Pointer description; - external wire_cst_prepare_onchain_payment_response prepare_res; + external wire_cst_payment_details details; + + external ffi.Pointer metadata; } -final class wire_cst_prepare_onchain_payment_request extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; +final class wire_cst_invoice_paid_details extends ffi.Struct { + external ffi.Pointer payment_hash; - @ffi.Int32() - external int amount_type; + external ffi.Pointer bolt11; - @ffi.Uint32() - external int claim_tx_feerate; + external ffi.Pointer payment; } -final class wire_cst_prepare_redeem_onchain_funds_request extends ffi.Struct { - external ffi.Pointer to_address; +final class wire_cst_BreezEvent_InvoicePaid extends ffi.Struct { + external ffi.Pointer details; +} - @ffi.Uint32() - external int sat_per_vbyte; +final class wire_cst_BreezEvent_PaymentSucceed extends ffi.Struct { + external ffi.Pointer details; } -final class wire_cst_prepare_refund_request extends ffi.Struct { - external ffi.Pointer swap_address; +final class wire_cst_route_hint_hop extends ffi.Struct { + external ffi.Pointer src_node_id; - external ffi.Pointer to_address; + @ffi.Uint64() + external int short_channel_id; @ffi.Uint32() - external int sat_per_vbyte; -} + external int fees_base_msat; -final class wire_cst_receive_onchain_request extends ffi.Struct { - external ffi.Pointer opening_fee_params; -} + @ffi.Uint32() + external int fees_proportional_millionths; -final class wire_cst_receive_payment_request extends ffi.Struct { @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; + external int cltv_expiry_delta; - external ffi.Pointer preimage; + external ffi.Pointer htlc_minimum_msat; - external ffi.Pointer opening_fee_params; + external ffi.Pointer htlc_maximum_msat; +} - external ffi.Pointer use_description_hash; +final class wire_cst_list_route_hint_hop extends ffi.Struct { + external ffi.Pointer ptr; - external ffi.Pointer expiry; + @ffi.Int32() + external int len; +} - external ffi.Pointer cltv; +final class wire_cst_route_hint extends ffi.Struct { + external ffi.Pointer hops; } -final class wire_cst_redeem_onchain_funds_request extends ffi.Struct { - external ffi.Pointer to_address; +final class wire_cst_list_route_hint extends ffi.Struct { + external ffi.Pointer ptr; - @ffi.Uint32() - external int sat_per_vbyte; + @ffi.Int32() + external int len; } -final class wire_cst_refund_request extends ffi.Struct { - external ffi.Pointer swap_address; +final class wire_cst_ln_invoice extends ffi.Struct { + external ffi.Pointer bolt11; - external ffi.Pointer to_address; + @ffi.Int32() + external int network; - @ffi.Uint32() - external int sat_per_vbyte; -} + external ffi.Pointer payee_pubkey; -final class wire_cst_report_payment_failure_details extends ffi.Struct { external ffi.Pointer payment_hash; - external ffi.Pointer comment; -} - -final class wire_cst_ReportIssueRequest_PaymentFailure extends ffi.Struct { - external ffi.Pointer data; -} + external ffi.Pointer description; -final class ReportIssueRequestKind extends ffi.Union { - external wire_cst_ReportIssueRequest_PaymentFailure PaymentFailure; -} + external ffi.Pointer description_hash; -final class wire_cst_report_issue_request extends ffi.Struct { - @ffi.Int32() - external int tag; + external ffi.Pointer amount_msat; - external ReportIssueRequestKind kind; -} + @ffi.Uint64() + external int timestamp; -final class wire_cst_send_onchain_request extends ffi.Struct { @ffi.Uint64() - external int amount_sat; + external int expiry; - external ffi.Pointer onchain_recipient_address; + external ffi.Pointer routing_hints; - external ffi.Pointer pair_hash; + external ffi.Pointer payment_secret; - @ffi.Uint32() - external int sat_per_vbyte; + @ffi.Uint64() + external int min_final_cltv_expiry_delta; } -final class wire_cst_send_payment_request extends ffi.Struct { - external ffi.Pointer bolt11; +final class wire_cst_payment_failed_data extends ffi.Struct { + external ffi.Pointer error; - external ffi.Pointer amount_msat; + external ffi.Pointer node_id; + + external ffi.Pointer invoice; external ffi.Pointer label; } -final class wire_cst_tlv_entry extends ffi.Struct { - @ffi.Uint64() - external int field_number; +final class wire_cst_BreezEvent_PaymentFailed extends ffi.Struct { + external ffi.Pointer details; +} - external ffi.Pointer value; +final class wire_cst_backup_failed_data extends ffi.Struct { + external ffi.Pointer error; } -final class wire_cst_list_tlv_entry extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_BreezEvent_BackupFailed extends ffi.Struct { + external ffi.Pointer details; +} - @ffi.Int32() - external int len; +final class wire_cst_BreezEvent_SwapUpdated extends ffi.Struct { + external ffi.Pointer details; } -final class wire_cst_send_spontaneous_payment_request extends ffi.Struct { - external ffi.Pointer node_id; +final class BreezEventKind extends ffi.Union { + external wire_cst_BreezEvent_NewBlock NewBlock; - @ffi.Uint64() - external int amount_msat; + external wire_cst_BreezEvent_InvoicePaid InvoicePaid; - external ffi.Pointer extra_tlvs; + external wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; - external ffi.Pointer label; -} + external wire_cst_BreezEvent_PaymentFailed PaymentFailed; -final class wire_cst_sign_message_request extends ffi.Struct { - external ffi.Pointer message; + external wire_cst_BreezEvent_BackupFailed BackupFailed; + + external wire_cst_BreezEvent_SwapUpdated SwapUpdated; } -final class wire_cst_static_backup_request extends ffi.Struct { - external ffi.Pointer working_dir; +final class wire_cst_breez_event extends ffi.Struct { + @ffi.Int32() + external int tag; + + external BreezEventKind kind; } -final class wire_cst_aes_success_action_data_decrypted extends ffi.Struct { - external ffi.Pointer description; +final class wire_cst_buy_bitcoin_request extends ffi.Struct { + @ffi.Int32() + external int provider; - external ffi.Pointer plaintext; + external ffi.Pointer opening_fee_params; } -final class wire_cst_AesSuccessActionDataResult_Decrypted extends ffi.Struct { - external ffi.Pointer data; +final class wire_cst_check_message_request extends ffi.Struct { + external ffi.Pointer message; + + external ffi.Pointer pubkey; + + external ffi.Pointer signature; } -final class wire_cst_AesSuccessActionDataResult_ErrorStatus extends ffi.Struct { - external ffi.Pointer reason; +final class wire_cst_configure_node_request extends ffi.Struct { + external ffi.Pointer close_to_address; } -final class AesSuccessActionDataResultKind extends ffi.Union { - external wire_cst_AesSuccessActionDataResult_Decrypted Decrypted; +final class wire_cst_greenlight_credentials extends ffi.Struct { + external ffi.Pointer device_key; - external wire_cst_AesSuccessActionDataResult_ErrorStatus ErrorStatus; + external ffi.Pointer device_cert; } -final class wire_cst_aes_success_action_data_result extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_greenlight_node_config extends ffi.Struct { + external ffi.Pointer partner_credentials; - external AesSuccessActionDataResultKind kind; + external ffi.Pointer invite_code; } -final class wire_cst_backup_failed_data extends ffi.Struct { - external ffi.Pointer error; +final class wire_cst_NodeConfig_Greenlight extends ffi.Struct { + external ffi.Pointer config; } -final class wire_cst_bitcoin_address_data extends ffi.Struct { - external ffi.Pointer address; +final class NodeConfigKind extends ffi.Union { + external wire_cst_NodeConfig_Greenlight Greenlight; +} +final class wire_cst_node_config extends ffi.Struct { @ffi.Int32() - external int network; + external int tag; - external ffi.Pointer amount_sat; + external NodeConfigKind kind; +} - external ffi.Pointer label; +final class wire_cst_config extends ffi.Struct { + external ffi.Pointer breezserver; - external ffi.Pointer message; -} + external ffi.Pointer chainnotifier_url; + + external ffi.Pointer mempoolspace_url; + + external ffi.Pointer working_dir; -final class wire_cst_closed_channel_payment_details extends ffi.Struct { @ffi.Int32() - external int state; + external int network; - external ffi.Pointer funding_txid; + @ffi.Uint32() + external int payment_timeout_sec; - external ffi.Pointer short_channel_id; + external ffi.Pointer default_lsp_id; - external ffi.Pointer closing_txid; -} + external ffi.Pointer api_key; -final class wire_cst_SuccessActionProcessed_Aes extends ffi.Struct { - external ffi.Pointer result; -} + @ffi.Double() + external double maxfee_percent; -final class wire_cst_message_success_action_data extends ffi.Struct { - external ffi.Pointer message; -} + @ffi.Uint64() + external int exemptfee_msat; -final class wire_cst_SuccessActionProcessed_Message extends ffi.Struct { - external ffi.Pointer data; + external wire_cst_node_config node_config; } -final class wire_cst_url_success_action_data extends ffi.Struct { - external ffi.Pointer description; +final class wire_cst_connect_request extends ffi.Struct { + external wire_cst_config config; - external ffi.Pointer url; -} + external ffi.Pointer seed; -final class wire_cst_SuccessActionProcessed_Url extends ffi.Struct { - external ffi.Pointer data; + external ffi.Pointer restore_only; } -final class SuccessActionProcessedKind extends ffi.Union { - external wire_cst_SuccessActionProcessed_Aes Aes; - - external wire_cst_SuccessActionProcessed_Message Message; +final class wire_cst_reverse_swap_fees_request extends ffi.Struct { + external ffi.Pointer send_amount_sat; - external wire_cst_SuccessActionProcessed_Url Url; + external ffi.Pointer claim_tx_feerate; } -final class wire_cst_success_action_processed extends ffi.Struct { +final class wire_cst_list_payment_type_filter extends ffi.Struct { + external ffi.Pointer ptr; + @ffi.Int32() - external int tag; + external int len; +} - external SuccessActionProcessedKind kind; +final class wire_cst_metadata_filter extends ffi.Struct { + external ffi.Pointer json_path; + + external ffi.Pointer json_value; } -final class wire_cst_list_String extends ffi.Struct { - external ffi.Pointer> ptr; +final class wire_cst_list_metadata_filter extends ffi.Struct { + external ffi.Pointer ptr; @ffi.Int32() external int len; } -final class wire_cst_swap_info extends ffi.Struct { - external ffi.Pointer bitcoin_address; +final class wire_cst_list_payments_request extends ffi.Struct { + external ffi.Pointer filters; - @ffi.Int64() - external int created_at; + external ffi.Pointer metadata_filters; - @ffi.Int64() - external int lock_height; + external ffi.Pointer from_timestamp; - external ffi.Pointer payment_hash; + external ffi.Pointer to_timestamp; - external ffi.Pointer preimage; + external ffi.Pointer include_failures; - external ffi.Pointer private_key; + external ffi.Pointer offset; - external ffi.Pointer public_key; + external ffi.Pointer limit; +} - external ffi.Pointer swapper_public_key; +final class wire_cst_ln_url_auth_request_data extends ffi.Struct { + external ffi.Pointer k1; - external ffi.Pointer script; + external ffi.Pointer action; - external ffi.Pointer bolt11; + external ffi.Pointer domain; - @ffi.Uint64() - external int paid_msat; + external ffi.Pointer url; +} - @ffi.Uint64() - external int total_incoming_txs; +final class wire_cst_ln_url_pay_request_data extends ffi.Struct { + external ffi.Pointer callback; @ffi.Uint64() - external int confirmed_sats; + external int min_sendable; @ffi.Uint64() - external int unconfirmed_sats; + external int max_sendable; - @ffi.Int32() - external int status; + external ffi.Pointer metadata_str; - external ffi.Pointer refund_tx_ids; + @ffi.Uint16() + external int comment_allowed; - external ffi.Pointer unconfirmed_tx_ids; + external ffi.Pointer domain; - external ffi.Pointer confirmed_tx_ids; + @ffi.Bool() + external bool allows_nostr; - @ffi.Int64() - external int min_allowed_deposit; + external ffi.Pointer nostr_pubkey; - @ffi.Int64() - external int max_allowed_deposit; + external ffi.Pointer ln_address; +} - @ffi.Int64() - external int max_swapper_payable; +final class wire_cst_ln_url_pay_request extends ffi.Struct { + external wire_cst_ln_url_pay_request_data data; - external ffi.Pointer last_redeem_error; + @ffi.Uint64() + external int amount_msat; - external ffi.Pointer channel_opening_fees; + external ffi.Pointer comment; - external ffi.Pointer confirmed_at; + external ffi.Pointer payment_label; } -final class wire_cst_reverse_swap_info extends ffi.Struct { - external ffi.Pointer id; - - external ffi.Pointer claim_pubkey; +final class wire_cst_ln_url_withdraw_request_data extends ffi.Struct { + external ffi.Pointer callback; - external ffi.Pointer lockup_txid; + external ffi.Pointer k1; - external ffi.Pointer claim_txid; + external ffi.Pointer default_description; @ffi.Uint64() - external int onchain_amount_sat; + external int min_withdrawable; - @ffi.Int32() - external int status; + @ffi.Uint64() + external int max_withdrawable; } -final class wire_cst_ln_payment_details extends ffi.Struct { - external ffi.Pointer payment_hash; - - external ffi.Pointer label; - - external ffi.Pointer destination_pubkey; - - external ffi.Pointer payment_preimage; - - @ffi.Bool() - external bool keysend; +final class wire_cst_ln_url_withdraw_request extends ffi.Struct { + external wire_cst_ln_url_withdraw_request_data data; - external ffi.Pointer bolt11; + @ffi.Uint64() + external int amount_msat; - external ffi.Pointer open_channel_bolt11; + external ffi.Pointer description; +} - external ffi.Pointer lnurl_success_action; +final class wire_cst_open_channel_fee_request extends ffi.Struct { + external ffi.Pointer amount_msat; - external ffi.Pointer lnurl_pay_domain; + external ffi.Pointer expiry; +} - external ffi.Pointer lnurl_pay_comment; +final class wire_cst_prepare_onchain_payment_response extends ffi.Struct { + external ffi.Pointer fees_hash; - external ffi.Pointer ln_address; + @ffi.Double() + external double fees_percentage; - external ffi.Pointer lnurl_metadata; + @ffi.Uint64() + external int fees_lockup; - external ffi.Pointer lnurl_withdraw_endpoint; + @ffi.Uint64() + external int fees_claim; - external ffi.Pointer swap_info; + @ffi.Uint64() + external int sender_amount_sat; - external ffi.Pointer reverse_swap_info; + @ffi.Uint64() + external int recipient_amount_sat; - external ffi.Pointer pending_expiration_block; + @ffi.Uint64() + external int total_fees; } -final class wire_cst_PaymentDetails_Ln extends ffi.Struct { - external ffi.Pointer data; -} +final class wire_cst_pay_onchain_request extends ffi.Struct { + external ffi.Pointer recipient_address; -final class wire_cst_PaymentDetails_ClosedChannel extends ffi.Struct { - external ffi.Pointer data; + external wire_cst_prepare_onchain_payment_response prepare_res; } -final class PaymentDetailsKind extends ffi.Union { - external wire_cst_PaymentDetails_Ln Ln; +final class wire_cst_prepare_onchain_payment_request extends ffi.Struct { + @ffi.Uint64() + external int amount_sat; - external wire_cst_PaymentDetails_ClosedChannel ClosedChannel; + @ffi.Int32() + external int amount_type; + + @ffi.Uint32() + external int claim_tx_feerate; } -final class wire_cst_payment_details extends ffi.Struct { - @ffi.Int32() - external int tag; +final class wire_cst_prepare_redeem_onchain_funds_request extends ffi.Struct { + external ffi.Pointer to_address; - external PaymentDetailsKind kind; + @ffi.Uint32() + external int sat_per_vbyte; } -final class wire_cst_payment extends ffi.Struct { - external ffi.Pointer id; +final class wire_cst_prepare_refund_request extends ffi.Struct { + external ffi.Pointer swap_address; - @ffi.Int32() - external int payment_type; + external ffi.Pointer to_address; - @ffi.Int64() - external int payment_time; + @ffi.Uint32() + external int sat_per_vbyte; +} +final class wire_cst_receive_onchain_request extends ffi.Struct { + external ffi.Pointer opening_fee_params; +} + +final class wire_cst_receive_payment_request extends ffi.Struct { @ffi.Uint64() external int amount_msat; - @ffi.Uint64() - external int fee_msat; + external ffi.Pointer description; - @ffi.Int32() - external int status; + external ffi.Pointer preimage; - external ffi.Pointer error; + external ffi.Pointer opening_fee_params; - external ffi.Pointer description; + external ffi.Pointer use_description_hash; - external wire_cst_payment_details details; + external ffi.Pointer expiry; - external ffi.Pointer metadata; + external ffi.Pointer cltv; } -final class wire_cst_invoice_paid_details extends ffi.Struct { - external ffi.Pointer payment_hash; - - external ffi.Pointer bolt11; +final class wire_cst_redeem_onchain_funds_request extends ffi.Struct { + external ffi.Pointer to_address; - external ffi.Pointer payment; + @ffi.Uint32() + external int sat_per_vbyte; } -final class wire_cst_route_hint_hop extends ffi.Struct { - external ffi.Pointer src_node_id; +final class wire_cst_refund_request extends ffi.Struct { + external ffi.Pointer swap_address; - @ffi.Uint64() - external int short_channel_id; + external ffi.Pointer to_address; @ffi.Uint32() - external int fees_base_msat; + external int sat_per_vbyte; +} - @ffi.Uint32() - external int fees_proportional_millionths; +final class wire_cst_report_payment_failure_details extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer comment; +} + +final class wire_cst_ReportIssueRequest_PaymentFailure extends ffi.Struct { + external ffi.Pointer data; +} + +final class ReportIssueRequestKind extends ffi.Union { + external wire_cst_ReportIssueRequest_PaymentFailure PaymentFailure; +} + +final class wire_cst_report_issue_request extends ffi.Struct { + @ffi.Int32() + external int tag; + + external ReportIssueRequestKind kind; +} +final class wire_cst_send_onchain_request extends ffi.Struct { @ffi.Uint64() - external int cltv_expiry_delta; + external int amount_sat; - external ffi.Pointer htlc_minimum_msat; + external ffi.Pointer onchain_recipient_address; - external ffi.Pointer htlc_maximum_msat; + external ffi.Pointer pair_hash; + + @ffi.Uint32() + external int sat_per_vbyte; } -final class wire_cst_list_route_hint_hop extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_send_payment_request extends ffi.Struct { + external ffi.Pointer bolt11; - @ffi.Int32() - external int len; + external ffi.Pointer amount_msat; + + external ffi.Pointer label; } -final class wire_cst_route_hint extends ffi.Struct { - external ffi.Pointer hops; +final class wire_cst_tlv_entry extends ffi.Struct { + @ffi.Uint64() + external int field_number; + + external ffi.Pointer value; } -final class wire_cst_list_route_hint extends ffi.Struct { - external ffi.Pointer ptr; +final class wire_cst_list_tlv_entry extends ffi.Struct { + external ffi.Pointer ptr; @ffi.Int32() external int len; } -final class wire_cst_ln_invoice extends ffi.Struct { - external ffi.Pointer bolt11; - - @ffi.Int32() - external int network; +final class wire_cst_send_spontaneous_payment_request extends ffi.Struct { + external ffi.Pointer node_id; - external ffi.Pointer payee_pubkey; + @ffi.Uint64() + external int amount_msat; - external ffi.Pointer payment_hash; + external ffi.Pointer extra_tlvs; - external ffi.Pointer description; + external ffi.Pointer label; +} - external ffi.Pointer description_hash; +final class wire_cst_sign_message_request extends ffi.Struct { + external ffi.Pointer message; +} - external ffi.Pointer amount_msat; +final class wire_cst_static_backup_request extends ffi.Struct { + external ffi.Pointer working_dir; +} - @ffi.Uint64() - external int timestamp; +final class wire_cst_bitcoin_address_data extends ffi.Struct { + external ffi.Pointer address; - @ffi.Uint64() - external int expiry; + @ffi.Int32() + external int network; - external ffi.Pointer routing_hints; + external ffi.Pointer amount_sat; - external ffi.Pointer payment_secret; + external ffi.Pointer label; - @ffi.Uint64() - external int min_final_cltv_expiry_delta; + external ffi.Pointer message; } final class wire_cst_ln_url_error_data extends ffi.Struct { @@ -6751,16 +6905,6 @@ final class wire_cst_node_credentials extends ffi.Struct { external NodeCredentialsKind kind; } -final class wire_cst_payment_failed_data extends ffi.Struct { - external ffi.Pointer error; - - external ffi.Pointer node_id; - - external ffi.Pointer invoice; - - external ffi.Pointer label; -} - final class wire_cst_symbol extends ffi.Struct { external ffi.Pointer grapheme; @@ -6900,52 +7044,6 @@ final class wire_cst_backup_status extends ffi.Struct { external ffi.Pointer last_backup_time; } -final class wire_cst_BreezEvent_NewBlock extends ffi.Struct { - @ffi.Uint32() - external int block; -} - -final class wire_cst_BreezEvent_InvoicePaid extends ffi.Struct { - external ffi.Pointer details; -} - -final class wire_cst_BreezEvent_PaymentSucceed extends ffi.Struct { - external ffi.Pointer details; -} - -final class wire_cst_BreezEvent_PaymentFailed extends ffi.Struct { - external ffi.Pointer details; -} - -final class wire_cst_BreezEvent_BackupFailed extends ffi.Struct { - external ffi.Pointer details; -} - -final class wire_cst_BreezEvent_SwapUpdated extends ffi.Struct { - external ffi.Pointer details; -} - -final class BreezEventKind extends ffi.Union { - external wire_cst_BreezEvent_NewBlock NewBlock; - - external wire_cst_BreezEvent_InvoicePaid InvoicePaid; - - external wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; - - external wire_cst_BreezEvent_PaymentFailed PaymentFailed; - - external wire_cst_BreezEvent_BackupFailed BackupFailed; - - external wire_cst_BreezEvent_SwapUpdated SwapUpdated; -} - -final class wire_cst_breez_event extends ffi.Struct { - @ffi.Int32() - external int tag; - - external BreezEventKind kind; -} - final class wire_cst_buy_bitcoin_response extends ffi.Struct { external ffi.Pointer url; diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart index 1f16f57ac..6ef7a6d86 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart index 86d563b77..9c4f0f619 100644 --- a/libs/sdk-flutter/lib/generated/invoice.dart +++ b/libs/sdk-flutter/lib/generated/invoice.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart index b4cae1ec0..fef64de78 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index 09379d413..181d6a730 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index da93a18b3..b25812804 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 0aa621c93..ece1b3833 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.36 + cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.38 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate diff --git a/tools/sdk-cli/Cargo.lock b/tools/sdk-cli/Cargo.lock index 6223d9895..6ae72d386 100644 --- a/tools/sdk-cli/Cargo.lock +++ b/tools/sdk-cli/Cargo.lock @@ -115,14 +115,13 @@ dependencies = [ [[package]] name = "allo-isolate" -version = "0.1.20" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b7997817c178b853573e8bdfb6c3afe02810b43f17d766d6703560074b0c3" +checksum = "1f67642eb6773fb42a95dd3b348c305ee18dee6642274c6b412d67e985e3befc" dependencies = [ "anyhow", "atomic", "backtrace", - "chrono", ] [[package]] @@ -131,6 +130,24 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +[[package]] +name = "android_log-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ecc8056bf6ab9892dcd53216c83d1597487d7dacac16c8df6b877d127df9937" + +[[package]] +name = "android_logger" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c494134f746c14dc653a35a4ea5aca24ac368529da5370ecf41fe0341c35772f" +dependencies = [ + "android_log-sys", + "env_logger 0.10.0", + "log", + "once_cell", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -898,20 +915,41 @@ dependencies = [ ] [[package]] -name = "dart-sys" -version = "4.0.2" +name = "dart-sys-fork" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d8b5680b5c2cc52f50acb2457d9b3a3b58adcca785db13a0e3655626f601de6" +checksum = "933dafff26172b719bb9695dd3715a1e7792f62dcdc8a5d4c740db7e0fedee8b" dependencies = [ "cc", ] +[[package]] +name = "dashmap" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" +dependencies = [ + "cfg-if", + "num_cpus", +] + [[package]] name = "data-encoding" version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +[[package]] +name = "delegate-attr" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51aac4c99b2e6775164b412ea33ae8441b2fde2dbf05a20bc0052a63d08c475b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "der" version = "0.7.9" @@ -1126,35 +1164,45 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.6" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" +checksum = "2f052ec223b70cbdf2248376a9ad5af9281b3fdf8ea3c7d3f66fff52a9aaf1fa" dependencies = [ "allo-isolate", + "android_logger", "anyhow", - "backtrace", "build-target", "bytemuck", - "cc", - "chrono", + "byteorder", "console_error_panic_hook", - "dart-sys", + "dart-sys-fork", + "delegate-attr", "flutter_rust_bridge_macros", + "futures", "js-sys", "lazy_static", - "libc", "log", - "parking_lot", + "oslog", + "portable-atomic", "threadpool", + "tokio", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "flutter_rust_bridge_macros" -version = "1.77.1" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a493ab6d382cb8ab292dd073f564d66b66edb7051bcb8215a6407b8716b9b992" +checksum = "23414fe526f51870c6d89d27bbffbee52ebe0900164a4147b32caf1d3e131682" +dependencies = [ + "hex", + "md-5", + "proc-macro2", + "quote", + "syn 2.0.48", +] [[package]] name = "fnv" @@ -1468,9 +1516,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1568,7 +1616,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1691,7 +1739,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.9", "libc", "windows-sys 0.48.0", ] @@ -1708,7 +1756,7 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.9", "io-lifetimes", "rustix 0.37.27", "windows-sys 0.48.0", @@ -1731,9 +1779,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1883,6 +1931,16 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.5.0" @@ -1912,13 +1970,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2177,6 +2236,17 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "oslog" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8343ce955f18e7e68c0207dd0ea776ec453035685395ababd2ea651c569728b3" +dependencies = [ + "cc", + "dashmap", + "log", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2379,9 +2449,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2430,6 +2500,12 @@ dependencies = [ "universal-hash 0.5.1", ] +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "powerfmt" version = "0.2.0" @@ -3287,6 +3363,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3509,21 +3595,20 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.7", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -3538,9 +3623,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", @@ -3955,19 +4040,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -3980,9 +4066,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3992,9 +4078,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4002,9 +4088,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -4015,9 +4101,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" From f6d15446bdb682f128cf6f747c6890b9ed45d98b Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Fri, 21 Jun 2024 16:17:38 +0300 Subject: [PATCH 14/23] Bump flutter_rust_bridge to 2.0.0 --- libs/sdk-core/src/frb_generated.io.rs | 4 +- libs/sdk-core/src/frb_generated.rs | 612 +++++++++++++++--- libs/sdk-flutter/README.md | 2 +- libs/sdk-flutter/lib/generated/binding.dart | 3 +- .../lib/generated/breez_services.dart | 2 +- libs/sdk-flutter/lib/generated/chain.dart | 2 +- libs/sdk-flutter/lib/generated/fiat.dart | 2 +- .../lib/generated/frb_generated.dart | 16 +- .../lib/generated/frb_generated.io.dart | 19 +- .../lib/generated/input_parser.dart | 2 +- libs/sdk-flutter/lib/generated/invoice.dart | 2 +- .../lib/generated/lnurl/pay/model.dart | 2 +- libs/sdk-flutter/lib/generated/lsp.dart | 2 +- libs/sdk-flutter/lib/generated/models.dart | 2 +- libs/sdk-flutter/makefile | 2 +- 15 files changed, 555 insertions(+), 119 deletions(-) diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index e83f3a799..93d33f079 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -1,12 +1,12 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // Section: imports use super::*; use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable}; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 94679685f..3c1e6ef8a 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. #![allow( non_camel_case_types, @@ -16,14 +16,18 @@ clippy::too_many_arguments, clippy::match_single_binding, clippy::clone_on_copy, - clippy::let_unit_value + clippy::let_unit_value, + clippy::deref_addrof, + clippy::explicit_auto_deref, + clippy::borrow_deref_ref, + clippy::needless_borrow )] // Section: imports use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; -use flutter_rust_bridge::for_generated::{transform_result_dco, Lockable}; +use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; use flutter_rust_bridge::{Handler, IntoIntoDart}; // Section: boilerplate @@ -33,7 +37,7 @@ 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-dev.38"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 847148110; // Section: executor @@ -49,7 +53,16 @@ fn wire__crate__binding__backup_impl(port_: flutter_rust_bridge::for_generated:: port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::backup())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::backup()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__backup_status_impl( @@ -61,7 +74,16 @@ fn wire__crate__binding__backup_status_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::backup_status())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::backup_status()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__binding_event_listener_on_event_impl( @@ -79,10 +101,11 @@ fn wire__crate__binding__binding_event_listener_on_event_impl( let api_that = that.cst_decode(); let api_e = e.cst_decode(); move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok({ + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok({ crate::binding::BindingEventListener::on_event(&api_that, api_e); - }) + })?; + Ok(output_ok) })()) } }, @@ -103,7 +126,12 @@ fn wire__crate__binding__breez_events_stream_impl( move || { let api_s = s.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::breez_events_stream(api_s))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::breez_events_stream(api_s)?; + Ok(output_ok) + })(), + ) } }, ) @@ -120,7 +148,14 @@ fn wire__crate__binding__breez_log_stream_impl( }, move || { let api_s = s.cst_decode(); - move |context| transform_result_dco((move || crate::binding::breez_log_stream(api_s))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::breez_log_stream(api_s)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -136,7 +171,14 @@ fn wire__crate__binding__buy_bitcoin_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::buy_bitcoin(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::buy_bitcoin(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -152,7 +194,14 @@ fn wire__crate__binding__check_message_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::check_message(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::check_message(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -166,7 +215,14 @@ fn wire__crate__binding__close_lsp_channels_impl( mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - move |context| transform_result_dco((move || crate::binding::close_lsp_channels())()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::close_lsp_channels()?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -182,7 +238,14 @@ fn wire__crate__binding__configure_node_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::configure_node(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::configure_node(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -198,7 +261,14 @@ fn wire__crate__binding__connect_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::connect(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::connect(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -214,7 +284,14 @@ fn wire__crate__binding__connect_lsp_impl( }, move || { let api_lsp_id = lsp_id.cst_decode(); - move |context| transform_result_dco((move || crate::binding::connect_lsp(api_lsp_id))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::connect_lsp(api_lsp_id)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -235,12 +312,13 @@ fn wire__crate__binding__default_config_impl( let api_api_key = api_key.cst_decode(); let api_node_config = node_config.cst_decode(); move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::binding::default_config( + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::binding::default_config( api_env_type, api_api_key, api_node_config, - )) + ))?; + Ok(output_ok) })()) } }, @@ -253,7 +331,16 @@ fn wire__crate__binding__disconnect_impl(port_: flutter_rust_bridge::for_generat port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::disconnect())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::disconnect()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__execute_command_impl( @@ -269,7 +356,12 @@ fn wire__crate__binding__execute_command_impl( move || { let api_command = command.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::execute_command(api_command))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::execute_command(api_command)?; + Ok(output_ok) + })(), + ) } }, ) @@ -283,7 +375,16 @@ fn wire__crate__binding__fetch_fiat_rates_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::fetch_fiat_rates())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::fetch_fiat_rates()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__fetch_lsp_info_impl( @@ -298,7 +399,14 @@ fn wire__crate__binding__fetch_lsp_info_impl( }, move || { let api_id = id.cst_decode(); - move |context| transform_result_dco((move || crate::binding::fetch_lsp_info(api_id))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::fetch_lsp_info(api_id)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -315,7 +423,12 @@ fn wire__crate__binding__fetch_reverse_swap_fees_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::fetch_reverse_swap_fees(api_req))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::fetch_reverse_swap_fees(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -331,7 +444,12 @@ fn wire__crate__binding__generate_diagnostic_data_impl( }, move || { move |context| { - transform_result_dco((move || crate::binding::generate_diagnostic_data())()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::generate_diagnostic_data()?; + Ok(output_ok) + })(), + ) } }, ) @@ -347,7 +465,12 @@ fn wire__crate__binding__in_progress_onchain_payments_impl( }, move || { move |context| { - transform_result_dco((move || crate::binding::in_progress_onchain_payments())()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::in_progress_onchain_payments()?; + Ok(output_ok) + })(), + ) } }, ) @@ -363,7 +486,12 @@ fn wire__crate__binding__in_progress_reverse_swaps_impl( }, move || { move |context| { - transform_result_dco((move || crate::binding::in_progress_reverse_swaps())()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::in_progress_reverse_swaps()?; + Ok(output_ok) + })(), + ) } }, ) @@ -377,7 +505,16 @@ fn wire__crate__binding__in_progress_swap_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::in_progress_swap())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::in_progress_swap()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__is_initialized_impl( @@ -391,8 +528,9 @@ fn wire__crate__binding__is_initialized_impl( }, move || { move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::binding::is_initialized()) + transform_result_dco::<_, _, ()>((move || { + let output_ok = Result::<_, ()>::Ok(crate::binding::is_initialized())?; + Ok(output_ok) })()) } }, @@ -408,7 +546,14 @@ fn wire__crate__binding__list_fiat_currencies_impl( mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - move |context| transform_result_dco((move || crate::binding::list_fiat_currencies())()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::list_fiat_currencies()?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -419,7 +564,16 @@ fn wire__crate__binding__list_lsps_impl(port_: flutter_rust_bridge::for_generate port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::list_lsps())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::list_lsps()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__list_payments_impl( @@ -434,7 +588,14 @@ fn wire__crate__binding__list_payments_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::list_payments(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::list_payments(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -447,18 +608,40 @@ fn wire__crate__binding__list_refundables_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::list_refundables())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::list_refundables()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__lnurl_auth_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req_data: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "lnurl_auth", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req_data = req_data.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::lnurl_auth(api_req_data) - })()) - } }) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "lnurl_auth", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req_data = req_data.cst_decode(); + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::lnurl_auth(api_req_data)?; + Ok(output_ok) + })(), + ) + } + }, + ) } fn wire__crate__binding__lnurl_pay_impl( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -472,7 +655,14 @@ fn wire__crate__binding__lnurl_pay_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::lnurl_pay(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::lnurl_pay(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -488,7 +678,14 @@ fn wire__crate__binding__lnurl_withdraw_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::lnurl_withdraw(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::lnurl_withdraw(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -499,7 +696,16 @@ fn wire__crate__binding__lsp_id_impl(port_: flutter_rust_bridge::for_generated:: port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::lsp_id())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::lsp_id()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { @@ -509,7 +715,16 @@ fn wire__crate__binding__lsp_info_impl(port_: flutter_rust_bridge::for_generated port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::lsp_info())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::lsp_info()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__max_reverse_swap_amount_impl( @@ -523,7 +738,12 @@ fn wire__crate__binding__max_reverse_swap_amount_impl( }, move || { move |context| { - transform_result_dco((move || crate::binding::max_reverse_swap_amount())()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::max_reverse_swap_amount()?; + Ok(output_ok) + })(), + ) } }, ) @@ -541,7 +761,12 @@ fn wire__crate__binding__mnemonic_to_seed_impl( move || { let api_phrase = phrase.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::mnemonic_to_seed(api_phrase))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::mnemonic_to_seed(api_phrase)?; + Ok(output_ok) + })(), + ) } }, ) @@ -555,7 +780,16 @@ fn wire__crate__binding__node_credentials_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::node_credentials())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::node_credentials()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { @@ -565,17 +799,38 @@ fn wire__crate__binding__node_info_impl(port_: flutter_rust_bridge::for_generate port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::node_info())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::node_info()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__onchain_payment_limits_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { move |context| { - transform_result_dco((move || { - crate::binding::onchain_payment_limits() - })()) - } }) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "onchain_payment_limits", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::onchain_payment_limits()?; + Ok(output_ok) + })(), + ) + } + }, + ) } fn wire__crate__binding__open_channel_fee_impl( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -590,7 +845,12 @@ fn wire__crate__binding__open_channel_fee_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::open_channel_fee(api_req))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::open_channel_fee(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -607,7 +867,14 @@ fn wire__crate__binding__parse_input_impl( }, move || { let api_input = input.cst_decode(); - move |context| transform_result_dco((move || crate::binding::parse_input(api_input))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::parse_input(api_input)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -624,7 +891,12 @@ fn wire__crate__binding__parse_invoice_impl( move || { let api_invoice = invoice.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::parse_invoice(api_invoice))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::parse_invoice(api_invoice)?; + Ok(output_ok) + })(), + ) } }, ) @@ -641,7 +913,14 @@ fn wire__crate__binding__pay_onchain_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::pay_onchain(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::pay_onchain(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -658,7 +937,12 @@ fn wire__crate__binding__payment_by_hash_impl( move || { let api_hash = hash.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::payment_by_hash(api_hash))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::payment_by_hash(api_hash)?; + Ok(output_ok) + })(), + ) } }, ) @@ -676,7 +960,12 @@ fn wire__crate__binding__prepare_onchain_payment_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::prepare_onchain_payment(api_req))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::prepare_onchain_payment(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -694,9 +983,12 @@ fn wire__crate__binding__prepare_redeem_onchain_funds_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::prepare_redeem_onchain_funds(api_req) - })()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::prepare_redeem_onchain_funds(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -713,7 +1005,14 @@ fn wire__crate__binding__prepare_refund_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::prepare_refund(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::prepare_refund(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -721,21 +1020,47 @@ fn wire__crate__binding__receive_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::receive_onchain(api_req) - })()) - } }) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "receive_onchain", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::receive_onchain(api_req)?; + Ok(output_ok) + })(), + ) + } + }, + ) } fn wire__crate__binding__receive_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::receive_payment(api_req) - })()) - } }) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "receive_payment", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_req = req.cst_decode(); + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::receive_payment(api_req)?; + Ok(output_ok) + })(), + ) + } + }, + ) } fn wire__crate__binding__recommended_fees_impl( port_: flutter_rust_bridge::for_generated::MessagePort, @@ -746,7 +1071,16 @@ fn wire__crate__binding__recommended_fees_impl( port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::recommended_fees())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::recommended_fees()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__redeem_onchain_funds_impl( @@ -762,7 +1096,12 @@ fn wire__crate__binding__redeem_onchain_funds_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::redeem_onchain_funds(api_req))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::redeem_onchain_funds(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -780,7 +1119,12 @@ fn wire__crate__binding__redeem_swap_impl( move || { let api_swap_address = swap_address.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::redeem_swap(api_swap_address))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::redeem_swap(api_swap_address)?; + Ok(output_ok) + })(), + ) } }, ) @@ -797,7 +1141,14 @@ fn wire__crate__binding__refund_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::refund(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::refund(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -814,7 +1165,12 @@ fn wire__crate__binding__register_webhook_impl( move || { let api_webhook_url = webhook_url.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::register_webhook(api_webhook_url))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::register_webhook(api_webhook_url)?; + Ok(output_ok) + })(), + ) } }, ) @@ -831,7 +1187,14 @@ fn wire__crate__binding__report_issue_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::report_issue(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::report_issue(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -842,7 +1205,16 @@ fn wire__crate__binding__rescan_swaps_impl(port_: flutter_rust_bridge::for_gener port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::rescan_swaps())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::rescan_swaps()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__send_onchain_impl( @@ -857,7 +1229,14 @@ fn wire__crate__binding__send_onchain_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::send_onchain(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::send_onchain(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -873,7 +1252,14 @@ fn wire__crate__binding__send_payment_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::send_payment(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::send_payment(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -890,7 +1276,12 @@ fn wire__crate__binding__send_spontaneous_payment_impl( move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::send_spontaneous_payment(api_req))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::send_spontaneous_payment(api_req)?; + Ok(output_ok) + })(), + ) } }, ) @@ -908,7 +1299,12 @@ fn wire__crate__binding__service_health_check_impl( move || { let api_api_key = api_key.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::service_health_check(api_api_key))()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::service_health_check(api_api_key)?; + Ok(output_ok) + })(), + ) } }, ) @@ -928,9 +1324,13 @@ fn wire__crate__binding__set_payment_metadata_impl( let api_hash = hash.cst_decode(); let api_metadata = metadata.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::set_payment_metadata(api_hash, api_metadata) - })()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = + crate::binding::set_payment_metadata(api_hash, api_metadata)?; + Ok(output_ok) + })(), + ) } }, ) @@ -947,7 +1347,14 @@ fn wire__crate__binding__sign_message_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::sign_message(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::sign_message(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -963,7 +1370,14 @@ fn wire__crate__binding__static_backup_impl( }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::static_backup(api_req))()) + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::static_backup(api_req)?; + Ok(output_ok) + })(), + ) + } }, ) } @@ -974,7 +1388,16 @@ fn wire__crate__binding__sync_impl(port_: flutter_rust_bridge::for_generated::Me port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, - move || move |context| transform_result_dco((move || crate::binding::sync())()), + move || { + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::sync()?; + Ok(output_ok) + })(), + ) + } + }, ) } fn wire__crate__binding__unregister_webhook_impl( @@ -990,9 +1413,12 @@ fn wire__crate__binding__unregister_webhook_impl( move || { let api_webhook_url = webhook_url.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::unregister_webhook(api_webhook_url) - })()) + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::unregister_webhook(api_webhook_url)?; + Ok(output_ok) + })(), + ) } }, ) diff --git a/libs/sdk-flutter/README.md b/libs/sdk-flutter/README.md index ae1a8c63a..145e62061 100644 --- a/libs/sdk-flutter/README.md +++ b/libs/sdk-flutter/README.md @@ -26,7 +26,7 @@ cargo install cargo-ndk ``` * Install [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge): ``` -cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.38 +cargo install flutter_rust_bridge_codegen --version 2.0.0 ``` ## Building the plugin diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index af5d58f07..0ec6fbf66 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -16,6 +16,7 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // These functions are ignored because they are not marked as `pub`: `block_on`, `get_breez_services`, `init`, `new`, `rt` // These types are ignored because they are not used by any `pub` functions: `BindingLogger` +// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `enabled`, `flush`, `log` /// Wrapper around [BreezServices::connect] which also initializes SDK logging Future connect({required ConnectRequest req}) => diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index c86a404fc..6e1d7edc1 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 02fbdfb4a..3cdc41bb6 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart index b150142a1..3014f97b3 100644 --- a/libs/sdk-flutter/lib/generated/fiat.dart +++ b/libs/sdk-flutter/lib/generated/fiat.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 9011e8c42..28e918000 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -10,7 +10,7 @@ import 'dart:async'; import 'dart:convert'; import 'fiat.dart'; import 'frb_generated.dart'; -import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; +import 'frb_generated.io.dart' if (dart.library.js_interop) 'frb_generated.web.dart'; import 'input_parser.dart'; import 'invoice.dart'; import 'lnurl/pay/model.dart'; @@ -59,7 +59,7 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0-dev.38'; + String get codegenVersion => '2.0.0'; @override int get rustContentHash => 847148110; @@ -5875,7 +5875,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String( self.setupAndSerialize( - codec: DcoCodec(decodeSuccessData: dco_decode_breez_event, decodeErrorData: null)), + codec: DcoCodec( + decodeSuccessData: dco_decode_breez_event, + decodeErrorData: dco_decode_AnyhowException, + )), serializer); } @@ -5884,7 +5887,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String( self.setupAndSerialize( - codec: DcoCodec(decodeSuccessData: dco_decode_log_entry, decodeErrorData: null)), + codec: DcoCodec( + decodeSuccessData: dco_decode_log_entry, + decodeErrorData: dco_decode_AnyhowException, + )), serializer); } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index b91cbbb11..534e46ad7 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -1342,7 +1342,10 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_String(raw.setupAndSerialize( - codec: DcoCodec(decodeSuccessData: dco_decode_breez_event, decodeErrorData: null))); + codec: DcoCodec( + decodeSuccessData: dco_decode_breez_event, + decodeErrorData: dco_decode_AnyhowException, + ))); } @protected @@ -1350,7 +1353,10 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl raw) { // Codec=Cst (C-struct based), see doc to use other codecs return cst_encode_String(raw.setupAndSerialize( - codec: DcoCodec(decodeSuccessData: dco_decode_log_entry, decodeErrorData: null))); + codec: DcoCodec( + decodeSuccessData: dco_decode_log_entry, + decodeErrorData: dco_decode_AnyhowException, + ))); } @protected @@ -6043,12 +6049,9 @@ class BreezSdkBindingsWire 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 DartPostCObjectFnType + = ffi.Pointer message)>>; typedef DartPort = ffi.Int64; -typedef DartDartPort = int; final class wire_cst_binding_event_listener extends ffi.Opaque {} diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart index 6ef7a6d86..0022fdae3 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart index 9c4f0f619..3d9967678 100644 --- a/libs/sdk-flutter/lib/generated/invoice.dart +++ b/libs/sdk-flutter/lib/generated/invoice.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart index fef64de78..95f034693 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index 181d6a730..a8193dc21 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index b25812804..f547c7e85 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0-dev.38. +// Generated by `flutter_rust_bridge`@ 2.0.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index ece1b3833..101028e25 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.38 + cargo install flutter_rust_bridge_codegen --version 2.0.0 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate From e8ad913c3d8cfda23467a5af75dabb1c55ec31d7 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 13:53:40 +0300 Subject: [PATCH 15/23] Move flutter_rust_bridge crate to workspace --- libs/Cargo.toml | 1 + libs/sdk-bindings/Cargo.toml | 2 +- libs/sdk-core/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/Cargo.toml b/libs/Cargo.toml index c27f40f3e..eee2c9fe5 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -21,6 +21,7 @@ aes = "0.8" anyhow = { version = "1.0.79", features = ["backtrace"] } base64 = "0.13.0" bitcoin = "=0.29.2" # Same version as used in gl-client +flutter_rust_bridge = "=2.0.0" # Pin the reqwest dependency until macOS linker issue is fixed: https://github.com/seanmonstar/reqwest/issues/2006 hex = "0.4" lightning = "=0.0.118" # Same version as used in gl-client diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index 715892559..72c060596 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -26,7 +26,7 @@ uniffi-kotlin-multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin camino = "1.1.1" log = { workspace = true } once_cell = { workspace = true } -flutter_rust_bridge = "2.0.0" +flutter_rust_bridge = { workspace = true } tiny-bip39 = "*" tonic = { workspace = true, features = [ "tls", diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index a2f9d4b86..c55b66d26 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -8,9 +8,9 @@ name = "breez_sdk_core" crate-type = ["staticlib", "cdylib", "lib"] [dependencies] -flutter_rust_bridge = "2.0.0" aes = { workspace = true } anyhow = { workspace = true } +flutter_rust_bridge = { workspace = true } hex = { workspace = true } gl-client = { git = "https://github.com/Blockstream/greenlight.git", features = [ "permissive", From febdb518f73c613a87b8187ab670bdb968c2554b Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 13:54:11 +0300 Subject: [PATCH 16/23] Tell frb to ignore lsps2 module --- libs/sdk-core/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index 3d3906ae7..2c557b1bc 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -175,6 +175,7 @@ pub mod lnurl; mod buy; mod lsp; mod lsps0; +/// flutter_rust_bridge:ignore mod lsps2; mod models; mod persist; From 33e8b4af32c2c29983f1fb0de25ae40ec367bebd Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 13:59:47 +0300 Subject: [PATCH 17/23] Generate Dart bindings --- libs/sdk-core/src/frb_generated.io.rs | 561 ++-- libs/sdk-core/src/frb_generated.rs | 1554 +++++---- libs/sdk-flutter/ios/Classes/frb_generated.h | 62 +- libs/sdk-flutter/lib/generated/binding.dart | 655 +++- .../lib/generated/binding.freezed.dart | 2929 +++++++++++++++++ .../lib/generated/breez_services.dart | 3 +- .../lib/generated/frb_generated.dart | 393 +-- .../lib/generated/frb_generated.io.dart | 363 +- .../lib/generated/input_parser.freezed.dart | 143 +- libs/sdk-flutter/lib/generated/models.dart | 156 +- .../lib/generated/models.freezed.dart | 659 +--- libs/sdk-flutter/lib/sdk.dart | 6 +- 12 files changed, 5127 insertions(+), 2357 deletions(-) create mode 100644 libs/sdk-flutter/lib/generated/binding.freezed.dart diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 93d33f079..fcf8d29ca 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -4,6 +4,7 @@ // Section: imports use super::*; +use crate::binding::*; use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -23,6 +24,29 @@ impl CstDecode unimplemented!() } } +impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> LnUrlPayResult { + flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(CstDecode::< + RustOpaqueNom>, + >::cst_decode( + self + )) + } +} +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< StreamSink, @@ -55,32 +79,32 @@ impl CstDecode for *mut wire_cst_list_prim_u_8_strict { String::from_utf8(vec).unwrap() } } -impl CstDecode +impl CstDecode for wire_cst_aes_success_action_data_decrypted { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { - crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { + crate::binding::AesSuccessActionDataDecrypted { description: self.description.cst_decode(), plaintext: self.plaintext.cst_decode(), } } } -impl CstDecode +impl CstDecode for wire_cst_aes_success_action_data_result { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { match self.tag { 0 => { let ans = unsafe { self.kind.Decrypted }; - crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { + crate::binding::AesSuccessActionDataResult::Decrypted { data: ans.data.cst_decode(), } } 1 => { let ans = unsafe { self.kind.ErrorStatus }; - crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { + crate::binding::AesSuccessActionDataResult::ErrorStatus { reason: ans.reason.cst_decode(), } } @@ -111,10 +135,10 @@ impl CstDecode for wire_cst_binding_event_ crate::binding::BindingEventListener {} } } -impl CstDecode for wire_cst_bitcoin_address_data { +impl CstDecode for wire_cst_bitcoin_address_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { - crate::input_parser::BitcoinAddressData { + fn cst_decode(self) -> crate::binding::BitcoinAddressData { + crate::binding::BitcoinAddressData { address: self.address.cst_decode(), network: self.network.cst_decode(), amount_sat: self.amount_sat.cst_decode(), @@ -123,23 +147,22 @@ impl CstDecode for wire_cst_bitcoin_add } } } -impl CstDecode +impl CstDecode for *mut wire_cst_aes_success_action_data_decrypted { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { 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 +impl CstDecode for *mut wire_cst_aes_success_action_data_result { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { 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_backup_failed_data { @@ -156,11 +179,11 @@ impl CstDecode for *mut wire_cst_binding_e CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_bitcoin_address_data { +impl CstDecode for *mut wire_cst_bitcoin_address_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::BitcoinAddressData { + fn cst_decode(self) -> crate::binding::BitcoinAddressData { 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 bool { @@ -220,6 +243,15 @@ impl CstDecode for *mut wire_cst_greenligh CstDecode::::cst_decode(*wrap).into() } } +impl CstDecode + for *mut wire_cst_greenlight_device_credentials +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut wire_cst_greenlight_node_config { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::models::GreenlightNodeConfig { @@ -247,11 +279,11 @@ impl CstDecode for *mut wire_cst_list_paymen CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_ln_invoice { +impl CstDecode for *mut wire_cst_ln_invoice { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::invoice::LNInvoice { + fn cst_decode(self) -> crate::binding::LNInvoice { 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_ln_payment_details { @@ -261,77 +293,57 @@ impl CstDecode for *mut wire_cst_ln_payment_det CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode - for *mut wire_cst_ln_url_auth_request_data -{ +impl CstDecode for *mut wire_cst_ln_url_auth_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlAuthRequestData { + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { 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_ln_url_error_data { +impl CstDecode for *mut wire_cst_ln_url_error_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlErrorData { + fn cst_decode(self) -> crate::binding::LnUrlErrorData { 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_ln_url_pay_error_data -{ +impl CstDecode for *mut wire_cst_ln_url_pay_request { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { 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_ln_url_pay_request { +impl CstDecode for *mut wire_cst_ln_url_pay_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlPayRequest { + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { 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_ln_url_pay_request_data { +impl CstDecode for *mut wire_cst_ln_url_withdraw_request { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlPayRequestData { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { 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_ln_url_pay_success_data -{ - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode for *mut wire_cst_ln_url_withdraw_request { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlWithdrawRequest { - let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; - CstDecode::::cst_decode(*wrap).into() - } -} -impl CstDecode +impl CstDecode for *mut wire_cst_ln_url_withdraw_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlWithdrawRequestData { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { 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 +impl CstDecode for *mut wire_cst_ln_url_withdraw_success_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlWithdrawSuccessData { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { 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_lsp_information { @@ -341,13 +353,13 @@ impl CstDecode for *mut wire_cst_lsp_information { CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode +impl CstDecode for *mut wire_cst_message_success_action_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::MessageSuccessActionData { + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { 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_node_config { @@ -521,13 +533,11 @@ impl CstDecode for *mut wire_cst_static_back CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode - for *mut wire_cst_success_action_processed -{ +impl CstDecode for *mut wire_cst_success_action_processed { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { 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_swap_info { @@ -537,11 +547,11 @@ impl CstDecode for *mut wire_cst_swap_info { CstDecode::::cst_decode(*wrap).into() } } -impl CstDecode for *mut wire_cst_symbol { +impl CstDecode for *mut wire_cst_symbol { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::Symbol { + fn cst_decode(self) -> crate::binding::Symbol { 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 u32 { @@ -556,13 +566,11 @@ impl CstDecode for *mut u64 { unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } } } -impl CstDecode - for *mut wire_cst_url_success_action_data -{ +impl CstDecode for *mut wire_cst_url_success_action_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::UrlSuccessActionData { + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { 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 wire_cst_breez_event { @@ -697,10 +705,10 @@ impl CstDecode for wire_cst_connect_request { } } } -impl CstDecode for wire_cst_currency_info { +impl CstDecode for wire_cst_currency_info { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::CurrencyInfo { - crate::fiat::CurrencyInfo { + fn cst_decode(self) -> crate::binding::CurrencyInfo { + crate::binding::CurrencyInfo { name: self.name.cst_decode(), fraction_size: self.fraction_size.cst_decode(), spacing: self.spacing.cst_decode(), @@ -711,10 +719,10 @@ impl CstDecode for wire_cst_currency_info { } } } -impl CstDecode for wire_cst_fiat_currency { +impl CstDecode for wire_cst_fiat_currency { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::FiatCurrency { - crate::fiat::FiatCurrency { + fn cst_decode(self) -> crate::binding::FiatCurrency { + crate::binding::FiatCurrency { id: self.id.cst_decode(), info: self.info.cst_decode(), } @@ -724,8 +732,18 @@ impl CstDecode for wire_cst_greenlight_cre // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::models::GreenlightCredentials { crate::models::GreenlightCredentials { - device_key: self.device_key.cst_decode(), - device_cert: self.device_cert.cst_decode(), + developer_key: self.developer_key.cst_decode(), + developer_cert: self.developer_cert.cst_decode(), + } + } +} +impl CstDecode + for wire_cst_greenlight_device_credentials +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + crate::models::GreenlightDeviceCredentials { + device: self.device.cst_decode(), } } } @@ -738,55 +756,55 @@ impl CstDecode for wire_cst_greenlight_node } } } -impl CstDecode for wire_cst_input_type { +impl CstDecode for wire_cst_input_type { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::InputType { + fn cst_decode(self) -> crate::binding::InputType { match self.tag { 0 => { let ans = unsafe { self.kind.BitcoinAddress }; - crate::input_parser::InputType::BitcoinAddress { + crate::binding::InputType::BitcoinAddress { address: ans.address.cst_decode(), } } 1 => { let ans = unsafe { self.kind.Bolt11 }; - crate::input_parser::InputType::Bolt11 { + crate::binding::InputType::Bolt11 { invoice: ans.invoice.cst_decode(), } } 2 => { let ans = unsafe { self.kind.NodeId }; - crate::input_parser::InputType::NodeId { + crate::binding::InputType::NodeId { node_id: ans.node_id.cst_decode(), } } 3 => { let ans = unsafe { self.kind.Url }; - crate::input_parser::InputType::Url { + crate::binding::InputType::Url { url: ans.url.cst_decode(), } } 4 => { let ans = unsafe { self.kind.LnUrlPay }; - crate::input_parser::InputType::LnUrlPay { + crate::binding::InputType::LnUrlPay { data: ans.data.cst_decode(), } } 5 => { let ans = unsafe { self.kind.LnUrlWithdraw }; - crate::input_parser::InputType::LnUrlWithdraw { + crate::binding::InputType::LnUrlWithdraw { data: ans.data.cst_decode(), } } 6 => { let ans = unsafe { self.kind.LnUrlAuth }; - crate::input_parser::InputType::LnUrlAuth { + crate::binding::InputType::LnUrlAuth { data: ans.data.cst_decode(), } } 7 => { let ans = unsafe { self.kind.LnUrlError }; - crate::input_parser::InputType::LnUrlError { + crate::binding::InputType::LnUrlError { data: ans.data.cst_decode(), } } @@ -814,9 +832,9 @@ impl CstDecode> for *mut wire_cst_list_String { vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_fiat_currency { +impl CstDecode> for *mut wire_cst_list_fiat_currency { // 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) @@ -824,9 +842,9 @@ impl CstDecode> for *mut wire_cst_list_fiat_curre vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_locale_overrides { +impl CstDecode> for *mut wire_cst_list_locale_overrides { // 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) @@ -834,9 +852,9 @@ impl CstDecode> for *mut wire_cst_list_locale_ vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_localized_name { +impl CstDecode> for *mut wire_cst_list_localized_name { // 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) @@ -917,9 +935,9 @@ impl CstDecode> for *mut wire_cst_list_prim_u_8_strict { } } } -impl CstDecode> for *mut wire_cst_list_rate { +impl CstDecode> for *mut wire_cst_list_rate { // 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) @@ -937,9 +955,9 @@ impl CstDecode> for *mut wire_cst_list_rever vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_route_hint { +impl CstDecode> for *mut wire_cst_list_route_hint { // 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) @@ -947,9 +965,9 @@ impl CstDecode> for *mut wire_cst_list_route_hint vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode> for *mut wire_cst_list_route_hint_hop { +impl CstDecode> for *mut wire_cst_list_route_hint_hop { // 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) @@ -989,10 +1007,10 @@ impl CstDecode> vec.into_iter().map(CstDecode::cst_decode).collect() } } -impl CstDecode for wire_cst_ln_invoice { +impl CstDecode for wire_cst_ln_invoice { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::invoice::LNInvoice { - crate::invoice::LNInvoice { + fn cst_decode(self) -> crate::binding::LNInvoice { + crate::binding::LNInvoice { bolt11: self.bolt11.cst_decode(), network: self.network.cst_decode(), payee_pubkey: self.payee_pubkey.cst_decode(), @@ -1031,10 +1049,10 @@ impl CstDecode for wire_cst_ln_payment_details } } } -impl CstDecode for wire_cst_ln_url_auth_request_data { +impl CstDecode for wire_cst_ln_url_auth_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlAuthRequestData { - crate::input_parser::LnUrlAuthRequestData { + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { + crate::binding::LnUrlAuthRequestData { k1: self.k1.cst_decode(), action: self.action.cst_decode(), domain: self.domain.cst_decode(), @@ -1042,14 +1060,14 @@ impl CstDecode for wire_cst_ln_url_au } } } -impl CstDecode for wire_cst_ln_url_callback_status { +impl CstDecode for wire_cst_ln_url_callback_status { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlCallbackStatus { + fn cst_decode(self) -> crate::binding::LnUrlCallbackStatus { match self.tag { - 0 => crate::models::LnUrlCallbackStatus::Ok, + 0 => crate::binding::LnUrlCallbackStatus::Ok, 1 => { let ans = unsafe { self.kind.ErrorStatus }; - crate::models::LnUrlCallbackStatus::ErrorStatus { + crate::binding::LnUrlCallbackStatus::ErrorStatus { data: ans.data.cst_decode(), } } @@ -1057,27 +1075,18 @@ impl CstDecode for wire_cst_ln_url_callback_ } } } -impl CstDecode for wire_cst_ln_url_error_data { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlErrorData { - crate::input_parser::LnUrlErrorData { - reason: self.reason.cst_decode(), - } - } -} -impl CstDecode for wire_cst_ln_url_pay_error_data { +impl CstDecode for wire_cst_ln_url_error_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { - crate::lnurl::pay::model::LnUrlPayErrorData { - payment_hash: self.payment_hash.cst_decode(), + fn cst_decode(self) -> crate::binding::LnUrlErrorData { + crate::binding::LnUrlErrorData { reason: self.reason.cst_decode(), } } } -impl CstDecode for wire_cst_ln_url_pay_request { +impl CstDecode for wire_cst_ln_url_pay_request { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlPayRequest { - crate::models::LnUrlPayRequest { + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { + crate::binding::LnUrlPayRequest { data: self.data.cst_decode(), amount_msat: self.amount_msat.cst_decode(), comment: self.comment.cst_decode(), @@ -1085,10 +1094,10 @@ impl CstDecode for wire_cst_ln_url_pay_request { } } } -impl CstDecode for wire_cst_ln_url_pay_request_data { +impl CstDecode for wire_cst_ln_url_pay_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlPayRequestData { - crate::input_parser::LnUrlPayRequestData { + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { + crate::binding::LnUrlPayRequestData { callback: self.callback.cst_decode(), min_sendable: self.min_sendable.cst_decode(), max_sendable: self.max_sendable.cst_decode(), @@ -1101,57 +1110,20 @@ impl CstDecode for wire_cst_ln_url_pay } } } -impl CstDecode for wire_cst_ln_url_pay_result { +impl CstDecode for wire_cst_ln_url_withdraw_request { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPayResult { - match self.tag { - 0 => { - let ans = unsafe { self.kind.EndpointSuccess }; - crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { - data: ans.data.cst_decode(), - } - } - 1 => { - let ans = unsafe { self.kind.EndpointError }; - crate::lnurl::pay::model::LnUrlPayResult::EndpointError { - data: ans.data.cst_decode(), - } - } - 2 => { - let ans = unsafe { self.kind.PayError }; - crate::lnurl::pay::model::LnUrlPayResult::PayError { - data: ans.data.cst_decode(), - } - } - _ => unreachable!(), - } - } -} -impl CstDecode for wire_cst_ln_url_pay_success_data { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { - crate::lnurl::pay::model::LnUrlPaySuccessData { - payment: self.payment.cst_decode(), - success_action: self.success_action.cst_decode(), - } - } -} -impl CstDecode for wire_cst_ln_url_withdraw_request { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlWithdrawRequest { - crate::models::LnUrlWithdrawRequest { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { + crate::binding::LnUrlWithdrawRequest { data: self.data.cst_decode(), amount_msat: self.amount_msat.cst_decode(), description: self.description.cst_decode(), } } } -impl CstDecode - for wire_cst_ln_url_withdraw_request_data -{ +impl CstDecode for wire_cst_ln_url_withdraw_request_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::input_parser::LnUrlWithdrawRequestData { - crate::input_parser::LnUrlWithdrawRequestData { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { + crate::binding::LnUrlWithdrawRequestData { callback: self.callback.cst_decode(), k1: self.k1.cst_decode(), default_description: self.default_description.cst_decode(), @@ -1160,19 +1132,19 @@ impl CstDecode } } } -impl CstDecode for wire_cst_ln_url_withdraw_result { +impl CstDecode for wire_cst_ln_url_withdraw_result { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlWithdrawResult { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawResult { match self.tag { 0 => { let ans = unsafe { self.kind.Ok }; - crate::models::LnUrlWithdrawResult::Ok { + crate::binding::LnUrlWithdrawResult::Ok { data: ans.data.cst_decode(), } } 1 => { let ans = unsafe { self.kind.ErrorStatus }; - crate::models::LnUrlWithdrawResult::ErrorStatus { + crate::binding::LnUrlWithdrawResult::ErrorStatus { data: ans.data.cst_decode(), } } @@ -1180,28 +1152,28 @@ impl CstDecode for wire_cst_ln_url_withdraw_ } } } -impl CstDecode for wire_cst_ln_url_withdraw_success_data { +impl CstDecode for wire_cst_ln_url_withdraw_success_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::LnUrlWithdrawSuccessData { - crate::models::LnUrlWithdrawSuccessData { + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { + crate::binding::LnUrlWithdrawSuccessData { invoice: self.invoice.cst_decode(), } } } -impl CstDecode for wire_cst_locale_overrides { +impl CstDecode for wire_cst_locale_overrides { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::LocaleOverrides { - crate::fiat::LocaleOverrides { + fn cst_decode(self) -> crate::binding::LocaleOverrides { + crate::binding::LocaleOverrides { locale: self.locale.cst_decode(), spacing: self.spacing.cst_decode(), symbol: self.symbol.cst_decode(), } } } -impl CstDecode for wire_cst_localized_name { +impl CstDecode for wire_cst_localized_name { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::LocalizedName { - crate::fiat::LocalizedName { + fn cst_decode(self) -> crate::binding::LocalizedName { + crate::binding::LocalizedName { locale: self.locale.cst_decode(), name: self.name.cst_decode(), } @@ -1244,12 +1216,10 @@ impl CstDecode } } } -impl CstDecode - for wire_cst_message_success_action_data -{ +impl CstDecode for wire_cst_message_success_action_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::MessageSuccessActionData { - crate::lnurl::pay::model::MessageSuccessActionData { + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { + crate::binding::MessageSuccessActionData { message: self.message.cst_decode(), } } @@ -1494,10 +1464,10 @@ impl CstDecode for wire_cst_prepare_refund } } } -impl CstDecode for wire_cst_rate { +impl CstDecode for wire_cst_rate { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::Rate { - crate::fiat::Rate { + fn cst_decode(self) -> crate::binding::Rate { + crate::binding::Rate { coin: self.coin.cst_decode(), value: self.value.cst_decode(), } @@ -1645,18 +1615,18 @@ impl CstDecode for wire_cst_reverse_swap_pai } } } -impl CstDecode for wire_cst_route_hint { +impl CstDecode for wire_cst_route_hint { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::invoice::RouteHint { - crate::invoice::RouteHint { + fn cst_decode(self) -> crate::binding::RouteHint { + crate::binding::RouteHint { hops: self.hops.cst_decode(), } } } -impl CstDecode for wire_cst_route_hint_hop { +impl CstDecode for wire_cst_route_hint_hop { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::invoice::RouteHintHop { - crate::invoice::RouteHintHop { + fn cst_decode(self) -> crate::binding::RouteHintHop { + crate::binding::RouteHintHop { src_node_id: self.src_node_id.cst_decode(), short_channel_id: self.short_channel_id.cst_decode(), fees_base_msat: self.fees_base_msat.cst_decode(), @@ -1759,27 +1729,25 @@ impl CstDecode for wire_cst_static_backup_r } } } -impl CstDecode - for wire_cst_success_action_processed -{ +impl CstDecode for wire_cst_success_action_processed { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::SuccessActionProcessed { + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { match self.tag { 0 => { let ans = unsafe { self.kind.Aes }; - crate::lnurl::pay::model::SuccessActionProcessed::Aes { + crate::binding::SuccessActionProcessed::Aes { result: ans.result.cst_decode(), } } 1 => { let ans = unsafe { self.kind.Message }; - crate::lnurl::pay::model::SuccessActionProcessed::Message { + crate::binding::SuccessActionProcessed::Message { data: ans.data.cst_decode(), } } 2 => { let ans = unsafe { self.kind.Url }; - crate::lnurl::pay::model::SuccessActionProcessed::Url { + crate::binding::SuccessActionProcessed::Url { data: ans.data.cst_decode(), } } @@ -1818,10 +1786,10 @@ impl CstDecode for wire_cst_swap_info { } } } -impl CstDecode for wire_cst_symbol { +impl CstDecode for wire_cst_symbol { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::fiat::Symbol { - crate::fiat::Symbol { + fn cst_decode(self) -> crate::binding::Symbol { + crate::binding::Symbol { grapheme: self.grapheme.cst_decode(), template: self.template.cst_decode(), rtl: self.rtl.cst_decode(), @@ -1850,12 +1818,10 @@ impl CstDecode for wire_cst_unspent_tra } } } -impl CstDecode - for wire_cst_url_success_action_data -{ +impl CstDecode for wire_cst_url_success_action_data { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::lnurl::pay::model::UrlSuccessActionData { - crate::lnurl::pay::model::UrlSuccessActionData { + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { + crate::binding::UrlSuccessActionData { description: self.description.cst_decode(), url: self.url.cst_decode(), } @@ -2100,8 +2066,8 @@ impl Default for wire_cst_fiat_currency { impl NewWithNullPtr for wire_cst_greenlight_credentials { fn new_with_null_ptr() -> Self { Self { - device_key: core::ptr::null_mut(), - device_cert: core::ptr::null_mut(), + developer_key: core::ptr::null_mut(), + developer_cert: core::ptr::null_mut(), } } } @@ -2110,6 +2076,18 @@ impl Default for wire_cst_greenlight_credentials { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_greenlight_device_credentials { + fn new_with_null_ptr() -> Self { + Self { + device: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_greenlight_device_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_greenlight_node_config { fn new_with_null_ptr() -> Self { Self { @@ -2258,19 +2236,6 @@ impl Default for wire_cst_ln_url_error_data { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_ln_url_pay_error_data { - fn new_with_null_ptr() -> Self { - Self { - payment_hash: core::ptr::null_mut(), - reason: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_ln_url_pay_error_data { - fn default() -> Self { - Self::new_with_null_ptr() - } -} impl NewWithNullPtr for wire_cst_ln_url_pay_request { fn new_with_null_ptr() -> Self { Self { @@ -2306,32 +2271,6 @@ impl Default for wire_cst_ln_url_pay_request_data { Self::new_with_null_ptr() } } -impl NewWithNullPtr for wire_cst_ln_url_pay_result { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: LnUrlPayResultKind { nil__: () }, - } - } -} -impl Default for wire_cst_ln_url_pay_result { - fn default() -> Self { - Self::new_with_null_ptr() - } -} -impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { - fn new_with_null_ptr() -> Self { - Self { - payment: Default::default(), - success_action: core::ptr::null_mut(), - } - } -} -impl Default for wire_cst_ln_url_pay_success_data { - fn default() -> Self { - Self::new_with_null_ptr() - } -} impl NewWithNullPtr for wire_cst_ln_url_withdraw_request { fn new_with_null_ptr() -> Self { Self { @@ -3658,6 +3597,24 @@ pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( wire__crate__binding__unregister_webhook_impl(port_, webhook_url) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( ) -> *mut wire_cst_aes_success_action_data_decrypted { @@ -3756,6 +3713,14 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials( ) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials( +) -> *mut wire_cst_greenlight_device_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_device_credentials::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config( ) -> *mut wire_cst_greenlight_node_config { @@ -3814,14 +3779,6 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data( ) } -#[no_mangle] -pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data( -) -> *mut wire_cst_ln_url_pay_error_data { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_ln_url_pay_error_data::new_with_null_ptr(), - ) -} - #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request( ) -> *mut wire_cst_ln_url_pay_request { @@ -3838,14 +3795,6 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data( ) } -#[no_mangle] -pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data( -) -> *mut wire_cst_ln_url_pay_success_data { - flutter_rust_bridge::for_generated::new_leak_box_ptr( - wire_cst_ln_url_pay_success_data::new_with_null_ptr(), - ) -} - #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request( ) -> *mut wire_cst_ln_url_withdraw_request { @@ -4504,8 +4453,13 @@ pub struct wire_cst_fiat_currency { #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_greenlight_credentials { - device_key: *mut wire_cst_list_prim_u_8_strict, - device_cert: *mut wire_cst_list_prim_u_8_strict, + developer_key: *mut wire_cst_list_prim_u_8_strict, + developer_cert: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_greenlight_device_credentials { + device: *mut wire_cst_list_prim_u_8_strict, } #[repr(C)] #[derive(Clone, Copy)] @@ -4760,12 +4714,6 @@ pub struct wire_cst_ln_url_error_data { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_ln_url_pay_error_data { - payment_hash: *mut wire_cst_list_prim_u_8_strict, - reason: *mut wire_cst_list_prim_u_8_strict, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_ln_url_pay_request { data: wire_cst_ln_url_pay_request_data, amount_msat: u64, @@ -4787,41 +4735,6 @@ pub struct wire_cst_ln_url_pay_request_data { } #[repr(C)] #[derive(Clone, Copy)] -pub struct wire_cst_ln_url_pay_result { - tag: i32, - kind: LnUrlPayResultKind, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub union LnUrlPayResultKind { - EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, - EndpointError: wire_cst_LnUrlPayResult_EndpointError, - PayError: wire_cst_LnUrlPayResult_PayError, - nil__: (), -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_LnUrlPayResult_EndpointSuccess { - data: *mut wire_cst_ln_url_pay_success_data, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_LnUrlPayResult_EndpointError { - data: *mut wire_cst_ln_url_error_data, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_LnUrlPayResult_PayError { - data: *mut wire_cst_ln_url_pay_error_data, -} -#[repr(C)] -#[derive(Clone, Copy)] -pub struct wire_cst_ln_url_pay_success_data { - payment: wire_cst_payment, - success_action: *mut wire_cst_success_action_processed, -} -#[repr(C)] -#[derive(Clone, Copy)] pub struct wire_cst_ln_url_withdraw_request { data: wire_cst_ln_url_withdraw_request_data, amount_msat: u64, @@ -4946,7 +4859,7 @@ pub union NodeCredentialsKind { #[repr(C)] #[derive(Clone, Copy)] pub struct wire_cst_NodeCredentials_Greenlight { - credentials: *mut wire_cst_greenlight_credentials, + credentials: *mut wire_cst_greenlight_device_credentials, } #[repr(C)] #[derive(Clone, Copy)] diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 3c1e6ef8a..a73c82e95 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -25,6 +25,7 @@ // Section: imports +use crate::binding::*; use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -622,7 +623,7 @@ fn wire__crate__binding__list_refundables_impl( } fn wire__crate__binding__lnurl_auth_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req_data: impl CstDecode, + req_data: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { @@ -645,7 +646,7 @@ fn wire__crate__binding__lnurl_auth_impl( } fn wire__crate__binding__lnurl_pay_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + req: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { @@ -668,7 +669,7 @@ fn wire__crate__binding__lnurl_pay_impl( } fn wire__crate__binding__lnurl_withdraw_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + req: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { @@ -1424,6 +1425,209 @@ fn wire__crate__binding__unregister_webhook_impl( ) } +// Section: static_checks + +#[allow(clippy::unnecessary_literal_unwrap)] +const _: fn() = || { + { + let AesSuccessActionDataDecrypted = + None::.unwrap(); + let _: String = AesSuccessActionDataDecrypted.description; + let _: String = AesSuccessActionDataDecrypted.plaintext; + } + match None::.unwrap() { + crate::binding::AesSuccessActionDataResult::Decrypted { data } => { + let _: crate::binding::AesSuccessActionDataDecrypted = data; + } + crate::binding::AesSuccessActionDataResult::ErrorStatus { reason } => { + let _: String = reason; + } + } + { + let BitcoinAddressData = None::.unwrap(); + let _: String = BitcoinAddressData.address; + let _: crate::binding::Network = BitcoinAddressData.network; + let _: Option = BitcoinAddressData.amount_sat; + let _: Option = BitcoinAddressData.label; + let _: Option = BitcoinAddressData.message; + } + { + let CurrencyInfo = None::.unwrap(); + let _: String = CurrencyInfo.name; + let _: u32 = CurrencyInfo.fraction_size; + let _: Option = CurrencyInfo.spacing; + let _: Option = CurrencyInfo.symbol; + let _: Option = CurrencyInfo.uniq_symbol; + let _: Vec = CurrencyInfo.localized_name; + let _: Vec = CurrencyInfo.locale_overrides; + } + { + let FiatCurrency = None::.unwrap(); + let _: String = FiatCurrency.id; + let _: crate::binding::CurrencyInfo = FiatCurrency.info; + } + match None::.unwrap() { + crate::binding::InputType::BitcoinAddress { address } => { + let _: crate::binding::BitcoinAddressData = address; + } + crate::binding::InputType::Bolt11 { invoice } => { + let _: crate::binding::LNInvoice = invoice; + } + crate::binding::InputType::NodeId { node_id } => { + let _: String = node_id; + } + crate::binding::InputType::Url { url } => { + let _: String = url; + } + crate::binding::InputType::LnUrlPay { data } => { + let _: crate::binding::LnUrlPayRequestData = data; + } + crate::binding::InputType::LnUrlWithdraw { data } => { + let _: crate::binding::LnUrlWithdrawRequestData = data; + } + crate::binding::InputType::LnUrlAuth { data } => { + let _: crate::binding::LnUrlAuthRequestData = data; + } + crate::binding::InputType::LnUrlError { data } => { + let _: crate::binding::LnUrlErrorData = data; + } + } + { + let LNInvoice = None::.unwrap(); + let _: String = LNInvoice.bolt11; + let _: crate::binding::Network = LNInvoice.network; + let _: String = LNInvoice.payee_pubkey; + let _: String = LNInvoice.payment_hash; + let _: Option = LNInvoice.description; + let _: Option = LNInvoice.description_hash; + let _: Option = LNInvoice.amount_msat; + let _: u64 = LNInvoice.timestamp; + let _: u64 = LNInvoice.expiry; + let _: Vec = LNInvoice.routing_hints; + let _: Vec = LNInvoice.payment_secret; + let _: u64 = LNInvoice.min_final_cltv_expiry_delta; + } + { + let LnUrlAuthRequestData = None::.unwrap(); + let _: String = LnUrlAuthRequestData.k1; + let _: Option = LnUrlAuthRequestData.action; + let _: String = LnUrlAuthRequestData.domain; + let _: String = LnUrlAuthRequestData.url; + } + match None::.unwrap() { + crate::binding::LnUrlCallbackStatus::Ok => {} + crate::binding::LnUrlCallbackStatus::ErrorStatus { data } => { + let _: crate::binding::LnUrlErrorData = data; + } + } + { + let LnUrlErrorData = None::.unwrap(); + let _: String = LnUrlErrorData.reason; + } + { + let LnUrlPayRequest = None::.unwrap(); + let _: crate::binding::LnUrlPayRequestData = LnUrlPayRequest.data; + let _: u64 = LnUrlPayRequest.amount_msat; + let _: Option = LnUrlPayRequest.comment; + let _: Option = LnUrlPayRequest.payment_label; + } + { + let LnUrlPayRequestData = None::.unwrap(); + let _: String = LnUrlPayRequestData.callback; + let _: u64 = LnUrlPayRequestData.min_sendable; + let _: u64 = LnUrlPayRequestData.max_sendable; + let _: String = LnUrlPayRequestData.metadata_str; + let _: u16 = LnUrlPayRequestData.comment_allowed; + let _: String = LnUrlPayRequestData.domain; + let _: bool = LnUrlPayRequestData.allows_nostr; + let _: Option = LnUrlPayRequestData.nostr_pubkey; + let _: Option = LnUrlPayRequestData.ln_address; + } + { + let LnUrlWithdrawRequest = None::.unwrap(); + let _: crate::binding::LnUrlWithdrawRequestData = LnUrlWithdrawRequest.data; + let _: u64 = LnUrlWithdrawRequest.amount_msat; + let _: Option = LnUrlWithdrawRequest.description; + } + { + let LnUrlWithdrawRequestData = None::.unwrap(); + let _: String = LnUrlWithdrawRequestData.callback; + let _: String = LnUrlWithdrawRequestData.k1; + let _: String = LnUrlWithdrawRequestData.default_description; + let _: u64 = LnUrlWithdrawRequestData.min_withdrawable; + let _: u64 = LnUrlWithdrawRequestData.max_withdrawable; + } + match None::.unwrap() { + crate::binding::LnUrlWithdrawResult::Ok { data } => { + let _: crate::binding::LnUrlWithdrawSuccessData = data; + } + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + let _: crate::binding::LnUrlErrorData = data; + } + } + { + let LnUrlWithdrawSuccessData = None::.unwrap(); + let _: crate::binding::LNInvoice = LnUrlWithdrawSuccessData.invoice; + } + { + let LocaleOverrides = None::.unwrap(); + let _: String = LocaleOverrides.locale; + let _: Option = LocaleOverrides.spacing; + let _: crate::binding::Symbol = LocaleOverrides.symbol; + } + { + let LocalizedName = None::.unwrap(); + let _: String = LocalizedName.locale; + let _: String = LocalizedName.name; + } + { + let MessageSuccessActionData = None::.unwrap(); + let _: String = MessageSuccessActionData.message; + } + { + let Rate = None::.unwrap(); + let _: String = Rate.coin; + let _: f64 = Rate.value; + } + { + let RouteHint = None::.unwrap(); + let _: Vec = RouteHint.hops; + } + { + let RouteHintHop = None::.unwrap(); + let _: String = RouteHintHop.src_node_id; + let _: u64 = RouteHintHop.short_channel_id; + let _: u32 = RouteHintHop.fees_base_msat; + let _: u32 = RouteHintHop.fees_proportional_millionths; + let _: u64 = RouteHintHop.cltv_expiry_delta; + let _: Option = RouteHintHop.htlc_minimum_msat; + let _: Option = RouteHintHop.htlc_maximum_msat; + } + match None::.unwrap() { + crate::binding::SuccessActionProcessed::Aes { result } => { + let _: crate::binding::AesSuccessActionDataResult = result; + } + crate::binding::SuccessActionProcessed::Message { data } => { + let _: crate::binding::MessageSuccessActionData = data; + } + crate::binding::SuccessActionProcessed::Url { data } => { + let _: crate::binding::UrlSuccessActionData = data; + } + } + { + let Symbol = None::.unwrap(); + let _: Option = Symbol.grapheme; + let _: Option = Symbol.template; + let _: Option = Symbol.rtl; + let _: Option = Symbol.position; + } + { + let UrlSuccessActionData = None::.unwrap(); + let _: String = UrlSuccessActionData.description; + let _: String = UrlSuccessActionData.url; + } +}; + // Section: dart2rust impl CstDecode for bool { @@ -1492,14 +1696,14 @@ impl CstDecode for i64 { self } } -impl CstDecode for i32 { +impl CstDecode for i32 { // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> crate::models::Network { + fn cst_decode(self) -> crate::binding::Network { match self { - 0 => crate::models::Network::Bitcoin, - 1 => crate::models::Network::Testnet, - 2 => crate::models::Network::Signet, - 3 => crate::models::Network::Regtest, + 0 => crate::binding::Network::Bitcoin, + 1 => crate::binding::Network::Testnet, + 2 => crate::binding::Network::Signet, + 3 => crate::binding::Network::Regtest, _ => unreachable!("Invalid variant for Network: {}", self), } } @@ -1598,6 +1802,12 @@ impl CstDecode for u8 { self } } +impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> usize { + self + } +} 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 { @@ -1606,6 +1816,26 @@ impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseDecode for LnUrlPayResult { + // 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::rust_auto_opaque_decode_owned(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 StreamSink { @@ -1634,35 +1864,31 @@ impl SseDecode for String { } } -impl SseDecode for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { +impl SseDecode for crate::binding::AesSuccessActionDataDecrypted { // 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_description = ::sse_decode(deserializer); let mut var_plaintext = ::sse_decode(deserializer); - return crate::lnurl::pay::model::AesSuccessActionDataDecrypted { + return crate::binding::AesSuccessActionDataDecrypted { description: var_description, plaintext: var_plaintext, }; } } -impl SseDecode for crate::lnurl::pay::model::AesSuccessActionDataResult { +impl SseDecode for crate::binding::AesSuccessActionDataResult { // 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_data = - ::sse_decode( - deserializer, - ); - return crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { - data: var_data, - }; + ::sse_decode(deserializer); + return crate::binding::AesSuccessActionDataResult::Decrypted { data: var_data }; } 1 => { let mut var_reason = ::sse_decode(deserializer); - return crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { + return crate::binding::AesSuccessActionDataResult::ErrorStatus { reason: var_reason, }; } @@ -1700,15 +1926,15 @@ impl SseDecode for crate::binding::BindingEventListener { } } -impl SseDecode for crate::input_parser::BitcoinAddressData { +impl SseDecode for crate::binding::BitcoinAddressData { // 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_address = ::sse_decode(deserializer); - let mut var_network = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); let mut var_amountSat = >::sse_decode(deserializer); let mut var_label = >::sse_decode(deserializer); let mut var_message = >::sse_decode(deserializer); - return crate::input_parser::BitcoinAddressData { + return crate::binding::BitcoinAddressData { address: var_address, network: var_network, amount_sat: var_amountSat, @@ -1881,7 +2107,7 @@ impl SseDecode for crate::models::Config { let mut var_chainnotifierUrl = ::sse_decode(deserializer); let mut var_mempoolspaceUrl = >::sse_decode(deserializer); let mut var_workingDir = ::sse_decode(deserializer); - let mut var_network = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); let mut var_paymentTimeoutSec = ::sse_decode(deserializer); let mut var_defaultLspId = >::sse_decode(deserializer); let mut var_apiKey = >::sse_decode(deserializer); @@ -1928,19 +2154,18 @@ impl SseDecode for crate::models::ConnectRequest { } } -impl SseDecode for crate::fiat::CurrencyInfo { +impl SseDecode for crate::binding::CurrencyInfo { // 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_name = ::sse_decode(deserializer); let mut var_fractionSize = ::sse_decode(deserializer); let mut var_spacing = >::sse_decode(deserializer); - let mut var_symbol = >::sse_decode(deserializer); - let mut var_uniqSymbol = >::sse_decode(deserializer); - let mut var_localizedName = - >>::sse_decode(deserializer); + let mut var_symbol = >::sse_decode(deserializer); + let mut var_uniqSymbol = >::sse_decode(deserializer); + let mut var_localizedName = >::sse_decode(deserializer); let mut var_localeOverrides = - >>::sse_decode(deserializer); - return crate::fiat::CurrencyInfo { + >::sse_decode(deserializer); + return crate::binding::CurrencyInfo { name: var_name, fraction_size: var_fractionSize, spacing: var_spacing, @@ -1971,12 +2196,12 @@ impl SseDecode for f64 { } } -impl SseDecode for crate::fiat::FiatCurrency { +impl SseDecode for crate::binding::FiatCurrency { // 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_id = ::sse_decode(deserializer); - let mut var_info = ::sse_decode(deserializer); - return crate::fiat::FiatCurrency { + let mut var_info = ::sse_decode(deserializer); + return crate::binding::FiatCurrency { id: var_id, info: var_info, }; @@ -1986,15 +2211,23 @@ impl SseDecode for crate::fiat::FiatCurrency { impl SseDecode for crate::models::GreenlightCredentials { // 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_deviceKey = >::sse_decode(deserializer); - let mut var_deviceCert = >::sse_decode(deserializer); + let mut var_developerKey = >::sse_decode(deserializer); + let mut var_developerCert = >::sse_decode(deserializer); return crate::models::GreenlightCredentials { - device_key: var_deviceKey, - device_cert: var_deviceCert, + developer_key: var_developerKey, + developer_cert: var_developerCert, }; } } +impl SseDecode for crate::models::GreenlightDeviceCredentials { + // 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_device = >::sse_decode(deserializer); + return crate::models::GreenlightDeviceCredentials { device: var_device }; + } +} + impl SseDecode for crate::models::GreenlightNodeConfig { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -2035,52 +2268,50 @@ impl SseDecode for i64 { } } -impl SseDecode for crate::input_parser::InputType { +impl SseDecode for crate::binding::InputType { // 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_address = - ::sse_decode(deserializer); - return crate::input_parser::InputType::BitcoinAddress { + ::sse_decode(deserializer); + return crate::binding::InputType::BitcoinAddress { address: var_address, }; } 1 => { - let mut var_invoice = ::sse_decode(deserializer); - return crate::input_parser::InputType::Bolt11 { + let mut var_invoice = ::sse_decode(deserializer); + return crate::binding::InputType::Bolt11 { invoice: var_invoice, }; } 2 => { let mut var_nodeId = ::sse_decode(deserializer); - return crate::input_parser::InputType::NodeId { + return crate::binding::InputType::NodeId { node_id: var_nodeId, }; } 3 => { let mut var_url = ::sse_decode(deserializer); - return crate::input_parser::InputType::Url { url: var_url }; + return crate::binding::InputType::Url { url: var_url }; } 4 => { - let mut var_data = - ::sse_decode(deserializer); - return crate::input_parser::InputType::LnUrlPay { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::InputType::LnUrlPay { data: var_data }; } 5 => { let mut var_data = - ::sse_decode(deserializer); - return crate::input_parser::InputType::LnUrlWithdraw { data: var_data }; + ::sse_decode(deserializer); + return crate::binding::InputType::LnUrlWithdraw { data: var_data }; } 6 => { - let mut var_data = - ::sse_decode(deserializer); - return crate::input_parser::InputType::LnUrlAuth { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::InputType::LnUrlAuth { data: var_data }; } 7 => { - let mut var_data = ::sse_decode(deserializer); - return crate::input_parser::InputType::LnUrlError { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::InputType::LnUrlError { data: var_data }; } _ => { unimplemented!(""); @@ -2115,37 +2346,37 @@ impl SseDecode for Vec { } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } @@ -2247,13 +2478,13 @@ impl SseDecode for Vec { } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } @@ -2271,25 +2502,25 @@ impl SseDecode for Vec { } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } } -impl SseDecode for Vec { +impl SseDecode for Vec { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut len_ = ::sse_decode(deserializer); let mut ans_ = vec![]; for idx_ in 0..len_ { - ans_.push(::sse_decode(deserializer)); + ans_.push(::sse_decode(deserializer)); } return ans_; } @@ -2333,11 +2564,11 @@ impl SseDecode for Vec { } } -impl SseDecode for crate::invoice::LNInvoice { +impl SseDecode for crate::binding::LNInvoice { // 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_bolt11 = ::sse_decode(deserializer); - let mut var_network = ::sse_decode(deserializer); + let mut var_network = ::sse_decode(deserializer); let mut var_payeePubkey = ::sse_decode(deserializer); let mut var_paymentHash = ::sse_decode(deserializer); let mut var_description = >::sse_decode(deserializer); @@ -2345,10 +2576,10 @@ impl SseDecode for crate::invoice::LNInvoice { let mut var_amountMsat = >::sse_decode(deserializer); let mut var_timestamp = ::sse_decode(deserializer); let mut var_expiry = ::sse_decode(deserializer); - let mut var_routingHints = >::sse_decode(deserializer); + let mut var_routingHints = >::sse_decode(deserializer); let mut var_paymentSecret = >::sse_decode(deserializer); let mut var_minFinalCltvExpiryDelta = ::sse_decode(deserializer); - return crate::invoice::LNInvoice { + return crate::binding::LNInvoice { bolt11: var_bolt11, network: var_network, payee_pubkey: var_payeePubkey, @@ -2376,7 +2607,7 @@ impl SseDecode for crate::models::LnPaymentDetails { let mut var_bolt11 = ::sse_decode(deserializer); let mut var_openChannelBolt11 = >::sse_decode(deserializer); let mut var_lnurlSuccessAction = - >::sse_decode(deserializer); + >::sse_decode(deserializer); let mut var_lnurlPayDomain = >::sse_decode(deserializer); let mut var_lnurlPayComment = >::sse_decode(deserializer); let mut var_lnAddress = >::sse_decode(deserializer); @@ -2407,14 +2638,14 @@ impl SseDecode for crate::models::LnPaymentDetails { } } -impl SseDecode for crate::input_parser::LnUrlAuthRequestData { +impl SseDecode for crate::binding::LnUrlAuthRequestData { // 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_k1 = ::sse_decode(deserializer); let mut var_action = >::sse_decode(deserializer); let mut var_domain = ::sse_decode(deserializer); let mut var_url = ::sse_decode(deserializer); - return crate::input_parser::LnUrlAuthRequestData { + return crate::binding::LnUrlAuthRequestData { k1: var_k1, action: var_action, domain: var_domain, @@ -2423,17 +2654,17 @@ impl SseDecode for crate::input_parser::LnUrlAuthRequestData { } } -impl SseDecode for crate::models::LnUrlCallbackStatus { +impl SseDecode for crate::binding::LnUrlCallbackStatus { // 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::models::LnUrlCallbackStatus::Ok; + return crate::binding::LnUrlCallbackStatus::Ok; } 1 => { - let mut var_data = ::sse_decode(deserializer); - return crate::models::LnUrlCallbackStatus::ErrorStatus { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::LnUrlCallbackStatus::ErrorStatus { data: var_data }; } _ => { unimplemented!(""); @@ -2442,34 +2673,22 @@ impl SseDecode for crate::models::LnUrlCallbackStatus { } } -impl SseDecode for crate::input_parser::LnUrlErrorData { - // 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_reason = ::sse_decode(deserializer); - return crate::input_parser::LnUrlErrorData { reason: var_reason }; - } -} - -impl SseDecode for crate::lnurl::pay::model::LnUrlPayErrorData { +impl SseDecode for crate::binding::LnUrlErrorData { // 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_paymentHash = ::sse_decode(deserializer); let mut var_reason = ::sse_decode(deserializer); - return crate::lnurl::pay::model::LnUrlPayErrorData { - payment_hash: var_paymentHash, - reason: var_reason, - }; + return crate::binding::LnUrlErrorData { reason: var_reason }; } } -impl SseDecode for crate::models::LnUrlPayRequest { +impl SseDecode for crate::binding::LnUrlPayRequest { // 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_data = ::sse_decode(deserializer); + let mut var_data = ::sse_decode(deserializer); let mut var_amountMsat = ::sse_decode(deserializer); let mut var_comment = >::sse_decode(deserializer); let mut var_paymentLabel = >::sse_decode(deserializer); - return crate::models::LnUrlPayRequest { + return crate::binding::LnUrlPayRequest { data: var_data, amount_msat: var_amountMsat, comment: var_comment, @@ -2478,7 +2697,7 @@ impl SseDecode for crate::models::LnUrlPayRequest { } } -impl SseDecode for crate::input_parser::LnUrlPayRequestData { +impl SseDecode for crate::binding::LnUrlPayRequestData { // 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_callback = ::sse_decode(deserializer); @@ -2490,7 +2709,7 @@ impl SseDecode for crate::input_parser::LnUrlPayRequestData { let mut var_allowsNostr = ::sse_decode(deserializer); let mut var_nostrPubkey = >::sse_decode(deserializer); let mut var_lnAddress = >::sse_decode(deserializer); - return crate::input_parser::LnUrlPayRequestData { + return crate::binding::LnUrlPayRequestData { callback: var_callback, min_sendable: var_minSendable, max_sendable: var_maxSendable, @@ -2504,55 +2723,13 @@ impl SseDecode for crate::input_parser::LnUrlPayRequestData { } } -impl SseDecode for crate::lnurl::pay::model::LnUrlPayResult { - // 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_data = - ::sse_decode(deserializer); - return crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { - data: var_data, - }; - } - 1 => { - let mut var_data = ::sse_decode(deserializer); - return crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data: var_data }; - } - 2 => { - let mut var_data = - ::sse_decode(deserializer); - return crate::lnurl::pay::model::LnUrlPayResult::PayError { data: var_data }; - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseDecode for crate::lnurl::pay::model::LnUrlPaySuccessData { - // 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_payment = ::sse_decode(deserializer); - let mut var_successAction = - >::sse_decode(deserializer); - return crate::lnurl::pay::model::LnUrlPaySuccessData { - payment: var_payment, - success_action: var_successAction, - }; - } -} - -impl SseDecode for crate::models::LnUrlWithdrawRequest { +impl SseDecode for crate::binding::LnUrlWithdrawRequest { // 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_data = - ::sse_decode(deserializer); + let mut var_data = ::sse_decode(deserializer); let mut var_amountMsat = ::sse_decode(deserializer); let mut var_description = >::sse_decode(deserializer); - return crate::models::LnUrlWithdrawRequest { + return crate::binding::LnUrlWithdrawRequest { data: var_data, amount_msat: var_amountMsat, description: var_description, @@ -2560,7 +2737,7 @@ impl SseDecode for crate::models::LnUrlWithdrawRequest { } } -impl SseDecode for crate::input_parser::LnUrlWithdrawRequestData { +impl SseDecode for crate::binding::LnUrlWithdrawRequestData { // 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_callback = ::sse_decode(deserializer); @@ -2568,7 +2745,7 @@ impl SseDecode for crate::input_parser::LnUrlWithdrawRequestData { let mut var_defaultDescription = ::sse_decode(deserializer); let mut var_minWithdrawable = ::sse_decode(deserializer); let mut var_maxWithdrawable = ::sse_decode(deserializer); - return crate::input_parser::LnUrlWithdrawRequestData { + return crate::binding::LnUrlWithdrawRequestData { callback: var_callback, k1: var_k1, default_description: var_defaultDescription, @@ -2578,19 +2755,19 @@ impl SseDecode for crate::input_parser::LnUrlWithdrawRequestData { } } -impl SseDecode for crate::models::LnUrlWithdrawResult { +impl SseDecode for crate::binding::LnUrlWithdrawResult { // 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_data = - ::sse_decode(deserializer); - return crate::models::LnUrlWithdrawResult::Ok { data: var_data }; + ::sse_decode(deserializer); + return crate::binding::LnUrlWithdrawResult::Ok { data: var_data }; } 1 => { - let mut var_data = ::sse_decode(deserializer); - return crate::models::LnUrlWithdrawResult::ErrorStatus { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::LnUrlWithdrawResult::ErrorStatus { data: var_data }; } _ => { unimplemented!(""); @@ -2599,23 +2776,23 @@ impl SseDecode for crate::models::LnUrlWithdrawResult { } } -impl SseDecode for crate::models::LnUrlWithdrawSuccessData { +impl SseDecode for crate::binding::LnUrlWithdrawSuccessData { // 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_invoice = ::sse_decode(deserializer); - return crate::models::LnUrlWithdrawSuccessData { + let mut var_invoice = ::sse_decode(deserializer); + return crate::binding::LnUrlWithdrawSuccessData { invoice: var_invoice, }; } } -impl SseDecode for crate::fiat::LocaleOverrides { +impl SseDecode for crate::binding::LocaleOverrides { // 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_locale = ::sse_decode(deserializer); let mut var_spacing = >::sse_decode(deserializer); - let mut var_symbol = ::sse_decode(deserializer); - return crate::fiat::LocaleOverrides { + let mut var_symbol = ::sse_decode(deserializer); + return crate::binding::LocaleOverrides { locale: var_locale, spacing: var_spacing, symbol: var_symbol, @@ -2623,12 +2800,12 @@ impl SseDecode for crate::fiat::LocaleOverrides { } } -impl SseDecode for crate::fiat::LocalizedName { +impl SseDecode for crate::binding::LocalizedName { // 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_locale = ::sse_decode(deserializer); let mut var_name = ::sse_decode(deserializer); - return crate::fiat::LocalizedName { + return crate::binding::LocalizedName { locale: var_locale, name: var_name, }; @@ -2688,11 +2865,11 @@ impl SseDecode for crate::models::MaxReverseSwapAmountResponse { } } -impl SseDecode for crate::lnurl::pay::model::MessageSuccessActionData { +impl SseDecode for crate::binding::MessageSuccessActionData { // 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_message = ::sse_decode(deserializer); - return crate::lnurl::pay::model::MessageSuccessActionData { + return crate::binding::MessageSuccessActionData { message: var_message, }; } @@ -2710,15 +2887,15 @@ impl SseDecode for crate::models::MetadataFilter { } } -impl SseDecode for crate::models::Network { +impl SseDecode for crate::binding::Network { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut inner = ::sse_decode(deserializer); return match inner { - 0 => crate::models::Network::Bitcoin, - 1 => crate::models::Network::Testnet, - 2 => crate::models::Network::Signet, - 3 => crate::models::Network::Regtest, + 0 => crate::binding::Network::Bitcoin, + 1 => crate::binding::Network::Testnet, + 2 => crate::binding::Network::Signet, + 3 => crate::binding::Network::Regtest, _ => unreachable!("Invalid variant for Network: {}", inner), }; } @@ -2748,7 +2925,7 @@ impl SseDecode for crate::models::NodeCredentials { match tag_ { 0 => { let mut var_credentials = - ::sse_decode(deserializer); + ::sse_decode(deserializer); return crate::models::NodeCredentials::Greenlight { credentials: var_credentials, }; @@ -2903,11 +3080,11 @@ impl SseDecode for Option { } } -impl SseDecode for Option { +impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); + return Some(::sse_decode(deserializer)); } else { return None; } @@ -2969,13 +3146,13 @@ impl SseDecode for Option { } } -impl SseDecode for Option { +impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { if (::sse_decode(deserializer)) { - return Some( - ::sse_decode(deserializer), - ); + return Some(::sse_decode( + deserializer, + )); } else { return None; } @@ -2993,11 +3170,11 @@ impl SseDecode for Option { } } -impl SseDecode for Option { +impl SseDecode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { if (::sse_decode(deserializer)) { - return Some(::sse_decode(deserializer)); + return Some(::sse_decode(deserializer)); } else { return None; } @@ -3037,30 +3214,6 @@ impl SseDecode for Option> { } } -impl SseDecode for Option> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(>::sse_decode( - deserializer, - )); - } else { - return None; - } - } -} - -impl SseDecode for Option> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { - if (::sse_decode(deserializer)) { - return Some(>::sse_decode(deserializer)); - } else { - return None; - } - } -} - impl SseDecode for Option> { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -3186,7 +3339,7 @@ impl SseDecode for crate::breez_services::PaymentFailedData { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_error = ::sse_decode(deserializer); let mut var_nodeId = ::sse_decode(deserializer); - let mut var_invoice = >::sse_decode(deserializer); + let mut var_invoice = >::sse_decode(deserializer); let mut var_label = >::sse_decode(deserializer); return crate::breez_services::PaymentFailedData { error: var_error, @@ -3322,12 +3475,12 @@ impl SseDecode for crate::models::PrepareRefundResponse { } } -impl SseDecode for crate::fiat::Rate { +impl SseDecode for crate::binding::Rate { // 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_coin = ::sse_decode(deserializer); let mut var_value = ::sse_decode(deserializer); - return crate::fiat::Rate { + return crate::binding::Rate { coin: var_coin, value: var_value, }; @@ -3371,7 +3524,7 @@ impl SseDecode for crate::models::ReceivePaymentRequest { impl SseDecode for crate::models::ReceivePaymentResponse { // 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_lnInvoice = ::sse_decode(deserializer); + let mut var_lnInvoice = ::sse_decode(deserializer); let mut var_openingFeeParams = >::sse_decode(deserializer); let mut var_openingFeeMsat = >::sse_decode(deserializer); @@ -3543,15 +3696,15 @@ impl SseDecode for crate::models::ReverseSwapStatus { } } -impl SseDecode for crate::invoice::RouteHint { +impl SseDecode for crate::binding::RouteHint { // 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_hops = >::sse_decode(deserializer); - return crate::invoice::RouteHint { hops: var_hops }; + let mut var_hops = >::sse_decode(deserializer); + return crate::binding::RouteHint { hops: var_hops }; } } -impl SseDecode for crate::invoice::RouteHintHop { +impl SseDecode for crate::binding::RouteHintHop { // 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_srcNodeId = ::sse_decode(deserializer); @@ -3561,7 +3714,7 @@ impl SseDecode for crate::invoice::RouteHintHop { let mut var_cltvExpiryDelta = ::sse_decode(deserializer); let mut var_htlcMinimumMsat = >::sse_decode(deserializer); let mut var_htlcMaximumMsat = >::sse_decode(deserializer); - return crate::invoice::RouteHintHop { + return crate::binding::RouteHintHop { src_node_id: var_srcNodeId, short_channel_id: var_shortChannelId, fees_base_msat: var_feesBaseMsat, @@ -3685,31 +3838,24 @@ impl SseDecode for crate::models::StaticBackupResponse { } } -impl SseDecode for crate::lnurl::pay::model::SuccessActionProcessed { +impl SseDecode for crate::binding::SuccessActionProcessed { // 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_result = - ::sse_decode( - deserializer, - ); - return crate::lnurl::pay::model::SuccessActionProcessed::Aes { - result: var_result, - }; + ::sse_decode(deserializer); + return crate::binding::SuccessActionProcessed::Aes { result: var_result }; } 1 => { let mut var_data = - ::sse_decode(deserializer); - return crate::lnurl::pay::model::SuccessActionProcessed::Message { - data: var_data, - }; + ::sse_decode(deserializer); + return crate::binding::SuccessActionProcessed::Message { data: var_data }; } 2 => { - let mut var_data = - ::sse_decode(deserializer); - return crate::lnurl::pay::model::SuccessActionProcessed::Url { data: var_data }; + let mut var_data = ::sse_decode(deserializer); + return crate::binding::SuccessActionProcessed::Url { data: var_data }; } _ => { unimplemented!(""); @@ -3803,14 +3949,14 @@ impl SseDecode for crate::models::SwapStatus { } } -impl SseDecode for crate::fiat::Symbol { +impl SseDecode for crate::binding::Symbol { // 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_grapheme = >::sse_decode(deserializer); let mut var_template = >::sse_decode(deserializer); let mut var_rtl = >::sse_decode(deserializer); let mut var_position = >::sse_decode(deserializer); - return crate::fiat::Symbol { + return crate::binding::Symbol { grapheme: var_grapheme, template: var_template, rtl: var_rtl, @@ -3882,18 +4028,25 @@ impl SseDecode for crate::models::UnspentTransactionOutput { } } -impl SseDecode for crate::lnurl::pay::model::UrlSuccessActionData { +impl SseDecode for crate::binding::UrlSuccessActionData { // 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_description = ::sse_decode(deserializer); let mut var_url = ::sse_decode(deserializer); - return crate::lnurl::pay::model::UrlSuccessActionData { + return crate::binding::UrlSuccessActionData { description: var_description, url: var_url, }; } } +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 _ + } +} + fn pde_ffi_dispatcher_primary_impl( func_id: i32, port: flutter_rust_bridge::for_generated::MessagePort, @@ -3922,34 +4075,49 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { +impl flutter_rust_bridge::IntoDart for FrbWrapper { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self.0) + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for FrbWrapper {} + +impl flutter_rust_bridge::IntoIntoDart> for LnUrlPayResult { + fn into_into_dart(self) -> FrbWrapper { + self.into() + } +} + +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.description.into_into_dart().into_dart(), - self.plaintext.into_into_dart().into_dart(), + self.0.description.into_into_dart().into_dart(), + self.0.plaintext.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::AesSuccessActionDataDecrypted + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::AesSuccessActionDataDecrypted +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::AesSuccessActionDataDecrypted { - fn into_into_dart(self) -> crate::lnurl::pay::model::AesSuccessActionDataDecrypted { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActionDataResult { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { data } => { + match self.0 { + crate::binding::AesSuccessActionDataResult::Decrypted { data } => { [0.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { reason } => { + crate::binding::AesSuccessActionDataResult::ErrorStatus { reason } => { [1.into_dart(), reason.into_into_dart().into_dart()].into_dart() } _ => { @@ -3959,14 +4127,14 @@ impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActio } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::AesSuccessActionDataResult + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::AesSuccessActionDataResult +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::AesSuccessActionDataResult { - fn into_into_dart(self) -> crate::lnurl::pay::model::AesSuccessActionDataResult { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4022,27 +4190,27 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::BitcoinAddressData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.address.into_into_dart().into_dart(), - self.network.into_into_dart().into_dart(), - self.amount_sat.into_into_dart().into_dart(), - self.label.into_into_dart().into_dart(), - self.message.into_into_dart().into_dart(), + self.0.address.into_into_dart().into_dart(), + self.0.network.into_into_dart().into_dart(), + self.0.amount_sat.into_into_dart().into_dart(), + self.0.label.into_into_dart().into_dart(), + self.0.message.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::BitcoinAddressData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::BitcoinAddressData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::BitcoinAddressData { - fn into_into_dart(self) -> crate::input_parser::BitcoinAddressData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4293,24 +4461,29 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::CurrencyInfo { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.name.into_into_dart().into_dart(), - self.fraction_size.into_into_dart().into_dart(), - self.spacing.into_into_dart().into_dart(), - self.symbol.into_into_dart().into_dart(), - self.uniq_symbol.into_into_dart().into_dart(), - self.localized_name.into_into_dart().into_dart(), - self.locale_overrides.into_into_dart().into_dart(), + self.0.name.into_into_dart().into_dart(), + self.0.fraction_size.into_into_dart().into_dart(), + self.0.spacing.into_into_dart().into_dart(), + self.0.symbol.into_into_dart().into_dart(), + self.0.uniq_symbol.into_into_dart().into_dart(), + self.0.localized_name.into_into_dart().into_dart(), + self.0.locale_overrides.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::CurrencyInfo {} -impl flutter_rust_bridge::IntoIntoDart for crate::fiat::CurrencyInfo { - fn into_into_dart(self) -> crate::fiat::CurrencyInfo { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::CurrencyInfo +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4335,27 +4508,32 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::FiatCurrency { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.id.into_into_dart().into_dart(), - self.info.into_into_dart().into_dart(), + self.0.id.into_into_dart().into_dart(), + self.0.info.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::FiatCurrency {} -impl flutter_rust_bridge::IntoIntoDart for crate::fiat::FiatCurrency { - fn into_into_dart(self) -> crate::fiat::FiatCurrency { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::FiatCurrency +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::models::GreenlightCredentials { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.device_key.into_into_dart().into_dart(), - self.device_cert.into_into_dart().into_dart(), + self.developer_key.into_into_dart().into_dart(), + self.developer_cert.into_into_dart().into_dart(), ] .into_dart() } @@ -4372,6 +4550,23 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::models::GreenlightDeviceCredentials { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [self.device.into_into_dart().into_dart()].into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::models::GreenlightDeviceCredentials +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::models::GreenlightDeviceCredentials +{ + fn into_into_dart(self) -> crate::models::GreenlightDeviceCredentials { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::models::GreenlightNodeConfig { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -4415,31 +4610,31 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::InputType { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::input_parser::InputType::BitcoinAddress { address } => { + match self.0 { + crate::binding::InputType::BitcoinAddress { address } => { [0.into_dart(), address.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::Bolt11 { invoice } => { + crate::binding::InputType::Bolt11 { invoice } => { [1.into_dart(), invoice.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::NodeId { node_id } => { + crate::binding::InputType::NodeId { node_id } => { [2.into_dart(), node_id.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::Url { url } => { + crate::binding::InputType::Url { url } => { [3.into_dart(), url.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::LnUrlPay { data } => { + crate::binding::InputType::LnUrlPay { data } => { [4.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::LnUrlWithdraw { data } => { + crate::binding::InputType::LnUrlWithdraw { data } => { [5.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::LnUrlAuth { data } => { + crate::binding::InputType::LnUrlAuth { data } => { [6.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::input_parser::InputType::LnUrlError { data } => { + crate::binding::InputType::LnUrlError { data } => { [7.into_dart(), data.into_into_dart().into_dart()].into_dart() } _ => { @@ -4449,14 +4644,14 @@ impl flutter_rust_bridge::IntoDart for crate::input_parser::InputType { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::InputType + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::InputType +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::InputType { - fn into_into_dart(self) -> crate::input_parser::InputType { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4508,31 +4703,37 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::invoice::LNInvoice { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.bolt11.into_into_dart().into_dart(), - self.network.into_into_dart().into_dart(), - self.payee_pubkey.into_into_dart().into_dart(), - self.payment_hash.into_into_dart().into_dart(), - self.description.into_into_dart().into_dart(), - self.description_hash.into_into_dart().into_dart(), - self.amount_msat.into_into_dart().into_dart(), - self.timestamp.into_into_dart().into_dart(), - self.expiry.into_into_dart().into_dart(), - self.routing_hints.into_into_dart().into_dart(), - self.payment_secret.into_into_dart().into_dart(), - self.min_final_cltv_expiry_delta + self.0.bolt11.into_into_dart().into_dart(), + self.0.network.into_into_dart().into_dart(), + self.0.payee_pubkey.into_into_dart().into_dart(), + self.0.payment_hash.into_into_dart().into_dart(), + self.0.description.into_into_dart().into_dart(), + self.0.description_hash.into_into_dart().into_dart(), + self.0.amount_msat.into_into_dart().into_dart(), + self.0.timestamp.into_into_dart().into_dart(), + self.0.expiry.into_into_dart().into_dart(), + self.0.routing_hints.into_into_dart().into_dart(), + self.0.payment_secret.into_into_dart().into_dart(), + self.0 + .min_final_cltv_expiry_delta .into_into_dart() .into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::LNInvoice {} -impl flutter_rust_bridge::IntoIntoDart for crate::invoice::LNInvoice { - fn into_into_dart(self) -> crate::invoice::LNInvoice { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LNInvoice +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4571,34 +4772,34 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlAuthRequestData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.k1.into_into_dart().into_dart(), - self.action.into_into_dart().into_dart(), - self.domain.into_into_dart().into_dart(), - self.url.into_into_dart().into_dart(), + self.0.k1.into_into_dart().into_dart(), + self.0.action.into_into_dart().into_dart(), + self.0.domain.into_into_dart().into_dart(), + self.0.url.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::LnUrlAuthRequestData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::LnUrlAuthRequestData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlAuthRequestData { - fn into_into_dart(self) -> crate::input_parser::LnUrlAuthRequestData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::LnUrlCallbackStatus { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::models::LnUrlCallbackStatus::Ok => [0.into_dart()].into_dart(), - crate::models::LnUrlCallbackStatus::ErrorStatus { data } => { + match self.0 { + crate::binding::LnUrlCallbackStatus::Ok => [0.into_dart()].into_dart(), + crate::binding::LnUrlCallbackStatus::ErrorStatus { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } _ => { @@ -4608,210 +4809,138 @@ impl flutter_rust_bridge::IntoDart for crate::models::LnUrlCallbackStatus { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::models::LnUrlCallbackStatus + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::models::LnUrlCallbackStatus +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlCallbackStatus { - fn into_into_dart(self) -> crate::models::LnUrlCallbackStatus { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlErrorData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.reason.into_into_dart().into_dart()].into_dart() + [self.0.reason.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::LnUrlErrorData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::LnUrlErrorData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlErrorData { - fn into_into_dart(self) -> crate::input_parser::LnUrlErrorData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPayErrorData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.payment_hash.into_into_dart().into_dart(), - self.reason.into_into_dart().into_dart(), + self.0.data.into_into_dart().into_dart(), + self.0.amount_msat.into_into_dart().into_dart(), + self.0.comment.into_into_dart().into_dart(), + self.0.payment_label.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::LnUrlPayErrorData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::LnUrlPayErrorData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlPayRequest { - fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPayErrorData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::LnUrlPayRequest { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.data.into_into_dart().into_dart(), - self.amount_msat.into_into_dart().into_dart(), - self.comment.into_into_dart().into_dart(), - self.payment_label.into_into_dart().into_dart(), + self.0.callback.into_into_dart().into_dart(), + self.0.min_sendable.into_into_dart().into_dart(), + self.0.max_sendable.into_into_dart().into_dart(), + self.0.metadata_str.into_into_dart().into_dart(), + self.0.comment_allowed.into_into_dart().into_dart(), + self.0.domain.into_into_dart().into_dart(), + self.0.allows_nostr.into_into_dart().into_dart(), + self.0.nostr_pubkey.into_into_dart().into_dart(), + self.0.ln_address.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::models::LnUrlPayRequest + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::models::LnUrlPayRequest +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlPayRequestData { - fn into_into_dart(self) -> crate::models::LnUrlPayRequest { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlPayRequestData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.callback.into_into_dart().into_dart(), - self.min_sendable.into_into_dart().into_dart(), - self.max_sendable.into_into_dart().into_dart(), - self.metadata_str.into_into_dart().into_dart(), - self.comment_allowed.into_into_dart().into_dart(), - self.domain.into_into_dart().into_dart(), - self.allows_nostr.into_into_dart().into_dart(), - self.nostr_pubkey.into_into_dart().into_dart(), - self.ln_address.into_into_dart().into_dart(), + self.0.data.into_into_dart().into_dart(), + self.0.amount_msat.into_into_dart().into_dart(), + self.0.description.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::LnUrlPayRequestData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::LnUrlPayRequestData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlWithdrawRequest { - fn into_into_dart(self) -> crate::input_parser::LnUrlPayRequestData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPayResult { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { data } => { - [0.into_dart(), data.into_into_dart().into_dart()].into_dart() - } - crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data } => { - [1.into_dart(), data.into_into_dart().into_dart()].into_dart() - } - crate::lnurl::pay::model::LnUrlPayResult::PayError { data } => { - [2.into_dart(), data.into_into_dart().into_dart()].into_dart() - } - _ => { - unimplemented!(""); - } - } - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::LnUrlPayResult -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::LnUrlPayResult -{ - fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPayResult { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::LnUrlPaySuccessData { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.payment.into_into_dart().into_dart(), - self.success_action.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::LnUrlPaySuccessData -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::LnUrlPaySuccessData -{ - fn into_into_dart(self) -> crate::lnurl::pay::model::LnUrlPaySuccessData { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawRequest { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [ - self.data.into_into_dart().into_dart(), - self.amount_msat.into_into_dart().into_dart(), - self.description.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::models::LnUrlWithdrawRequest -{ -} -impl flutter_rust_bridge::IntoIntoDart - for crate::models::LnUrlWithdrawRequest -{ - fn into_into_dart(self) -> crate::models::LnUrlWithdrawRequest { - self - } -} -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::input_parser::LnUrlWithdrawRequestData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.callback.into_into_dart().into_dart(), - self.k1.into_into_dart().into_dart(), - self.default_description.into_into_dart().into_dart(), - self.min_withdrawable.into_into_dart().into_dart(), - self.max_withdrawable.into_into_dart().into_dart(), + self.0.callback.into_into_dart().into_dart(), + self.0.k1.into_into_dart().into_dart(), + self.0.default_description.into_into_dart().into_dart(), + self.0.min_withdrawable.into_into_dart().into_dart(), + self.0.max_withdrawable.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::input_parser::LnUrlWithdrawRequestData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::input_parser::LnUrlWithdrawRequestData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlWithdrawRequestData { - fn into_into_dart(self) -> crate::input_parser::LnUrlWithdrawRequestData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawResult { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::models::LnUrlWithdrawResult::Ok { data } => { + match self.0 { + crate::binding::LnUrlWithdrawResult::Ok { data } => { [0.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::models::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } _ => { @@ -4821,66 +4950,74 @@ impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawResult { } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::models::LnUrlWithdrawResult + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::models::LnUrlWithdrawResult +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlWithdrawResult { - fn into_into_dart(self) -> crate::models::LnUrlWithdrawResult { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::LnUrlWithdrawSuccessData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.invoice.into_into_dart().into_dart()].into_dart() + [self.0.invoice.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::models::LnUrlWithdrawSuccessData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::models::LnUrlWithdrawSuccessData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlWithdrawSuccessData { - fn into_into_dart(self) -> crate::models::LnUrlWithdrawSuccessData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::LocaleOverrides { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.locale.into_into_dart().into_dart(), - self.spacing.into_into_dart().into_dart(), - self.symbol.into_into_dart().into_dart(), + self.0.locale.into_into_dart().into_dart(), + self.0.spacing.into_into_dart().into_dart(), + self.0.symbol.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::LocaleOverrides {} -impl flutter_rust_bridge::IntoIntoDart - for crate::fiat::LocaleOverrides +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper { - fn into_into_dart(self) -> crate::fiat::LocaleOverrides { - self +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LocaleOverrides +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::LocalizedName { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.locale.into_into_dart().into_dart(), - self.name.into_into_dart().into_dart(), + self.0.locale.into_into_dart().into_dart(), + self.0.name.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::LocalizedName {} -impl flutter_rust_bridge::IntoIntoDart for crate::fiat::LocalizedName { - fn into_into_dart(self) -> crate::fiat::LocalizedName { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LocalizedName +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4942,20 +5079,20 @@ impl flutter_rust_bridge::IntoIntoDart { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.message.into_into_dart().into_dart()].into_dart() + [self.0.message.into_into_dart().into_dart()].into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::MessageSuccessActionData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::MessageSuccessActionData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::MessageSuccessActionData { - fn into_into_dart(self) -> crate::lnurl::pay::model::MessageSuccessActionData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -4977,21 +5114,26 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::models::Network { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - Self::Bitcoin => 0.into_dart(), - Self::Testnet => 1.into_dart(), - Self::Signet => 2.into_dart(), - Self::Regtest => 3.into_dart(), + match self.0 { + crate::binding::Network::Bitcoin => 0.into_dart(), + crate::binding::Network::Testnet => 1.into_dart(), + crate::binding::Network::Signet => 2.into_dart(), + crate::binding::Network::Regtest => 3.into_dart(), _ => unreachable!(), } } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::models::Network {} -impl flutter_rust_bridge::IntoIntoDart for crate::models::Network { - fn into_into_dart(self) -> crate::models::Network { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::Network +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5473,19 +5615,22 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::Rate { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.coin.into_into_dart().into_dart(), - self.value.into_into_dart().into_dart(), + self.0.coin.into_into_dart().into_dart(), + self.0.value.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::Rate {} -impl flutter_rust_bridge::IntoIntoDart for crate::fiat::Rate { - fn into_into_dart(self) -> crate::fiat::Rate { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> for crate::binding::Rate { + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -5787,40 +5932,49 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::invoice::RouteHint { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - [self.hops.into_into_dart().into_dart()].into_dart() + [self.0.hops.into_into_dart().into_dart()].into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::RouteHint {} -impl flutter_rust_bridge::IntoIntoDart for crate::invoice::RouteHint { - fn into_into_dart(self) -> crate::invoice::RouteHint { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::RouteHint +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::invoice::RouteHintHop { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.src_node_id.into_into_dart().into_dart(), - self.short_channel_id.into_into_dart().into_dart(), - self.fees_base_msat.into_into_dart().into_dart(), - self.fees_proportional_millionths + self.0.src_node_id.into_into_dart().into_dart(), + self.0.short_channel_id.into_into_dart().into_dart(), + self.0.fees_base_msat.into_into_dart().into_dart(), + self.0 + .fees_proportional_millionths .into_into_dart() .into_dart(), - self.cltv_expiry_delta.into_into_dart().into_dart(), - self.htlc_minimum_msat.into_into_dart().into_dart(), - self.htlc_maximum_msat.into_into_dart().into_dart(), + self.0.cltv_expiry_delta.into_into_dart().into_dart(), + self.0.htlc_minimum_msat.into_into_dart().into_dart(), + self.0.htlc_maximum_msat.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::invoice::RouteHintHop {} -impl flutter_rust_bridge::IntoIntoDart - for crate::invoice::RouteHintHop +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper { - fn into_into_dart(self) -> crate::invoice::RouteHintHop { - self +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::RouteHintHop +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -6011,16 +6165,16 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::SuccessActionProcessed { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - match self { - crate::lnurl::pay::model::SuccessActionProcessed::Aes { result } => { + match self.0 { + crate::binding::SuccessActionProcessed::Aes { result } => { [0.into_dart(), result.into_into_dart().into_dart()].into_dart() } - crate::lnurl::pay::model::SuccessActionProcessed::Message { data } => { + crate::binding::SuccessActionProcessed::Message { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::lnurl::pay::model::SuccessActionProcessed::Url { data } => { + crate::binding::SuccessActionProcessed::Url { data } => { [2.into_dart(), data.into_into_dart().into_dart()].into_dart() } _ => { @@ -6030,14 +6184,14 @@ impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::SuccessActionPr } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::SuccessActionProcessed + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::SuccessActionProcessed +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::SuccessActionProcessed { - fn into_into_dart(self) -> crate::lnurl::pay::model::SuccessActionProcessed { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -6117,21 +6271,26 @@ impl flutter_rust_bridge::IntoIntoDart for crate::mod } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::fiat::Symbol { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.grapheme.into_into_dart().into_dart(), - self.template.into_into_dart().into_dart(), - self.rtl.into_into_dart().into_dart(), - self.position.into_into_dart().into_dart(), + self.0.grapheme.into_into_dart().into_dart(), + self.0.template.into_into_dart().into_dart(), + self.0.rtl.into_into_dart().into_dart(), + self.0.position.into_into_dart().into_dart(), ] .into_dart() } } -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::fiat::Symbol {} -impl flutter_rust_bridge::IntoIntoDart for crate::fiat::Symbol { - fn into_into_dart(self) -> crate::fiat::Symbol { - self +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::Symbol +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() } } // Codec=Dco (DartCObject based), see doc to use other codecs @@ -6175,24 +6334,24 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::UrlSuccessActionData { +impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ - self.description.into_into_dart().into_dart(), - self.url.into_into_dart().into_dart(), + self.0.description.into_into_dart().into_dart(), + self.0.url.into_into_dart().into_dart(), ] .into_dart() } } impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive - for crate::lnurl::pay::model::UrlSuccessActionData + for FrbWrapper { } -impl flutter_rust_bridge::IntoIntoDart - for crate::lnurl::pay::model::UrlSuccessActionData +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::UrlSuccessActionData { - fn into_into_dart(self) -> crate::lnurl::pay::model::UrlSuccessActionData { - self + fn into_into_dart(self) -> FrbWrapper { + self.into() } } @@ -6203,6 +6362,24 @@ impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseEncode for LnUrlPayResult { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self), 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 StreamSink { @@ -6228,7 +6405,7 @@ impl SseEncode for String { } } -impl SseEncode for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { +impl SseEncode for crate::binding::AesSuccessActionDataDecrypted { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.description, serializer); @@ -6236,17 +6413,15 @@ impl SseEncode for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { } } -impl SseEncode for crate::lnurl::pay::model::AesSuccessActionDataResult { +impl SseEncode for crate::binding::AesSuccessActionDataResult { // 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::lnurl::pay::model::AesSuccessActionDataResult::Decrypted { data } => { + crate::binding::AesSuccessActionDataResult::Decrypted { data } => { ::sse_encode(0, serializer); - ::sse_encode( - data, serializer, - ); + ::sse_encode(data, serializer); } - crate::lnurl::pay::model::AesSuccessActionDataResult::ErrorStatus { reason } => { + crate::binding::AesSuccessActionDataResult::ErrorStatus { reason } => { ::sse_encode(1, serializer); ::sse_encode(reason, serializer); } @@ -6277,11 +6452,11 @@ impl SseEncode for crate::binding::BindingEventListener { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {} } -impl SseEncode for crate::input_parser::BitcoinAddressData { +impl SseEncode for crate::binding::BitcoinAddressData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.address, serializer); - ::sse_encode(self.network, serializer); + ::sse_encode(self.network, serializer); >::sse_encode(self.amount_sat, serializer); >::sse_encode(self.label, serializer); >::sse_encode(self.message, serializer); @@ -6421,7 +6596,7 @@ impl SseEncode for crate::models::Config { ::sse_encode(self.chainnotifier_url, serializer); >::sse_encode(self.mempoolspace_url, serializer); ::sse_encode(self.working_dir, serializer); - ::sse_encode(self.network, serializer); + ::sse_encode(self.network, serializer); ::sse_encode(self.payment_timeout_sec, serializer); >::sse_encode(self.default_lsp_id, serializer); >::sse_encode(self.api_key, serializer); @@ -6447,16 +6622,16 @@ impl SseEncode for crate::models::ConnectRequest { } } -impl SseEncode for crate::fiat::CurrencyInfo { +impl SseEncode for crate::binding::CurrencyInfo { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.name, serializer); ::sse_encode(self.fraction_size, serializer); >::sse_encode(self.spacing, serializer); - >::sse_encode(self.symbol, serializer); - >::sse_encode(self.uniq_symbol, serializer); - >>::sse_encode(self.localized_name, serializer); - >>::sse_encode(self.locale_overrides, serializer); + >::sse_encode(self.symbol, serializer); + >::sse_encode(self.uniq_symbol, serializer); + >::sse_encode(self.localized_name, serializer); + >::sse_encode(self.locale_overrides, serializer); } } @@ -6483,19 +6658,26 @@ impl SseEncode for f64 { } } -impl SseEncode for crate::fiat::FiatCurrency { +impl SseEncode for crate::binding::FiatCurrency { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.id, serializer); - ::sse_encode(self.info, serializer); + ::sse_encode(self.info, serializer); } } impl SseEncode for crate::models::GreenlightCredentials { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.device_key, serializer); - >::sse_encode(self.device_cert, serializer); + >::sse_encode(self.developer_key, serializer); + >::sse_encode(self.developer_cert, serializer); + } +} + +impl SseEncode for crate::models::GreenlightDeviceCredentials { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + >::sse_encode(self.device, serializer); } } @@ -6541,41 +6723,41 @@ impl SseEncode for i64 { } } -impl SseEncode for crate::input_parser::InputType { +impl SseEncode for crate::binding::InputType { // 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::input_parser::InputType::BitcoinAddress { address } => { + crate::binding::InputType::BitcoinAddress { address } => { ::sse_encode(0, serializer); - ::sse_encode(address, serializer); + ::sse_encode(address, serializer); } - crate::input_parser::InputType::Bolt11 { invoice } => { + crate::binding::InputType::Bolt11 { invoice } => { ::sse_encode(1, serializer); - ::sse_encode(invoice, serializer); + ::sse_encode(invoice, serializer); } - crate::input_parser::InputType::NodeId { node_id } => { + crate::binding::InputType::NodeId { node_id } => { ::sse_encode(2, serializer); ::sse_encode(node_id, serializer); } - crate::input_parser::InputType::Url { url } => { + crate::binding::InputType::Url { url } => { ::sse_encode(3, serializer); ::sse_encode(url, serializer); } - crate::input_parser::InputType::LnUrlPay { data } => { + crate::binding::InputType::LnUrlPay { data } => { ::sse_encode(4, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } - crate::input_parser::InputType::LnUrlWithdraw { data } => { + crate::binding::InputType::LnUrlWithdraw { data } => { ::sse_encode(5, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } - crate::input_parser::InputType::LnUrlAuth { data } => { + crate::binding::InputType::LnUrlAuth { data } => { ::sse_encode(6, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } - crate::input_parser::InputType::LnUrlError { data } => { + crate::binding::InputType::LnUrlError { data } => { ::sse_encode(7, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } _ => { unimplemented!(""); @@ -6603,32 +6785,32 @@ impl SseEncode for Vec { } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } @@ -6706,12 +6888,12 @@ impl SseEncode for Vec { } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } @@ -6726,22 +6908,22 @@ impl SseEncode for Vec { } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } -impl SseEncode for Vec { +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); + ::sse_encode(item, serializer); } } } @@ -6776,11 +6958,11 @@ impl SseEncode for Vec { } } -impl SseEncode for crate::invoice::LNInvoice { +impl SseEncode for crate::binding::LNInvoice { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.bolt11, serializer); - ::sse_encode(self.network, serializer); + ::sse_encode(self.network, serializer); ::sse_encode(self.payee_pubkey, serializer); ::sse_encode(self.payment_hash, serializer); >::sse_encode(self.description, serializer); @@ -6788,7 +6970,7 @@ impl SseEncode for crate::invoice::LNInvoice { >::sse_encode(self.amount_msat, serializer); ::sse_encode(self.timestamp, serializer); ::sse_encode(self.expiry, serializer); - >::sse_encode(self.routing_hints, serializer); + >::sse_encode(self.routing_hints, serializer); >::sse_encode(self.payment_secret, serializer); ::sse_encode(self.min_final_cltv_expiry_delta, serializer); } @@ -6804,7 +6986,7 @@ impl SseEncode for crate::models::LnPaymentDetails { ::sse_encode(self.keysend, serializer); ::sse_encode(self.bolt11, serializer); >::sse_encode(self.open_channel_bolt11, serializer); - >::sse_encode( + >::sse_encode( self.lnurl_success_action, serializer, ); @@ -6819,7 +7001,7 @@ impl SseEncode for crate::models::LnPaymentDetails { } } -impl SseEncode for crate::input_parser::LnUrlAuthRequestData { +impl SseEncode for crate::binding::LnUrlAuthRequestData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.k1, serializer); @@ -6829,16 +7011,16 @@ impl SseEncode for crate::input_parser::LnUrlAuthRequestData { } } -impl SseEncode for crate::models::LnUrlCallbackStatus { +impl SseEncode for crate::binding::LnUrlCallbackStatus { // 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::models::LnUrlCallbackStatus::Ok => { + crate::binding::LnUrlCallbackStatus::Ok => { ::sse_encode(0, serializer); } - crate::models::LnUrlCallbackStatus::ErrorStatus { data } => { + crate::binding::LnUrlCallbackStatus::ErrorStatus { data } => { ::sse_encode(1, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } _ => { unimplemented!(""); @@ -6847,32 +7029,24 @@ impl SseEncode for crate::models::LnUrlCallbackStatus { } } -impl SseEncode for crate::input_parser::LnUrlErrorData { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.reason, serializer); - } -} - -impl SseEncode for crate::lnurl::pay::model::LnUrlPayErrorData { +impl SseEncode for crate::binding::LnUrlErrorData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.payment_hash, serializer); ::sse_encode(self.reason, serializer); } } -impl SseEncode for crate::models::LnUrlPayRequest { +impl SseEncode for crate::binding::LnUrlPayRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.data, serializer); + ::sse_encode(self.data, serializer); ::sse_encode(self.amount_msat, serializer); >::sse_encode(self.comment, serializer); >::sse_encode(self.payment_label, serializer); } } -impl SseEncode for crate::input_parser::LnUrlPayRequestData { +impl SseEncode for crate::binding::LnUrlPayRequestData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.callback, serializer); @@ -6887,50 +7061,16 @@ impl SseEncode for crate::input_parser::LnUrlPayRequestData { } } -impl SseEncode for crate::lnurl::pay::model::LnUrlPayResult { +impl SseEncode for crate::binding::LnUrlWithdrawRequest { // 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::lnurl::pay::model::LnUrlPayResult::EndpointSuccess { data } => { - ::sse_encode(0, serializer); - ::sse_encode(data, serializer); - } - crate::lnurl::pay::model::LnUrlPayResult::EndpointError { data } => { - ::sse_encode(1, serializer); - ::sse_encode(data, serializer); - } - crate::lnurl::pay::model::LnUrlPayResult::PayError { data } => { - ::sse_encode(2, serializer); - ::sse_encode(data, serializer); - } - _ => { - unimplemented!(""); - } - } - } -} - -impl SseEncode for crate::lnurl::pay::model::LnUrlPaySuccessData { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.payment, serializer); - >::sse_encode( - self.success_action, - serializer, - ); - } -} - -impl SseEncode for crate::models::LnUrlWithdrawRequest { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.data, serializer); + ::sse_encode(self.data, serializer); ::sse_encode(self.amount_msat, serializer); >::sse_encode(self.description, serializer); } } -impl SseEncode for crate::input_parser::LnUrlWithdrawRequestData { +impl SseEncode for crate::binding::LnUrlWithdrawRequestData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.callback, serializer); @@ -6941,17 +7081,17 @@ impl SseEncode for crate::input_parser::LnUrlWithdrawRequestData { } } -impl SseEncode for crate::models::LnUrlWithdrawResult { +impl SseEncode for crate::binding::LnUrlWithdrawResult { // 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::models::LnUrlWithdrawResult::Ok { data } => { + crate::binding::LnUrlWithdrawResult::Ok { data } => { ::sse_encode(0, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } - crate::models::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { ::sse_encode(1, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } _ => { unimplemented!(""); @@ -6960,23 +7100,23 @@ impl SseEncode for crate::models::LnUrlWithdrawResult { } } -impl SseEncode for crate::models::LnUrlWithdrawSuccessData { +impl SseEncode for crate::binding::LnUrlWithdrawSuccessData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.invoice, serializer); + ::sse_encode(self.invoice, serializer); } } -impl SseEncode for crate::fiat::LocaleOverrides { +impl SseEncode for crate::binding::LocaleOverrides { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.locale, serializer); >::sse_encode(self.spacing, serializer); - ::sse_encode(self.symbol, serializer); + ::sse_encode(self.symbol, serializer); } } -impl SseEncode for crate::fiat::LocalizedName { +impl SseEncode for crate::binding::LocalizedName { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.locale, serializer); @@ -7016,7 +7156,7 @@ impl SseEncode for crate::models::MaxReverseSwapAmountResponse { } } -impl SseEncode for crate::lnurl::pay::model::MessageSuccessActionData { +impl SseEncode for crate::binding::MessageSuccessActionData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.message, serializer); @@ -7031,15 +7171,15 @@ impl SseEncode for crate::models::MetadataFilter { } } -impl SseEncode for crate::models::Network { +impl SseEncode for crate::binding::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::models::Network::Bitcoin => 0, - crate::models::Network::Testnet => 1, - crate::models::Network::Signet => 2, - crate::models::Network::Regtest => 3, + crate::binding::Network::Bitcoin => 0, + crate::binding::Network::Testnet => 1, + crate::binding::Network::Signet => 2, + crate::binding::Network::Regtest => 3, _ => { unimplemented!(""); } @@ -7070,7 +7210,7 @@ impl SseEncode for crate::models::NodeCredentials { match self { crate::models::NodeCredentials::Greenlight { credentials } => { ::sse_encode(0, serializer); - ::sse_encode(credentials, serializer); + ::sse_encode(credentials, serializer); } _ => { unimplemented!(""); @@ -7180,12 +7320,12 @@ impl SseEncode for Option { } } -impl SseEncode for Option { +impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.is_some(), serializer); if let Some(value) = self { - ::sse_encode(value, serializer); + ::sse_encode(value, serializer); } } } @@ -7240,12 +7380,12 @@ impl SseEncode for Option { } } -impl SseEncode for Option { +impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.is_some(), serializer); if let Some(value) = self { - ::sse_encode(value, serializer); + ::sse_encode(value, serializer); } } } @@ -7260,12 +7400,12 @@ impl SseEncode for Option { } } -impl SseEncode for Option { +impl SseEncode for Option { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.is_some(), serializer); if let Some(value) = self { - ::sse_encode(value, serializer); + ::sse_encode(value, serializer); } } } @@ -7300,26 +7440,6 @@ impl SseEncode for Option> { } } -impl SseEncode for Option> { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.is_some(), serializer); - if let Some(value) = self { - >::sse_encode(value, serializer); - } - } -} - -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) { @@ -7415,7 +7535,7 @@ impl SseEncode for crate::breez_services::PaymentFailedData { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.error, serializer); ::sse_encode(self.node_id, serializer); - >::sse_encode(self.invoice, serializer); + >::sse_encode(self.invoice, serializer); >::sse_encode(self.label, serializer); } } @@ -7526,7 +7646,7 @@ impl SseEncode for crate::models::PrepareRefundResponse { } } -impl SseEncode for crate::fiat::Rate { +impl SseEncode for crate::binding::Rate { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.coin, serializer); @@ -7557,7 +7677,7 @@ impl SseEncode for crate::models::ReceivePaymentRequest { impl SseEncode for crate::models::ReceivePaymentResponse { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - ::sse_encode(self.ln_invoice, serializer); + ::sse_encode(self.ln_invoice, serializer); >::sse_encode(self.opening_fee_params, serializer); >::sse_encode(self.opening_fee_msat, serializer); } @@ -7680,14 +7800,14 @@ impl SseEncode for crate::models::ReverseSwapStatus { } } -impl SseEncode for crate::invoice::RouteHint { +impl SseEncode for crate::binding::RouteHint { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >::sse_encode(self.hops, serializer); + >::sse_encode(self.hops, serializer); } } -impl SseEncode for crate::invoice::RouteHintHop { +impl SseEncode for crate::binding::RouteHintHop { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.src_node_id, serializer); @@ -7778,23 +7898,21 @@ impl SseEncode for crate::models::StaticBackupResponse { } } -impl SseEncode for crate::lnurl::pay::model::SuccessActionProcessed { +impl SseEncode for crate::binding::SuccessActionProcessed { // 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::lnurl::pay::model::SuccessActionProcessed::Aes { result } => { + crate::binding::SuccessActionProcessed::Aes { result } => { ::sse_encode(0, serializer); - ::sse_encode( - result, serializer, - ); + ::sse_encode(result, serializer); } - crate::lnurl::pay::model::SuccessActionProcessed::Message { data } => { + crate::binding::SuccessActionProcessed::Message { data } => { ::sse_encode(1, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } - crate::lnurl::pay::model::SuccessActionProcessed::Url { data } => { + crate::binding::SuccessActionProcessed::Url { data } => { ::sse_encode(2, serializer); - ::sse_encode(data, serializer); + ::sse_encode(data, serializer); } _ => { unimplemented!(""); @@ -7872,7 +7990,7 @@ impl SseEncode for crate::models::SwapStatus { } } -impl SseEncode for crate::fiat::Symbol { +impl SseEncode for crate::binding::Symbol { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { >::sse_encode(self.grapheme, serializer); @@ -7934,7 +8052,7 @@ impl SseEncode for crate::models::UnspentTransactionOutput { } } -impl SseEncode for crate::lnurl::pay::model::UrlSuccessActionData { +impl SseEncode for crate::binding::UrlSuccessActionData { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.description, serializer); @@ -7942,6 +8060,16 @@ impl SseEncode for crate::lnurl::pay::model::UrlSuccessActionData { } } +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(); + } +} + #[cfg(not(target_family = "wasm"))] #[path = "frb_generated.io.rs"] mod io; diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index f5ef06a3b..87a34bbf9 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -22,6 +22,10 @@ typedef struct _Dart_Handle* Dart_Handle; #define ESTIMATED_LOCKUP_TX_VSIZE 153 +#define MOCK_REVERSE_SWAP_MIN 50000 + +#define MOCK_REVERSE_SWAP_MAX 1000000 + typedef struct wire_cst_binding_event_listener { } wire_cst_binding_event_listener; @@ -303,8 +307,8 @@ typedef struct wire_cst_configure_node_request { } wire_cst_configure_node_request; typedef struct wire_cst_greenlight_credentials { - struct wire_cst_list_prim_u_8_strict *device_key; - struct wire_cst_list_prim_u_8_strict *device_cert; + struct wire_cst_list_prim_u_8_strict *developer_key; + struct wire_cst_list_prim_u_8_strict *developer_cert; } wire_cst_greenlight_credentials; typedef struct wire_cst_greenlight_node_config { @@ -541,20 +545,14 @@ typedef struct wire_cst_bitcoin_address_data { struct wire_cst_list_prim_u_8_strict *message; } wire_cst_bitcoin_address_data; +typedef struct wire_cst_greenlight_device_credentials { + struct wire_cst_list_prim_u_8_strict *device; +} wire_cst_greenlight_device_credentials; + typedef struct wire_cst_ln_url_error_data { struct wire_cst_list_prim_u_8_strict *reason; } wire_cst_ln_url_error_data; -typedef struct wire_cst_ln_url_pay_error_data { - struct wire_cst_list_prim_u_8_strict *payment_hash; - struct wire_cst_list_prim_u_8_strict *reason; -} wire_cst_ln_url_pay_error_data; - -typedef struct wire_cst_ln_url_pay_success_data { - struct wire_cst_payment payment; - struct wire_cst_success_action_processed *success_action; -} wire_cst_ln_url_pay_success_data; - typedef struct wire_cst_ln_url_withdraw_success_data { struct wire_cst_ln_invoice invoice; } wire_cst_ln_url_withdraw_success_data; @@ -583,7 +581,7 @@ typedef struct wire_cst_lsp_information { } wire_cst_lsp_information; typedef struct wire_cst_NodeCredentials_Greenlight { - struct wire_cst_greenlight_credentials *credentials; + struct wire_cst_greenlight_device_credentials *credentials; } wire_cst_NodeCredentials_Greenlight; typedef union NodeCredentialsKind { @@ -761,29 +759,6 @@ typedef struct wire_cst_ln_url_callback_status { union LnUrlCallbackStatusKind kind; } wire_cst_ln_url_callback_status; -typedef struct wire_cst_LnUrlPayResult_EndpointSuccess { - struct wire_cst_ln_url_pay_success_data *data; -} wire_cst_LnUrlPayResult_EndpointSuccess; - -typedef struct wire_cst_LnUrlPayResult_EndpointError { - struct wire_cst_ln_url_error_data *data; -} wire_cst_LnUrlPayResult_EndpointError; - -typedef struct wire_cst_LnUrlPayResult_PayError { - struct wire_cst_ln_url_pay_error_data *data; -} wire_cst_LnUrlPayResult_PayError; - -typedef union LnUrlPayResultKind { - struct wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; - struct wire_cst_LnUrlPayResult_EndpointError EndpointError; - struct wire_cst_LnUrlPayResult_PayError PayError; -} LnUrlPayResultKind; - -typedef struct wire_cst_ln_url_pay_result { - int32_t tag; - union LnUrlPayResultKind kind; -} wire_cst_ln_url_pay_result; - typedef struct wire_cst_LnUrlWithdrawResult_Ok { struct wire_cst_ln_url_withdraw_success_data *data; } wire_cst_LnUrlWithdrawResult_Ok; @@ -1070,6 +1045,10 @@ void frbgen_breez_sdk_wire__crate__binding__sync(int64_t port_); void frbgen_breez_sdk_wire__crate__binding__unregister_webhook(int64_t port_, struct wire_cst_list_prim_u_8_strict *webhook_url); +void frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult(const void *ptr); + +void frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult(const void *ptr); + struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); struct wire_cst_aes_success_action_data_result *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result(void); @@ -1096,6 +1075,8 @@ struct wire_cst_connect_request *frbgen_breez_sdk_cst_new_box_autoadd_connect_re struct wire_cst_greenlight_credentials *frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials(void); +struct wire_cst_greenlight_device_credentials *frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials(void); + struct wire_cst_greenlight_node_config *frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config(void); int64_t *frbgen_breez_sdk_cst_new_box_autoadd_i_64(int64_t value); @@ -1112,14 +1093,10 @@ struct wire_cst_ln_url_auth_request_data *frbgen_breez_sdk_cst_new_box_autoadd_l struct wire_cst_ln_url_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data(void); -struct wire_cst_ln_url_pay_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data(void); - struct wire_cst_ln_url_pay_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request(void); struct wire_cst_ln_url_pay_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data(void); -struct wire_cst_ln_url_pay_success_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data(void); - struct wire_cst_ln_url_withdraw_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request(void); struct wire_cst_ln_url_withdraw_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data(void); @@ -1236,6 +1213,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_connect_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_i_64); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details); @@ -1244,10 +1222,8 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data); @@ -1299,6 +1275,8 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_swap_info); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_tlv_entry); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup_status); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event); diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 0ec6fbf66..a82e7ac29 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -5,17 +5,15 @@ import 'breez_services.dart'; import 'chain.dart'; -import 'fiat.dart'; import 'frb_generated.dart'; -import 'input_parser.dart'; -import 'invoice.dart'; -import 'lnurl/pay/model.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'binding.freezed.dart'; // These functions are ignored because they are not marked as `pub`: `block_on`, `get_breez_services`, `init`, `new`, `rt` -// These types are ignored because they are not used by any `pub` functions: `BindingLogger` +// These types are ignored because they are not used by any `pub` functions: `BindingLogger`, `LnUrlPayErrorData`, `LnUrlPayError` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `enabled`, `flush`, `log` /// Wrapper around [BreezServices::connect] which also initializes SDK logging @@ -242,6 +240,42 @@ Future executeCommand({required String command}) => /// See [BreezServices::generate_diagnostic_data] Future generateDiagnosticData() => BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(); +// Rust type: RustOpaqueNom> +abstract class LnUrlPayResult implements RustOpaqueInterface {} + +class AesSuccessActionDataDecrypted { + final String description; + final String plaintext; + + const AesSuccessActionDataDecrypted({ + required this.description, + required this.plaintext, + }); + + @override + int get hashCode => description.hashCode ^ plaintext.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is AesSuccessActionDataDecrypted && + runtimeType == other.runtimeType && + description == other.description && + plaintext == other.plaintext; +} + +@freezed +sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { + const AesSuccessActionDataResult._(); + + const factory AesSuccessActionDataResult.decrypted({ + required AesSuccessActionDataDecrypted data, + }) = AesSuccessActionDataResult_Decrypted; + const factory AesSuccessActionDataResult.errorStatus({ + required String reason, + }) = AesSuccessActionDataResult_ErrorStatus; +} + class BindingEventListener { const BindingEventListener(); @@ -255,3 +289,614 @@ class BindingEventListener { bool operator ==(Object other) => identical(this, other) || other is BindingEventListener && runtimeType == other.runtimeType; } + +class BitcoinAddressData { + final String address; + final Network network; + final BigInt? amountSat; + final String? label; + final String? message; + + const BitcoinAddressData({ + required this.address, + required this.network, + this.amountSat, + this.label, + this.message, + }); + + @override + int get hashCode => + address.hashCode ^ network.hashCode ^ amountSat.hashCode ^ label.hashCode ^ message.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is BitcoinAddressData && + runtimeType == other.runtimeType && + address == other.address && + network == other.network && + amountSat == other.amountSat && + label == other.label && + message == other.message; +} + +class CurrencyInfo { + final String name; + final int fractionSize; + final int? spacing; + final Symbol? symbol; + final Symbol? uniqSymbol; + final List localizedName; + final List localeOverrides; + + const CurrencyInfo({ + required this.name, + required this.fractionSize, + this.spacing, + this.symbol, + this.uniqSymbol, + required this.localizedName, + required this.localeOverrides, + }); + + @override + int get hashCode => + name.hashCode ^ + fractionSize.hashCode ^ + spacing.hashCode ^ + symbol.hashCode ^ + uniqSymbol.hashCode ^ + localizedName.hashCode ^ + localeOverrides.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is CurrencyInfo && + runtimeType == other.runtimeType && + name == other.name && + fractionSize == other.fractionSize && + spacing == other.spacing && + symbol == other.symbol && + uniqSymbol == other.uniqSymbol && + localizedName == other.localizedName && + localeOverrides == other.localeOverrides; +} + +class FiatCurrency { + final String id; + final CurrencyInfo info; + + const FiatCurrency({ + required this.id, + required this.info, + }); + + @override + int get hashCode => id.hashCode ^ info.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is FiatCurrency && runtimeType == other.runtimeType && id == other.id && info == other.info; +} + +@freezed +sealed class InputType with _$InputType { + const InputType._(); + + const factory InputType.bitcoinAddress({ + required BitcoinAddressData address, + }) = InputType_BitcoinAddress; + const factory InputType.bolt11({ + required LNInvoice invoice, + }) = InputType_Bolt11; + const factory InputType.nodeId({ + required String nodeId, + }) = InputType_NodeId; + const factory InputType.url({ + required String url, + }) = InputType_Url; + const factory InputType.lnUrlPay({ + required LnUrlPayRequestData data, + }) = InputType_LnUrlPay; + const factory InputType.lnUrlWithdraw({ + required LnUrlWithdrawRequestData data, + }) = InputType_LnUrlWithdraw; + const factory InputType.lnUrlAuth({ + required LnUrlAuthRequestData data, + }) = InputType_LnUrlAuth; + const factory InputType.lnUrlError({ + required LnUrlErrorData data, + }) = InputType_LnUrlError; +} + +class LNInvoice { + final String bolt11; + final Network network; + final String payeePubkey; + final String paymentHash; + final String? description; + final String? descriptionHash; + final BigInt? amountMsat; + final BigInt timestamp; + final BigInt expiry; + final List routingHints; + final Uint8List paymentSecret; + final BigInt minFinalCltvExpiryDelta; + + const LNInvoice({ + required this.bolt11, + required this.network, + required this.payeePubkey, + required this.paymentHash, + this.description, + this.descriptionHash, + this.amountMsat, + required this.timestamp, + required this.expiry, + required this.routingHints, + required this.paymentSecret, + required this.minFinalCltvExpiryDelta, + }); + + @override + int get hashCode => + bolt11.hashCode ^ + network.hashCode ^ + payeePubkey.hashCode ^ + paymentHash.hashCode ^ + description.hashCode ^ + descriptionHash.hashCode ^ + amountMsat.hashCode ^ + timestamp.hashCode ^ + expiry.hashCode ^ + routingHints.hashCode ^ + paymentSecret.hashCode ^ + minFinalCltvExpiryDelta.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LNInvoice && + runtimeType == other.runtimeType && + bolt11 == other.bolt11 && + network == other.network && + payeePubkey == other.payeePubkey && + paymentHash == other.paymentHash && + description == other.description && + descriptionHash == other.descriptionHash && + amountMsat == other.amountMsat && + timestamp == other.timestamp && + expiry == other.expiry && + routingHints == other.routingHints && + paymentSecret == other.paymentSecret && + minFinalCltvExpiryDelta == other.minFinalCltvExpiryDelta; +} + +class LnUrlAuthRequestData { + final String k1; + final String? action; + final String domain; + final String url; + + const LnUrlAuthRequestData({ + required this.k1, + this.action, + required this.domain, + required this.url, + }); + + @override + int get hashCode => k1.hashCode ^ action.hashCode ^ domain.hashCode ^ url.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlAuthRequestData && + runtimeType == other.runtimeType && + k1 == other.k1 && + action == other.action && + domain == other.domain && + url == other.url; +} + +@freezed +sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { + const LnUrlCallbackStatus._(); + + const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; + const factory LnUrlCallbackStatus.errorStatus({ + required LnUrlErrorData data, + }) = LnUrlCallbackStatus_ErrorStatus; +} + +class LnUrlErrorData { + final String reason; + + const LnUrlErrorData({ + required this.reason, + }); + + @override + int get hashCode => reason.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlErrorData && runtimeType == other.runtimeType && reason == other.reason; +} + +class LnUrlPayRequest { + final LnUrlPayRequestData data; + final BigInt amountMsat; + final String? comment; + final String? paymentLabel; + + const LnUrlPayRequest({ + required this.data, + required this.amountMsat, + this.comment, + this.paymentLabel, + }); + + @override + int get hashCode => data.hashCode ^ amountMsat.hashCode ^ comment.hashCode ^ paymentLabel.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayRequest && + runtimeType == other.runtimeType && + data == other.data && + amountMsat == other.amountMsat && + comment == other.comment && + paymentLabel == other.paymentLabel; +} + +class LnUrlPayRequestData { + final String callback; + final BigInt minSendable; + final BigInt maxSendable; + final String metadataStr; + final int commentAllowed; + final String domain; + final bool allowsNostr; + final String? nostrPubkey; + final String? lnAddress; + + const LnUrlPayRequestData({ + required this.callback, + required this.minSendable, + required this.maxSendable, + required this.metadataStr, + required this.commentAllowed, + required this.domain, + required this.allowsNostr, + this.nostrPubkey, + this.lnAddress, + }); + + @override + int get hashCode => + callback.hashCode ^ + minSendable.hashCode ^ + maxSendable.hashCode ^ + metadataStr.hashCode ^ + commentAllowed.hashCode ^ + domain.hashCode ^ + allowsNostr.hashCode ^ + nostrPubkey.hashCode ^ + lnAddress.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayRequestData && + runtimeType == other.runtimeType && + callback == other.callback && + minSendable == other.minSendable && + maxSendable == other.maxSendable && + metadataStr == other.metadataStr && + commentAllowed == other.commentAllowed && + domain == other.domain && + allowsNostr == other.allowsNostr && + nostrPubkey == other.nostrPubkey && + lnAddress == other.lnAddress; +} + +class LnUrlWithdrawRequest { + final LnUrlWithdrawRequestData data; + final BigInt amountMsat; + final String? description; + + const LnUrlWithdrawRequest({ + required this.data, + required this.amountMsat, + this.description, + }); + + @override + int get hashCode => data.hashCode ^ amountMsat.hashCode ^ description.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawRequest && + runtimeType == other.runtimeType && + data == other.data && + amountMsat == other.amountMsat && + description == other.description; +} + +class LnUrlWithdrawRequestData { + final String callback; + final String k1; + final String defaultDescription; + final BigInt minWithdrawable; + final BigInt maxWithdrawable; + + const LnUrlWithdrawRequestData({ + required this.callback, + required this.k1, + required this.defaultDescription, + required this.minWithdrawable, + required this.maxWithdrawable, + }); + + @override + int get hashCode => + callback.hashCode ^ + k1.hashCode ^ + defaultDescription.hashCode ^ + minWithdrawable.hashCode ^ + maxWithdrawable.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawRequestData && + runtimeType == other.runtimeType && + callback == other.callback && + k1 == other.k1 && + defaultDescription == other.defaultDescription && + minWithdrawable == other.minWithdrawable && + maxWithdrawable == other.maxWithdrawable; +} + +@freezed +sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { + const LnUrlWithdrawResult._(); + + const factory LnUrlWithdrawResult.ok({ + required LnUrlWithdrawSuccessData data, + }) = LnUrlWithdrawResult_Ok; + const factory LnUrlWithdrawResult.errorStatus({ + required LnUrlErrorData data, + }) = LnUrlWithdrawResult_ErrorStatus; +} + +class LnUrlWithdrawSuccessData { + final LNInvoice invoice; + + const LnUrlWithdrawSuccessData({ + required this.invoice, + }); + + @override + int get hashCode => invoice.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlWithdrawSuccessData && runtimeType == other.runtimeType && invoice == other.invoice; +} + +class LocaleOverrides { + final String locale; + final int? spacing; + final Symbol symbol; + + const LocaleOverrides({ + required this.locale, + this.spacing, + required this.symbol, + }); + + @override + int get hashCode => locale.hashCode ^ spacing.hashCode ^ symbol.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LocaleOverrides && + runtimeType == other.runtimeType && + locale == other.locale && + spacing == other.spacing && + symbol == other.symbol; +} + +class LocalizedName { + final String locale; + final String name; + + const LocalizedName({ + required this.locale, + required this.name, + }); + + @override + int get hashCode => locale.hashCode ^ name.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LocalizedName && + runtimeType == other.runtimeType && + locale == other.locale && + name == other.name; +} + +class MessageSuccessActionData { + final String message; + + const MessageSuccessActionData({ + required this.message, + }); + + @override + int get hashCode => message.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is MessageSuccessActionData && runtimeType == other.runtimeType && message == other.message; +} + +enum Network { + Bitcoin, + Testnet, + Signet, + Regtest, + ; +} + +class Rate { + final String coin; + final double value; + + const Rate({ + required this.coin, + required this.value, + }); + + @override + int get hashCode => coin.hashCode ^ value.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Rate && runtimeType == other.runtimeType && coin == other.coin && value == other.value; +} + +class RouteHint { + final List hops; + + const RouteHint({ + required this.hops, + }); + + @override + int get hashCode => hops.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || other is RouteHint && runtimeType == other.runtimeType && hops == other.hops; +} + +class RouteHintHop { + final String srcNodeId; + final BigInt shortChannelId; + final int feesBaseMsat; + final int feesProportionalMillionths; + final BigInt cltvExpiryDelta; + final BigInt? htlcMinimumMsat; + final BigInt? htlcMaximumMsat; + + const RouteHintHop({ + required this.srcNodeId, + required this.shortChannelId, + required this.feesBaseMsat, + required this.feesProportionalMillionths, + required this.cltvExpiryDelta, + this.htlcMinimumMsat, + this.htlcMaximumMsat, + }); + + @override + int get hashCode => + srcNodeId.hashCode ^ + shortChannelId.hashCode ^ + feesBaseMsat.hashCode ^ + feesProportionalMillionths.hashCode ^ + cltvExpiryDelta.hashCode ^ + htlcMinimumMsat.hashCode ^ + htlcMaximumMsat.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is RouteHintHop && + runtimeType == other.runtimeType && + srcNodeId == other.srcNodeId && + shortChannelId == other.shortChannelId && + feesBaseMsat == other.feesBaseMsat && + feesProportionalMillionths == other.feesProportionalMillionths && + cltvExpiryDelta == other.cltvExpiryDelta && + htlcMinimumMsat == other.htlcMinimumMsat && + htlcMaximumMsat == other.htlcMaximumMsat; +} + +@freezed +sealed class SuccessActionProcessed with _$SuccessActionProcessed { + const SuccessActionProcessed._(); + + const factory SuccessActionProcessed.aes({ + required AesSuccessActionDataResult result, + }) = SuccessActionProcessed_Aes; + const factory SuccessActionProcessed.message({ + required MessageSuccessActionData data, + }) = SuccessActionProcessed_Message; + const factory SuccessActionProcessed.url({ + required UrlSuccessActionData data, + }) = SuccessActionProcessed_Url; +} + +class Symbol { + final String? grapheme; + final String? template; + final bool? rtl; + final int? position; + + const Symbol({ + this.grapheme, + this.template, + this.rtl, + this.position, + }); + + @override + int get hashCode => grapheme.hashCode ^ template.hashCode ^ rtl.hashCode ^ position.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Symbol && + runtimeType == other.runtimeType && + grapheme == other.grapheme && + template == other.template && + rtl == other.rtl && + position == other.position; +} + +class UrlSuccessActionData { + final String description; + final String url; + + const UrlSuccessActionData({ + required this.description, + required this.url, + }); + + @override + int get hashCode => description.hashCode ^ url.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is UrlSuccessActionData && + runtimeType == other.runtimeType && + description == other.description && + url == other.url; +} diff --git a/libs/sdk-flutter/lib/generated/binding.freezed.dart b/libs/sdk-flutter/lib/generated/binding.freezed.dart new file mode 100644 index 000000000..931c6318d --- /dev/null +++ b/libs/sdk-flutter/lib/generated/binding.freezed.dart @@ -0,0 +1,2929 @@ +// 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 'binding.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 _$AesSuccessActionDataResult { + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $AesSuccessActionDataResultCopyWith<$Res> { + factory $AesSuccessActionDataResultCopyWith( + AesSuccessActionDataResult value, $Res Function(AesSuccessActionDataResult) then) = + _$AesSuccessActionDataResultCopyWithImpl<$Res, AesSuccessActionDataResult>; +} + +/// @nodoc +class _$AesSuccessActionDataResultCopyWithImpl<$Res, $Val extends AesSuccessActionDataResult> + implements $AesSuccessActionDataResultCopyWith<$Res> { + _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { + factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( + _$AesSuccessActionDataResult_DecryptedImpl value, + $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = + __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; + @useResult + $Res call({AesSuccessActionDataDecrypted data}); +} + +/// @nodoc +class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_DecryptedImpl> + implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { + __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl(_$AesSuccessActionDataResult_DecryptedImpl _value, + $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$AesSuccessActionDataResult_DecryptedImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as AesSuccessActionDataDecrypted, + )); + } +} + +/// @nodoc + +class _$AesSuccessActionDataResult_DecryptedImpl extends AesSuccessActionDataResult_Decrypted { + const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}) : super._(); + + @override + final AesSuccessActionDataDecrypted data; + + @override + String toString() { + return 'AesSuccessActionDataResult.decrypted(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AesSuccessActionDataResult_DecryptedImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> + get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< + _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) { + return decrypted(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) { + return decrypted?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) { + if (decrypted != null) { + return decrypted(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, + }) { + return decrypted(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + }) { + return decrypted?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (decrypted != null) { + return decrypted(this); + } + return orElse(); + } +} + +abstract class AesSuccessActionDataResult_Decrypted extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_Decrypted({required final AesSuccessActionDataDecrypted data}) = + _$AesSuccessActionDataResult_DecryptedImpl; + const AesSuccessActionDataResult_Decrypted._() : super._(); + + AesSuccessActionDataDecrypted get data; + @JsonKey(ignore: true) + _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { + factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( + _$AesSuccessActionDataResult_ErrorStatusImpl value, + $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = + __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({String reason}); +} + +/// @nodoc +class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> + extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_ErrorStatusImpl> + implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { + __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( + _$AesSuccessActionDataResult_ErrorStatusImpl _value, + $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? reason = null, + }) { + return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( + reason: null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$AesSuccessActionDataResult_ErrorStatusImpl extends AesSuccessActionDataResult_ErrorStatus { + const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}) : super._(); + + @override + final String reason; + + @override + String toString() { + return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$AesSuccessActionDataResult_ErrorStatusImpl && + (identical(other.reason, reason) || other.reason == reason)); + } + + @override + int get hashCode => Object.hash(runtimeType, reason); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> + get copyWith => __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< + _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataDecrypted data) decrypted, + required TResult Function(String reason) errorStatus, + }) { + return errorStatus(reason); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult? Function(String reason)? errorStatus, + }) { + return errorStatus?.call(reason); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataDecrypted data)? decrypted, + TResult Function(String reason)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(reason); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, + required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, + TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class AesSuccessActionDataResult_ErrorStatus extends AesSuccessActionDataResult { + const factory AesSuccessActionDataResult_ErrorStatus({required final String reason}) = + _$AesSuccessActionDataResult_ErrorStatusImpl; + const AesSuccessActionDataResult_ErrorStatus._() : super._(); + + String get reason; + @JsonKey(ignore: true) + _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> + get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$InputType { + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $InputTypeCopyWith<$Res> { + factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = + _$InputTypeCopyWithImpl<$Res, InputType>; +} + +/// @nodoc +class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTypeCopyWith<$Res> { + _$InputTypeCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { + factory _$$InputType_BitcoinAddressImplCopyWith( + _$InputType_BitcoinAddressImpl value, $Res Function(_$InputType_BitcoinAddressImpl) then) = + __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; + @useResult + $Res call({BitcoinAddressData address}); +} + +/// @nodoc +class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> + implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { + __$$InputType_BitcoinAddressImplCopyWithImpl( + _$InputType_BitcoinAddressImpl _value, $Res Function(_$InputType_BitcoinAddressImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? address = null, + }) { + return _then(_$InputType_BitcoinAddressImpl( + address: null == address + ? _value.address + : address // ignore: cast_nullable_to_non_nullable + as BitcoinAddressData, + )); + } +} + +/// @nodoc + +class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { + const _$InputType_BitcoinAddressImpl({required this.address}) : super._(); + + @override + final BitcoinAddressData address; + + @override + String toString() { + return 'InputType.bitcoinAddress(address: $address)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_BitcoinAddressImpl && + (identical(other.address, address) || other.address == address)); + } + + @override + int get hashCode => Object.hash(runtimeType, address); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => + __$$InputType_BitcoinAddressImplCopyWithImpl<_$InputType_BitcoinAddressImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return bitcoinAddress(address); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return bitcoinAddress?.call(address); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (bitcoinAddress != null) { + return bitcoinAddress(address); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return bitcoinAddress(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return bitcoinAddress?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (bitcoinAddress != null) { + return bitcoinAddress(this); + } + return orElse(); + } +} + +abstract class InputType_BitcoinAddress extends InputType { + const factory InputType_BitcoinAddress({required final BitcoinAddressData address}) = + _$InputType_BitcoinAddressImpl; + const InputType_BitcoinAddress._() : super._(); + + BitcoinAddressData get address; + @JsonKey(ignore: true) + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { + factory _$$InputType_Bolt11ImplCopyWith( + _$InputType_Bolt11Impl value, $Res Function(_$InputType_Bolt11Impl) then) = + __$$InputType_Bolt11ImplCopyWithImpl<$Res>; + @useResult + $Res call({LNInvoice invoice}); +} + +/// @nodoc +class __$$InputType_Bolt11ImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> + implements _$$InputType_Bolt11ImplCopyWith<$Res> { + __$$InputType_Bolt11ImplCopyWithImpl( + _$InputType_Bolt11Impl _value, $Res Function(_$InputType_Bolt11Impl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? invoice = null, + }) { + return _then(_$InputType_Bolt11Impl( + invoice: null == invoice + ? _value.invoice + : invoice // ignore: cast_nullable_to_non_nullable + as LNInvoice, + )); + } +} + +/// @nodoc + +class _$InputType_Bolt11Impl extends InputType_Bolt11 { + const _$InputType_Bolt11Impl({required this.invoice}) : super._(); + + @override + final LNInvoice invoice; + + @override + String toString() { + return 'InputType.bolt11(invoice: $invoice)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_Bolt11Impl && + (identical(other.invoice, invoice) || other.invoice == invoice)); + } + + @override + int get hashCode => Object.hash(runtimeType, invoice); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => + __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return bolt11(invoice); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return bolt11?.call(invoice); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (bolt11 != null) { + return bolt11(invoice); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return bolt11(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return bolt11?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (bolt11 != null) { + return bolt11(this); + } + return orElse(); + } +} + +abstract class InputType_Bolt11 extends InputType { + const factory InputType_Bolt11({required final LNInvoice invoice}) = _$InputType_Bolt11Impl; + const InputType_Bolt11._() : super._(); + + LNInvoice get invoice; + @JsonKey(ignore: true) + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_NodeIdImplCopyWith<$Res> { + factory _$$InputType_NodeIdImplCopyWith( + _$InputType_NodeIdImpl value, $Res Function(_$InputType_NodeIdImpl) then) = + __$$InputType_NodeIdImplCopyWithImpl<$Res>; + @useResult + $Res call({String nodeId}); +} + +/// @nodoc +class __$$InputType_NodeIdImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> + implements _$$InputType_NodeIdImplCopyWith<$Res> { + __$$InputType_NodeIdImplCopyWithImpl( + _$InputType_NodeIdImpl _value, $Res Function(_$InputType_NodeIdImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? nodeId = null, + }) { + return _then(_$InputType_NodeIdImpl( + nodeId: null == nodeId + ? _value.nodeId + : nodeId // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$InputType_NodeIdImpl extends InputType_NodeId { + const _$InputType_NodeIdImpl({required this.nodeId}) : super._(); + + @override + final String nodeId; + + @override + String toString() { + return 'InputType.nodeId(nodeId: $nodeId)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_NodeIdImpl && + (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); + } + + @override + int get hashCode => Object.hash(runtimeType, nodeId); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => + __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return nodeId(this.nodeId); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return nodeId?.call(this.nodeId); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (nodeId != null) { + return nodeId(this.nodeId); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return nodeId(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return nodeId?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (nodeId != null) { + return nodeId(this); + } + return orElse(); + } +} + +abstract class InputType_NodeId extends InputType { + const factory InputType_NodeId({required final String nodeId}) = _$InputType_NodeIdImpl; + const InputType_NodeId._() : super._(); + + String get nodeId; + @JsonKey(ignore: true) + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_UrlImplCopyWith<$Res> { + factory _$$InputType_UrlImplCopyWith(_$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = + __$$InputType_UrlImplCopyWithImpl<$Res>; + @useResult + $Res call({String url}); +} + +/// @nodoc +class __$$InputType_UrlImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> + implements _$$InputType_UrlImplCopyWith<$Res> { + __$$InputType_UrlImplCopyWithImpl(_$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? url = null, + }) { + return _then(_$InputType_UrlImpl( + url: null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$InputType_UrlImpl extends InputType_Url { + const _$InputType_UrlImpl({required this.url}) : super._(); + + @override + final String url; + + @override + String toString() { + return 'InputType.url(url: $url)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_UrlImpl && + (identical(other.url, url) || other.url == url)); + } + + @override + int get hashCode => Object.hash(runtimeType, url); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => + __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return url(this.url); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return url?.call(this.url); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (url != null) { + return url(this.url); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return url(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return url?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (url != null) { + return url(this); + } + return orElse(); + } +} + +abstract class InputType_Url extends InputType { + const factory InputType_Url({required final String url}) = _$InputType_UrlImpl; + const InputType_Url._() : super._(); + + String get url; + @JsonKey(ignore: true) + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { + factory _$$InputType_LnUrlPayImplCopyWith( + _$InputType_LnUrlPayImpl value, $Res Function(_$InputType_LnUrlPayImpl) then) = + __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPayRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> + implements _$$InputType_LnUrlPayImplCopyWith<$Res> { + __$$InputType_LnUrlPayImplCopyWithImpl( + _$InputType_LnUrlPayImpl _value, $Res Function(_$InputType_LnUrlPayImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlPayImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPayRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { + const _$InputType_LnUrlPayImpl({required this.data}) : super._(); + + @override + final LnUrlPayRequestData data; + + @override + String toString() { + return 'InputType.lnUrlPay(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlPayImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => + __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlPay(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlPay?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlPay != null) { + return lnUrlPay(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlPay(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlPay?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlPay != null) { + return lnUrlPay(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlPay extends InputType { + const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = _$InputType_LnUrlPayImpl; + const InputType_LnUrlPay._() : super._(); + + LnUrlPayRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { + factory _$$InputType_LnUrlWithdrawImplCopyWith( + _$InputType_LnUrlWithdrawImpl value, $Res Function(_$InputType_LnUrlWithdrawImpl) then) = + __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> + implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { + __$$InputType_LnUrlWithdrawImplCopyWithImpl( + _$InputType_LnUrlWithdrawImpl _value, $Res Function(_$InputType_LnUrlWithdrawImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlWithdrawImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { + const _$InputType_LnUrlWithdrawImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawRequestData data; + + @override + String toString() { + return 'InputType.lnUrlWithdraw(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlWithdrawImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => + __$$InputType_LnUrlWithdrawImplCopyWithImpl<_$InputType_LnUrlWithdrawImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlWithdraw(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlWithdraw?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlWithdraw != null) { + return lnUrlWithdraw(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlWithdraw(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlWithdraw?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlWithdraw != null) { + return lnUrlWithdraw(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlWithdraw extends InputType { + const factory InputType_LnUrlWithdraw({required final LnUrlWithdrawRequestData data}) = + _$InputType_LnUrlWithdrawImpl; + const InputType_LnUrlWithdraw._() : super._(); + + LnUrlWithdrawRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { + factory _$$InputType_LnUrlAuthImplCopyWith( + _$InputType_LnUrlAuthImpl value, $Res Function(_$InputType_LnUrlAuthImpl) then) = + __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlAuthRequestData data}); +} + +/// @nodoc +class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> + implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { + __$$InputType_LnUrlAuthImplCopyWithImpl( + _$InputType_LnUrlAuthImpl _value, $Res Function(_$InputType_LnUrlAuthImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlAuthImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlAuthRequestData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { + const _$InputType_LnUrlAuthImpl({required this.data}) : super._(); + + @override + final LnUrlAuthRequestData data; + + @override + String toString() { + return 'InputType.lnUrlAuth(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlAuthImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => + __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlAuth(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlAuth?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlAuth != null) { + return lnUrlAuth(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlAuth(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlAuth?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlAuth != null) { + return lnUrlAuth(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlAuth extends InputType { + const factory InputType_LnUrlAuth({required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; + const InputType_LnUrlAuth._() : super._(); + + LnUrlAuthRequestData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { + factory _$$InputType_LnUrlErrorImplCopyWith( + _$InputType_LnUrlErrorImpl value, $Res Function(_$InputType_LnUrlErrorImpl) then) = + __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> + implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { + __$$InputType_LnUrlErrorImplCopyWithImpl( + _$InputType_LnUrlErrorImpl _value, $Res Function(_$InputType_LnUrlErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$InputType_LnUrlErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { + const _$InputType_LnUrlErrorImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'InputType.lnUrlError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$InputType_LnUrlErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => + __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(BitcoinAddressData address) bitcoinAddress, + required TResult Function(LNInvoice invoice) bolt11, + required TResult Function(String nodeId) nodeId, + required TResult Function(String url) url, + required TResult Function(LnUrlPayRequestData data) lnUrlPay, + required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, + required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, + required TResult Function(LnUrlErrorData data) lnUrlError, + }) { + return lnUrlError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(BitcoinAddressData address)? bitcoinAddress, + TResult? Function(LNInvoice invoice)? bolt11, + TResult? Function(String nodeId)? nodeId, + TResult? Function(String url)? url, + TResult? Function(LnUrlPayRequestData data)? lnUrlPay, + TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult? Function(LnUrlErrorData data)? lnUrlError, + }) { + return lnUrlError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(BitcoinAddressData address)? bitcoinAddress, + TResult Function(LNInvoice invoice)? bolt11, + TResult Function(String nodeId)? nodeId, + TResult Function(String url)? url, + TResult Function(LnUrlPayRequestData data)? lnUrlPay, + TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, + TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, + TResult Function(LnUrlErrorData data)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlError != null) { + return lnUrlError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, + required TResult Function(InputType_Bolt11 value) bolt11, + required TResult Function(InputType_NodeId value) nodeId, + required TResult Function(InputType_Url value) url, + required TResult Function(InputType_LnUrlPay value) lnUrlPay, + required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, + required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, + required TResult Function(InputType_LnUrlError value) lnUrlError, + }) { + return lnUrlError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult? Function(InputType_Bolt11 value)? bolt11, + TResult? Function(InputType_NodeId value)? nodeId, + TResult? Function(InputType_Url value)? url, + TResult? Function(InputType_LnUrlPay value)? lnUrlPay, + TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult? Function(InputType_LnUrlError value)? lnUrlError, + }) { + return lnUrlError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, + TResult Function(InputType_Bolt11 value)? bolt11, + TResult Function(InputType_NodeId value)? nodeId, + TResult Function(InputType_Url value)? url, + TResult Function(InputType_LnUrlPay value)? lnUrlPay, + TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, + TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, + TResult Function(InputType_LnUrlError value)? lnUrlError, + required TResult orElse(), + }) { + if (lnUrlError != null) { + return lnUrlError(this); + } + return orElse(); + } +} + +abstract class InputType_LnUrlError extends InputType { + const factory InputType_LnUrlError({required final LnUrlErrorData data}) = _$InputType_LnUrlErrorImpl; + const InputType_LnUrlError._() : super._(); + + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$LnUrlCallbackStatus { + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlCallbackStatusCopyWith<$Res> { + factory $LnUrlCallbackStatusCopyWith(LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = + _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; +} + +/// @nodoc +class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> + implements $LnUrlCallbackStatusCopyWith<$Res> { + _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { + factory _$$LnUrlCallbackStatus_OkImplCopyWith( + _$LnUrlCallbackStatus_OkImpl value, $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = + __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; +} + +/// @nodoc +class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_OkImpl> + implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { + __$$LnUrlCallbackStatus_OkImplCopyWithImpl( + _$LnUrlCallbackStatus_OkImpl _value, $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) + : super(_value, _then); +} + +/// @nodoc + +class _$LnUrlCallbackStatus_OkImpl extends LnUrlCallbackStatus_Ok { + const _$LnUrlCallbackStatus_OkImpl() : super._(); + + @override + String toString() { + return 'LnUrlCallbackStatus.ok()'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); + } + + @override + int get hashCode => runtimeType.hashCode; + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return ok(); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return ok?.call(); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, + }) { + return ok(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) { + return ok?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(this); + } + return orElse(); + } +} + +abstract class LnUrlCallbackStatus_Ok extends LnUrlCallbackStatus { + const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; + const LnUrlCallbackStatus_Ok._() : super._(); +} + +/// @nodoc +abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { + factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith(_$LnUrlCallbackStatus_ErrorStatusImpl value, + $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> + extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_ErrorStatusImpl> + implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl(_$LnUrlCallbackStatus_ErrorStatusImpl _value, + $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlCallbackStatus_ErrorStatusImpl extends LnUrlCallbackStatus_ErrorStatus { + const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlCallbackStatus.errorStatus(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlCallbackStatus_ErrorStatusImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => + __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<_$LnUrlCallbackStatus_ErrorStatusImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function() ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return errorStatus(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function()? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return errorStatus?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function()? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlCallbackStatus_Ok value) ok, + required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlCallbackStatus_Ok value)? ok, + TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlCallbackStatus_Ok value)? ok, + TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class LnUrlCallbackStatus_ErrorStatus extends LnUrlCallbackStatus { + const factory LnUrlCallbackStatus_ErrorStatus({required final LnUrlErrorData data}) = + _$LnUrlCallbackStatus_ErrorStatusImpl; + const LnUrlCallbackStatus_ErrorStatus._() : super._(); + + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$LnUrlWithdrawResult { + Object get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlWithdrawResultCopyWith<$Res> { + factory $LnUrlWithdrawResultCopyWith(LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = + _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; +} + +/// @nodoc +class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> + implements $LnUrlWithdrawResultCopyWith<$Res> { + _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_OkImplCopyWith( + _$LnUrlWithdrawResult_OkImpl value, $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = + __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawSuccessData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_OkImpl> + implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_OkImplCopyWithImpl( + _$LnUrlWithdrawResult_OkImpl _value, $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_OkImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawSuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { + const _$LnUrlWithdrawResult_OkImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawSuccessData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.ok(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_OkImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => + __$$LnUrlWithdrawResult_OkImplCopyWithImpl<_$LnUrlWithdrawResult_OkImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return ok(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return ok?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, + }) { + return ok(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return ok?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (ok != null) { + return ok(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_Ok({required final LnUrlWithdrawSuccessData data}) = + _$LnUrlWithdrawResult_OkImpl; + const LnUrlWithdrawResult_Ok._() : super._(); + + @override + LnUrlWithdrawSuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, + $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_ErrorStatusImpl> + implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl(_$LnUrlWithdrawResult_ErrorStatusImpl _value, + $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorStatus { + const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.errorStatus(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_ErrorStatusImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => + __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<_$LnUrlWithdrawResult_ErrorStatusImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return errorStatus(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return errorStatus?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, + }) { + return errorStatus(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return errorStatus?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (errorStatus != null) { + return errorStatus(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_ErrorStatus extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_ErrorStatus({required final LnUrlErrorData data}) = + _$LnUrlWithdrawResult_ErrorStatusImpl; + const LnUrlWithdrawResult_ErrorStatus._() : super._(); + + @override + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +mixin _$SuccessActionProcessed { + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $SuccessActionProcessedCopyWith<$Res> { + factory $SuccessActionProcessedCopyWith( + SuccessActionProcessed value, $Res Function(SuccessActionProcessed) then) = + _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; +} + +/// @nodoc +class _$SuccessActionProcessedCopyWithImpl<$Res, $Val extends SuccessActionProcessed> + implements $SuccessActionProcessedCopyWith<$Res> { + _$SuccessActionProcessedCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_AesImplCopyWith( + _$SuccessActionProcessed_AesImpl value, $Res Function(_$SuccessActionProcessed_AesImpl) then) = + __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; + @useResult + $Res call({AesSuccessActionDataResult result}); + + $AesSuccessActionDataResultCopyWith<$Res> get result; +} + +/// @nodoc +class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_AesImpl> + implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { + __$$SuccessActionProcessed_AesImplCopyWithImpl( + _$SuccessActionProcessed_AesImpl _value, $Res Function(_$SuccessActionProcessed_AesImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? result = null, + }) { + return _then(_$SuccessActionProcessed_AesImpl( + result: null == result + ? _value.result + : result // ignore: cast_nullable_to_non_nullable + as AesSuccessActionDataResult, + )); + } + + @override + @pragma('vm:prefer-inline') + $AesSuccessActionDataResultCopyWith<$Res> get result { + return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { + return _then(_value.copyWith(result: value)); + }); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_AesImpl extends SuccessActionProcessed_Aes { + const _$SuccessActionProcessed_AesImpl({required this.result}) : super._(); + + @override + final AesSuccessActionDataResult result; + + @override + String toString() { + return 'SuccessActionProcessed.aes(result: $result)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_AesImpl && + (identical(other.result, result) || other.result == result)); + } + + @override + int get hashCode => Object.hash(runtimeType, result); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => + __$$SuccessActionProcessed_AesImplCopyWithImpl<_$SuccessActionProcessed_AesImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return aes(result); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return aes?.call(result); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (aes != null) { + return aes(result); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return aes(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return aes?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (aes != null) { + return aes(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Aes extends SuccessActionProcessed { + const factory SuccessActionProcessed_Aes({required final AesSuccessActionDataResult result}) = + _$SuccessActionProcessed_AesImpl; + const SuccessActionProcessed_Aes._() : super._(); + + AesSuccessActionDataResult get result; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_MessageImplCopyWith(_$SuccessActionProcessed_MessageImpl value, + $Res Function(_$SuccessActionProcessed_MessageImpl) then) = + __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; + @useResult + $Res call({MessageSuccessActionData data}); +} + +/// @nodoc +class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_MessageImpl> + implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { + __$$SuccessActionProcessed_MessageImplCopyWithImpl( + _$SuccessActionProcessed_MessageImpl _value, $Res Function(_$SuccessActionProcessed_MessageImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$SuccessActionProcessed_MessageImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as MessageSuccessActionData, + )); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_MessageImpl extends SuccessActionProcessed_Message { + const _$SuccessActionProcessed_MessageImpl({required this.data}) : super._(); + + @override + final MessageSuccessActionData data; + + @override + String toString() { + return 'SuccessActionProcessed.message(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_MessageImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => + __$$SuccessActionProcessed_MessageImplCopyWithImpl<_$SuccessActionProcessed_MessageImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return message(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return message?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (message != null) { + return message(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return message(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return message?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (message != null) { + return message(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Message extends SuccessActionProcessed { + const factory SuccessActionProcessed_Message({required final MessageSuccessActionData data}) = + _$SuccessActionProcessed_MessageImpl; + const SuccessActionProcessed_Message._() : super._(); + + MessageSuccessActionData get data; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { + factory _$$SuccessActionProcessed_UrlImplCopyWith( + _$SuccessActionProcessed_UrlImpl value, $Res Function(_$SuccessActionProcessed_UrlImpl) then) = + __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; + @useResult + $Res call({UrlSuccessActionData data}); +} + +/// @nodoc +class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> + extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_UrlImpl> + implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { + __$$SuccessActionProcessed_UrlImplCopyWithImpl( + _$SuccessActionProcessed_UrlImpl _value, $Res Function(_$SuccessActionProcessed_UrlImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$SuccessActionProcessed_UrlImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as UrlSuccessActionData, + )); + } +} + +/// @nodoc + +class _$SuccessActionProcessed_UrlImpl extends SuccessActionProcessed_Url { + const _$SuccessActionProcessed_UrlImpl({required this.data}) : super._(); + + @override + final UrlSuccessActionData data; + + @override + String toString() { + return 'SuccessActionProcessed.url(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$SuccessActionProcessed_UrlImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => + __$$SuccessActionProcessed_UrlImplCopyWithImpl<_$SuccessActionProcessed_UrlImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(AesSuccessActionDataResult result) aes, + required TResult Function(MessageSuccessActionData data) message, + required TResult Function(UrlSuccessActionData data) url, + }) { + return url(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(AesSuccessActionDataResult result)? aes, + TResult? Function(MessageSuccessActionData data)? message, + TResult? Function(UrlSuccessActionData data)? url, + }) { + return url?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(AesSuccessActionDataResult result)? aes, + TResult Function(MessageSuccessActionData data)? message, + TResult Function(UrlSuccessActionData data)? url, + required TResult orElse(), + }) { + if (url != null) { + return url(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(SuccessActionProcessed_Aes value) aes, + required TResult Function(SuccessActionProcessed_Message value) message, + required TResult Function(SuccessActionProcessed_Url value) url, + }) { + return url(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(SuccessActionProcessed_Aes value)? aes, + TResult? Function(SuccessActionProcessed_Message value)? message, + TResult? Function(SuccessActionProcessed_Url value)? url, + }) { + return url?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(SuccessActionProcessed_Aes value)? aes, + TResult Function(SuccessActionProcessed_Message value)? message, + TResult Function(SuccessActionProcessed_Url value)? url, + required TResult orElse(), + }) { + if (url != null) { + return url(this); + } + return orElse(); + } +} + +abstract class SuccessActionProcessed_Url extends SuccessActionProcessed { + const factory SuccessActionProcessed_Url({required final UrlSuccessActionData data}) = + _$SuccessActionProcessed_UrlImpl; + const SuccessActionProcessed_Url._() : super._(); + + UrlSuccessActionData get data; + @JsonKey(ignore: true) + _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 6e1d7edc1..7ae7bfbdd 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -3,9 +3,8 @@ // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import +import 'binding.dart'; import 'frb_generated.dart'; -import 'invoice.dart'; -import 'lnurl/pay/model.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 28e918000..767ebfac5 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -8,12 +8,8 @@ import 'breez_services.dart'; import 'chain.dart'; import 'dart:async'; import 'dart:convert'; -import 'fiat.dart'; import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.js_interop) 'frb_generated.web.dart'; -import 'input_parser.dart'; -import 'invoice.dart'; -import 'lnurl/pay/model.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; @@ -200,6 +196,12 @@ abstract class BreezSdkBindingsApi extends BaseApi { Future crateBindingSync(); Future crateBindingUnregisterWebhook({required String webhookUrl}); + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_LnUrlPayResult; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_LnUrlPayResult; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_LnUrlPayResultPtr; } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -808,7 +810,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return wire.wire__crate__binding__lnurl_pay(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_ln_url_pay_result, + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult, decodeErrorData: dco_decode_AnyhowException, ), constMeta: kCrateBindingLnurlPayConstMeta, @@ -1566,12 +1569,33 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements argNames: ["webhookUrl"], ); + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_LnUrlPayResult => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_LnUrlPayResult => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult; + @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return AnyhowException(raw as String); } + @protected + LnUrlPayResult + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LnUrlPayResultImpl.frbInternalDcoDecode(raw as List); + } + + @protected + LnUrlPayResult dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return LnUrlPayResultImpl.frbInternalDcoDecode(raw as List); + } + @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1745,6 +1769,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_greenlight_credentials(raw); } + @protected + GreenlightDeviceCredentials dco_decode_box_autoadd_greenlight_device_credentials(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_greenlight_device_credentials(raw); + } + @protected GreenlightNodeConfig dco_decode_box_autoadd_greenlight_node_config(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1793,12 +1823,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_ln_url_error_data(raw); } - @protected - LnUrlPayErrorData dco_decode_box_autoadd_ln_url_pay_error_data(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_ln_url_pay_error_data(raw); - } - @protected LnUrlPayRequest dco_decode_box_autoadd_ln_url_pay_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1811,12 +1835,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_ln_url_pay_request_data(raw); } - @protected - LnUrlPaySuccessData dco_decode_box_autoadd_ln_url_pay_success_data(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dco_decode_ln_url_pay_success_data(raw); - } - @protected LnUrlWithdrawRequest dco_decode_box_autoadd_ln_url_withdraw_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2182,8 +2200,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements spacing: dco_decode_opt_box_autoadd_u_32(arr[2]), symbol: dco_decode_opt_box_autoadd_symbol(arr[3]), uniqSymbol: dco_decode_opt_box_autoadd_symbol(arr[4]), - localizedName: dco_decode_opt_list_localized_name(arr[5]), - localeOverrides: dco_decode_opt_list_locale_overrides(arr[6]), + localizedName: dco_decode_list_localized_name(arr[5]), + localeOverrides: dco_decode_list_locale_overrides(arr[6]), ); } @@ -2216,8 +2234,18 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements final arr = raw as List; if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); return GreenlightCredentials( - deviceKey: dco_decode_list_prim_u_8_strict(arr[0]), - deviceCert: dco_decode_list_prim_u_8_strict(arr[1]), + developerKey: dco_decode_list_prim_u_8_strict(arr[0]), + developerCert: dco_decode_list_prim_u_8_strict(arr[1]), + ); + } + + @protected + GreenlightDeviceCredentials dco_decode_greenlight_device_credentials(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 GreenlightDeviceCredentials( + device: dco_decode_list_prim_u_8_strict(arr[0]), ); } @@ -2505,17 +2533,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } - @protected - LnUrlPayErrorData dco_decode_ln_url_pay_error_data(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 LnUrlPayErrorData( - paymentHash: dco_decode_String(arr[0]), - reason: dco_decode_String(arr[1]), - ); - } - @protected LnUrlPayRequest dco_decode_ln_url_pay_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2547,38 +2564,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } - @protected - LnUrlPayResult dco_decode_ln_url_pay_result(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - switch (raw[0]) { - case 0: - return LnUrlPayResult_EndpointSuccess( - data: dco_decode_box_autoadd_ln_url_pay_success_data(raw[1]), - ); - case 1: - return LnUrlPayResult_EndpointError( - data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), - ); - case 2: - return LnUrlPayResult_PayError( - data: dco_decode_box_autoadd_ln_url_pay_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - @protected - LnUrlPaySuccessData dco_decode_ln_url_pay_success_data(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 LnUrlPaySuccessData( - payment: dco_decode_payment(arr[0]), - successAction: dco_decode_opt_box_autoadd_success_action_processed(arr[1]), - ); - } - @protected LnUrlWithdrawRequest dco_decode_ln_url_withdraw_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2742,7 +2727,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements switch (raw[0]) { case 0: return NodeCredentials_Greenlight( - credentials: dco_decode_box_autoadd_greenlight_credentials(raw[1]), + credentials: dco_decode_box_autoadd_greenlight_device_credentials(raw[1]), ); default: throw Exception("unreachable"); @@ -2924,18 +2909,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return raw == null ? null : dco_decode_list_String(raw); } - @protected - List? dco_decode_opt_list_locale_overrides(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_list_locale_overrides(raw); - } - - @protected - List? dco_decode_opt_list_localized_name(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return raw == null ? null : dco_decode_list_localized_name(raw); - } - @protected List? dco_decode_opt_list_metadata_filter(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3578,6 +3551,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + BigInt dco_decode_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + @protected AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3585,6 +3564,23 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return AnyhowException(inner); } + @protected + LnUrlPayResult + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LnUrlPayResultImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + LnUrlPayResult sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return LnUrlPayResultImpl.frbInternalSseDecode( + sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected RustStreamSink sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3753,6 +3749,13 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_greenlight_credentials(deserializer)); } + @protected + GreenlightDeviceCredentials sse_decode_box_autoadd_greenlight_device_credentials( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_greenlight_device_credentials(deserializer)); + } + @protected GreenlightNodeConfig sse_decode_box_autoadd_greenlight_node_config(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3801,12 +3804,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_ln_url_error_data(deserializer)); } - @protected - LnUrlPayErrorData sse_decode_box_autoadd_ln_url_pay_error_data(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_ln_url_pay_error_data(deserializer)); - } - @protected LnUrlPayRequest sse_decode_box_autoadd_ln_url_pay_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3819,12 +3816,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_ln_url_pay_request_data(deserializer)); } - @protected - LnUrlPaySuccessData sse_decode_box_autoadd_ln_url_pay_success_data(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return (sse_decode_ln_url_pay_success_data(deserializer)); - } - @protected LnUrlWithdrawRequest sse_decode_box_autoadd_ln_url_withdraw_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4181,8 +4172,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_spacing = sse_decode_opt_box_autoadd_u_32(deserializer); var var_symbol = sse_decode_opt_box_autoadd_symbol(deserializer); var var_uniqSymbol = sse_decode_opt_box_autoadd_symbol(deserializer); - var var_localizedName = sse_decode_opt_list_localized_name(deserializer); - var var_localeOverrides = sse_decode_opt_list_locale_overrides(deserializer); + var var_localizedName = sse_decode_list_localized_name(deserializer); + var var_localeOverrides = sse_decode_list_locale_overrides(deserializer); return CurrencyInfo( name: var_name, fractionSize: var_fractionSize, @@ -4217,9 +4208,16 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @protected GreenlightCredentials sse_decode_greenlight_credentials(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - var var_deviceKey = sse_decode_list_prim_u_8_strict(deserializer); - var var_deviceCert = sse_decode_list_prim_u_8_strict(deserializer); - return GreenlightCredentials(deviceKey: var_deviceKey, deviceCert: var_deviceCert); + var var_developerKey = sse_decode_list_prim_u_8_strict(deserializer); + var var_developerCert = sse_decode_list_prim_u_8_strict(deserializer); + return GreenlightCredentials(developerKey: var_developerKey, developerCert: var_developerCert); + } + + @protected + GreenlightDeviceCredentials sse_decode_greenlight_device_credentials(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_device = sse_decode_list_prim_u_8_strict(deserializer); + return GreenlightDeviceCredentials(device: var_device); } @protected @@ -4613,14 +4611,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return LnUrlErrorData(reason: var_reason); } - @protected - LnUrlPayErrorData sse_decode_ln_url_pay_error_data(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_paymentHash = sse_decode_String(deserializer); - var var_reason = sse_decode_String(deserializer); - return LnUrlPayErrorData(paymentHash: var_paymentHash, reason: var_reason); - } - @protected LnUrlPayRequest sse_decode_ln_url_pay_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4656,34 +4646,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements lnAddress: var_lnAddress); } - @protected - LnUrlPayResult sse_decode_ln_url_pay_result(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_data = sse_decode_box_autoadd_ln_url_pay_success_data(deserializer); - return LnUrlPayResult_EndpointSuccess(data: var_data); - case 1: - var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); - return LnUrlPayResult_EndpointError(data: var_data); - case 2: - var var_data = sse_decode_box_autoadd_ln_url_pay_error_data(deserializer); - return LnUrlPayResult_PayError(data: var_data); - default: - throw UnimplementedError(''); - } - } - - @protected - LnUrlPaySuccessData sse_decode_ln_url_pay_success_data(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - var var_payment = sse_decode_payment(deserializer); - var var_successAction = sse_decode_opt_box_autoadd_success_action_processed(deserializer); - return LnUrlPaySuccessData(payment: var_payment, successAction: var_successAction); - } - @protected LnUrlWithdrawRequest sse_decode_ln_url_withdraw_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4836,7 +4798,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var tag_ = sse_decode_i_32(deserializer); switch (tag_) { case 0: - var var_credentials = sse_decode_box_autoadd_greenlight_credentials(deserializer); + var var_credentials = sse_decode_box_autoadd_greenlight_device_credentials(deserializer); return NodeCredentials_Greenlight(credentials: var_credentials); default: throw UnimplementedError(''); @@ -5098,28 +5060,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } } - @protected - List? sse_decode_opt_list_locale_overrides(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_list_locale_overrides(deserializer)); - } else { - return null; - } - } - - @protected - List? sse_decode_opt_list_localized_name(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - if (sse_decode_bool(deserializer)) { - return (sse_decode_list_localized_name(deserializer)); - } else { - return null; - } - } - @protected List? sse_decode_opt_list_metadata_filter(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5756,6 +5696,28 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return UrlSuccessActionData(description: var_description, url: var_url); } + @protected + BigInt sse_decode_usize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); + } + + @protected + int cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + LnUrlPayResult raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as LnUrlPayResultImpl).frbInternalCstEncode(move: true); + } + + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + LnUrlPayResult raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return (raw as LnUrlPayResultImpl).frbInternalCstEncode(); + } + @protected bool cst_encode_bool(bool raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -5870,6 +5832,20 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.message, serializer); } + @protected + void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + LnUrlPayResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize((self as LnUrlPayResultImpl).frbInternalSseEncode(move: true), serializer); + } + + @protected + void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + LnUrlPayResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize((self as LnUrlPayResultImpl).frbInternalSseEncode(move: null), serializer); + } + @protected void sse_encode_StreamSink_breez_event_Dco(RustStreamSink self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6038,6 +6014,13 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_greenlight_credentials(self, serializer); } + @protected + void sse_encode_box_autoadd_greenlight_device_credentials( + GreenlightDeviceCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_greenlight_device_credentials(self, serializer); + } + @protected void sse_encode_box_autoadd_greenlight_node_config(GreenlightNodeConfig self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6086,12 +6069,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_ln_url_error_data(self, serializer); } - @protected - void sse_encode_box_autoadd_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_ln_url_pay_error_data(self, serializer); - } - @protected void sse_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6104,12 +6081,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_ln_url_pay_request_data(self, serializer); } - @protected - void sse_encode_box_autoadd_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_ln_url_pay_success_data(self, serializer); - } - @protected void sse_encode_box_autoadd_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6444,8 +6415,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_box_autoadd_u_32(self.spacing, serializer); sse_encode_opt_box_autoadd_symbol(self.symbol, serializer); sse_encode_opt_box_autoadd_symbol(self.uniqSymbol, serializer); - sse_encode_opt_list_localized_name(self.localizedName, serializer); - sse_encode_opt_list_locale_overrides(self.localeOverrides, serializer); + sse_encode_list_localized_name(self.localizedName, serializer); + sse_encode_list_locale_overrides(self.localeOverrides, serializer); } @protected @@ -6470,8 +6441,14 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements @protected void sse_encode_greenlight_credentials(GreenlightCredentials self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_list_prim_u_8_strict(self.deviceKey, serializer); - sse_encode_list_prim_u_8_strict(self.deviceCert, serializer); + sse_encode_list_prim_u_8_strict(self.developerKey, serializer); + sse_encode_list_prim_u_8_strict(self.developerCert, serializer); + } + + @protected + void sse_encode_greenlight_device_credentials(GreenlightDeviceCredentials self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_list_prim_u_8_strict(self.device, serializer); } @protected @@ -6771,13 +6748,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.reason, serializer); } - @protected - void sse_encode_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_String(self.paymentHash, serializer); - sse_encode_String(self.reason, serializer); - } - @protected void sse_encode_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6801,31 +6771,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_String(self.lnAddress, serializer); } - @protected - void sse_encode_ln_url_pay_result(LnUrlPayResult self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - switch (self) { - case LnUrlPayResult_EndpointSuccess(data: final data): - sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_ln_url_pay_success_data(data, serializer); - case LnUrlPayResult_EndpointError(data: final data): - sse_encode_i_32(1, serializer); - sse_encode_box_autoadd_ln_url_error_data(data, serializer); - case LnUrlPayResult_PayError(data: final data): - sse_encode_i_32(2, serializer); - sse_encode_box_autoadd_ln_url_pay_error_data(data, serializer); - default: - throw UnimplementedError(''); - } - } - - @protected - void sse_encode_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_payment(self.payment, serializer); - sse_encode_opt_box_autoadd_success_action_processed(self.successAction, serializer); - } - @protected void sse_encode_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6947,7 +6892,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements switch (self) { case NodeCredentials_Greenlight(credentials: final credentials): sse_encode_i_32(0, serializer); - sse_encode_box_autoadd_greenlight_credentials(credentials, serializer); + sse_encode_box_autoadd_greenlight_device_credentials(credentials, serializer); default: throw UnimplementedError(''); } @@ -7171,26 +7116,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } } - @protected - void sse_encode_opt_list_locale_overrides(List? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_list_locale_overrides(self, serializer); - } - } - - @protected - void sse_encode_opt_list_localized_name(List? self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - - sse_encode_bool(self != null, serializer); - if (self != null) { - sse_encode_list_localized_name(self, serializer); - } - } - @protected void sse_encode_opt_list_metadata_filter(List? self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7686,4 +7611,28 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.description, serializer); sse_encode_String(self.url, serializer); } + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } +} + +@sealed +class LnUrlPayResultImpl extends RustOpaque implements LnUrlPayResult { + // Not to be used by end users + LnUrlPayResultImpl.frbInternalDcoDecode(List wire) + : super.frbInternalDcoDecode(wire, _kStaticData); + + // Not to be used by end users + LnUrlPayResultImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) + : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: BreezSdkBindings.instance.api.rust_arc_increment_strong_count_LnUrlPayResult, + rustArcDecrementStrongCount: BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_LnUrlPayResult, + rustArcDecrementStrongCountPtr: + BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_LnUrlPayResultPtr, + ); } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index 534e46ad7..bdc2b7de2 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -9,11 +9,7 @@ import 'chain.dart'; import 'dart:async'; import 'dart:convert'; import 'dart:ffi' as ffi; -import 'fiat.dart'; import 'frb_generated.dart'; -import 'input_parser.dart'; -import 'invoice.dart'; -import 'lnurl/pay/model.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; @@ -26,9 +22,21 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr; + @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + LnUrlPayResult + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + dynamic raw); + + @protected + LnUrlPayResult dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + dynamic raw); + @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw); @@ -98,6 +106,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? dco_decode_opt_list_String(dynamic raw); - @protected - List? dco_decode_opt_list_locale_overrides(dynamic raw); - - @protected - List? dco_decode_opt_list_localized_name(dynamic raw); - @protected List? dco_decode_opt_list_metadata_filter(dynamic raw); @@ -674,9 +667,21 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer); @@ -749,6 +754,10 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? sse_decode_opt_list_String(SseDeserializer deserializer); - @protected - List? sse_decode_opt_list_locale_overrides(SseDeserializer deserializer); - - @protected - List? sse_decode_opt_list_localized_name(SseDeserializer deserializer); - @protected List? sse_decode_opt_list_metadata_filter(SseDeserializer deserializer); @@ -1331,6 +1322,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_AnyhowException(AnyhowException raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1476,6 +1470,15 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_greenlight_device_credentials( + GreenlightDeviceCredentials raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_greenlight_device_credentials(); + cst_api_fill_to_wire_greenlight_device_credentials(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_greenlight_node_config( GreenlightNodeConfig raw) { @@ -1542,15 +1545,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_ln_url_pay_error_data( - LnUrlPayErrorData raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_ln_url_pay_error_data(); - cst_api_fill_to_wire_ln_url_pay_error_data(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1568,15 +1562,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_ln_url_pay_success_data( - LnUrlPaySuccessData raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - final ptr = wire.cst_new_box_autoadd_ln_url_pay_success_data(); - cst_api_fill_to_wire_ln_url_pay_success_data(raw, ptr.ref); - return ptr; - } - @protected ffi.Pointer cst_encode_box_autoadd_ln_url_withdraw_request( LnUrlWithdrawRequest raw) { @@ -2144,19 +2129,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_opt_list_locale_overrides( - List? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_list_locale_overrides(raw); - } - - @protected - ffi.Pointer cst_encode_opt_list_localized_name(List? raw) { - // Codec=Cst (C-struct based), see doc to use other codecs - return raw == null ? ffi.nullptr : cst_encode_list_localized_name(raw); - } - @protected ffi.Pointer cst_encode_opt_list_metadata_filter(List? raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -2188,6 +2160,12 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { + cst_api_fill_to_wire_greenlight_device_credentials(apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_greenlight_node_config( GreenlightNodeConfig apiObj, ffi.Pointer wireObj) { @@ -2345,12 +2329,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { - cst_api_fill_to_wire_ln_url_pay_error_data(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_ln_url_pay_request( LnUrlPayRequest apiObj, ffi.Pointer wireObj) { @@ -2363,12 +2341,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { - cst_api_fill_to_wire_ln_url_pay_success_data(apiObj, wireObj.ref); - } - @protected void cst_api_fill_to_wire_box_autoadd_ln_url_withdraw_request( LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { @@ -2683,8 +2655,8 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl self, SseSerializer serializer); @@ -3581,6 +3539,10 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl? self, SseSerializer serializer); - @protected - void sse_encode_opt_list_locale_overrides(List? self, SseSerializer serializer); - - @protected - void sse_encode_opt_list_localized_name(List? self, SseSerializer serializer); - @protected void sse_encode_opt_list_metadata_filter(List? self, SseSerializer serializer); @@ -4175,6 +4119,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl)>(); + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr + .asFunction)>(); + ffi.Pointer cst_new_box_autoadd_aes_success_action_data_decrypted() { return _cst_new_box_autoadd_aes_success_action_data_decrypted(); @@ -5317,6 +5296,17 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_greenlight_credentials = _cst_new_box_autoadd_greenlight_credentialsPtr .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_greenlight_device_credentials() { + return _cst_new_box_autoadd_greenlight_device_credentials(); + } + + late final _cst_new_box_autoadd_greenlight_device_credentialsPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials'); + late final _cst_new_box_autoadd_greenlight_device_credentials = + _cst_new_box_autoadd_greenlight_device_credentialsPtr + .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_greenlight_node_config() { return _cst_new_box_autoadd_greenlight_node_config(); } @@ -5401,16 +5391,6 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_ln_url_error_data = _cst_new_box_autoadd_ln_url_error_dataPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_ln_url_pay_error_data() { - return _cst_new_box_autoadd_ln_url_pay_error_data(); - } - - late final _cst_new_box_autoadd_ln_url_pay_error_dataPtr = - _lookup Function()>>( - 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data'); - late final _cst_new_box_autoadd_ln_url_pay_error_data = _cst_new_box_autoadd_ln_url_pay_error_dataPtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_ln_url_pay_request() { return _cst_new_box_autoadd_ln_url_pay_request(); } @@ -5431,16 +5411,6 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_ln_url_pay_request_data = _cst_new_box_autoadd_ln_url_pay_request_dataPtr .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_ln_url_pay_success_data() { - return _cst_new_box_autoadd_ln_url_pay_success_data(); - } - - late final _cst_new_box_autoadd_ln_url_pay_success_dataPtr = - _lookup Function()>>( - 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data'); - late final _cst_new_box_autoadd_ln_url_pay_success_data = _cst_new_box_autoadd_ln_url_pay_success_dataPtr - .asFunction Function()>(); - ffi.Pointer cst_new_box_autoadd_ln_url_withdraw_request() { return _cst_new_box_autoadd_ln_url_withdraw_request(); } @@ -6477,9 +6447,9 @@ final class wire_cst_configure_node_request extends ffi.Struct { } final class wire_cst_greenlight_credentials extends ffi.Struct { - external ffi.Pointer device_key; + external ffi.Pointer developer_key; - external ffi.Pointer device_cert; + external ffi.Pointer developer_cert; } final class wire_cst_greenlight_node_config extends ffi.Struct { @@ -6834,22 +6804,14 @@ final class wire_cst_bitcoin_address_data extends ffi.Struct { external ffi.Pointer message; } -final class wire_cst_ln_url_error_data extends ffi.Struct { - external ffi.Pointer reason; +final class wire_cst_greenlight_device_credentials extends ffi.Struct { + external ffi.Pointer device; } -final class wire_cst_ln_url_pay_error_data extends ffi.Struct { - external ffi.Pointer payment_hash; - +final class wire_cst_ln_url_error_data extends ffi.Struct { external ffi.Pointer reason; } -final class wire_cst_ln_url_pay_success_data extends ffi.Struct { - external wire_cst_payment payment; - - external ffi.Pointer success_action; -} - final class wire_cst_ln_url_withdraw_success_data extends ffi.Struct { external wire_cst_ln_invoice invoice; } @@ -6894,7 +6856,7 @@ final class wire_cst_lsp_information extends ffi.Struct { } final class wire_cst_NodeCredentials_Greenlight extends ffi.Struct { - external ffi.Pointer credentials; + external ffi.Pointer credentials; } final class NodeCredentialsKind extends ffi.Union { @@ -7130,33 +7092,6 @@ final class wire_cst_ln_url_callback_status extends ffi.Struct { external LnUrlCallbackStatusKind kind; } -final class wire_cst_LnUrlPayResult_EndpointSuccess extends ffi.Struct { - external ffi.Pointer data; -} - -final class wire_cst_LnUrlPayResult_EndpointError extends ffi.Struct { - external ffi.Pointer data; -} - -final class wire_cst_LnUrlPayResult_PayError extends ffi.Struct { - external ffi.Pointer data; -} - -final class LnUrlPayResultKind extends ffi.Union { - external wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; - - external wire_cst_LnUrlPayResult_EndpointError EndpointError; - - external wire_cst_LnUrlPayResult_PayError PayError; -} - -final class wire_cst_ln_url_pay_result extends ffi.Struct { - @ffi.Int32() - external int tag; - - external LnUrlPayResultKind kind; -} - final class wire_cst_LnUrlWithdrawResult_Ok extends ffi.Struct { external ffi.Pointer data; } @@ -7340,3 +7275,7 @@ const int INVOICE_PAYMENT_FEE_EXPIRY_SECONDS = 3600; const int ESTIMATED_CLAIM_TX_VSIZE = 138; const int ESTIMATED_LOCKUP_TX_VSIZE = 153; + +const int MOCK_REVERSE_SWAP_MIN = 50000; + +const int MOCK_REVERSE_SWAP_MAX = 1000000; diff --git a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart index 85966dc4b..bec050b19 100644 --- a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart +++ b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart @@ -99,7 +99,8 @@ abstract class $InputTypeCopyWith<$Res> { } /// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTypeCopyWith<$Res> { +class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> + implements $InputTypeCopyWith<$Res> { _$InputTypeCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -111,7 +112,8 @@ class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTyp /// @nodoc abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, $Res Function(_$InputType_BitcoinAddressImpl) then) = + _$InputType_BitcoinAddressImpl value, + $Res Function(_$InputType_BitcoinAddressImpl) then) = __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; @useResult $Res call({BitcoinAddressData address}); @@ -122,7 +124,8 @@ class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, $Res Function(_$InputType_BitcoinAddressImpl) _then) + _$InputType_BitcoinAddressImpl _value, + $Res Function(_$InputType_BitcoinAddressImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -166,8 +169,9 @@ class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - __$$InputType_BitcoinAddressImplCopyWithImpl<_$InputType_BitcoinAddressImpl>(this, _$identity); + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> + get copyWith => __$$InputType_BitcoinAddressImplCopyWithImpl< + _$InputType_BitcoinAddressImpl>(this, _$identity); @override @optionalTypeArgs @@ -269,30 +273,32 @@ class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { } abstract class InputType_BitcoinAddress extends InputType { - const factory InputType_BitcoinAddress({required final BitcoinAddressData address}) = + const factory InputType_BitcoinAddress( + {required final BitcoinAddressData address}) = _$InputType_BitcoinAddressImpl; const InputType_BitcoinAddress._() : super._(); BitcoinAddressData get address; @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith( - _$InputType_Bolt11Impl value, $Res Function(_$InputType_Bolt11Impl) then) = + factory _$$InputType_Bolt11ImplCopyWith(_$InputType_Bolt11Impl value, + $Res Function(_$InputType_Bolt11Impl) then) = __$$InputType_Bolt11ImplCopyWithImpl<$Res>; @useResult $Res call({LNInvoice invoice}); } /// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> +class __$$InputType_Bolt11ImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl( - _$InputType_Bolt11Impl _value, $Res Function(_$InputType_Bolt11Impl) _then) + __$$InputType_Bolt11ImplCopyWithImpl(_$InputType_Bolt11Impl _value, + $Res Function(_$InputType_Bolt11Impl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -337,7 +343,8 @@ class _$InputType_Bolt11Impl extends InputType_Bolt11 { @override @pragma('vm:prefer-inline') _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>(this, _$identity); + __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>( + this, _$identity); @override @optionalTypeArgs @@ -439,28 +446,31 @@ class _$InputType_Bolt11Impl extends InputType_Bolt11 { } abstract class InputType_Bolt11 extends InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = _$InputType_Bolt11Impl; + const factory InputType_Bolt11({required final LNInvoice invoice}) = + _$InputType_Bolt11Impl; const InputType_Bolt11._() : super._(); LNInvoice get invoice; @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => throw _privateConstructorUsedError; + _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith( - _$InputType_NodeIdImpl value, $Res Function(_$InputType_NodeIdImpl) then) = + factory _$$InputType_NodeIdImplCopyWith(_$InputType_NodeIdImpl value, + $Res Function(_$InputType_NodeIdImpl) then) = __$$InputType_NodeIdImplCopyWithImpl<$Res>; @useResult $Res call({String nodeId}); } /// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> +class __$$InputType_NodeIdImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl( - _$InputType_NodeIdImpl _value, $Res Function(_$InputType_NodeIdImpl) _then) + __$$InputType_NodeIdImplCopyWithImpl(_$InputType_NodeIdImpl _value, + $Res Function(_$InputType_NodeIdImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -505,7 +515,8 @@ class _$InputType_NodeIdImpl extends InputType_NodeId { @override @pragma('vm:prefer-inline') _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>(this, _$identity); + __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>( + this, _$identity); @override @optionalTypeArgs @@ -607,26 +618,31 @@ class _$InputType_NodeIdImpl extends InputType_NodeId { } abstract class InputType_NodeId extends InputType { - const factory InputType_NodeId({required final String nodeId}) = _$InputType_NodeIdImpl; + const factory InputType_NodeId({required final String nodeId}) = + _$InputType_NodeIdImpl; const InputType_NodeId._() : super._(); String get nodeId; @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => throw _privateConstructorUsedError; + _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith(_$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = + factory _$$InputType_UrlImplCopyWith( + _$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = __$$InputType_UrlImplCopyWithImpl<$Res>; @useResult $Res call({String url}); } /// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> +class __$$InputType_UrlImplCopyWithImpl<$Res> + extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl(_$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) + __$$InputType_UrlImplCopyWithImpl( + _$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -773,18 +789,20 @@ class _$InputType_UrlImpl extends InputType_Url { } abstract class InputType_Url extends InputType { - const factory InputType_Url({required final String url}) = _$InputType_UrlImpl; + const factory InputType_Url({required final String url}) = + _$InputType_UrlImpl; const InputType_Url._() : super._(); String get url; @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => throw _privateConstructorUsedError; + _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => + throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith( - _$InputType_LnUrlPayImpl value, $Res Function(_$InputType_LnUrlPayImpl) then) = + factory _$$InputType_LnUrlPayImplCopyWith(_$InputType_LnUrlPayImpl value, + $Res Function(_$InputType_LnUrlPayImpl) then) = __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlPayRequestData data}); @@ -794,8 +812,8 @@ abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl( - _$InputType_LnUrlPayImpl _value, $Res Function(_$InputType_LnUrlPayImpl) _then) + __$$InputType_LnUrlPayImplCopyWithImpl(_$InputType_LnUrlPayImpl _value, + $Res Function(_$InputType_LnUrlPayImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -840,7 +858,8 @@ class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { @override @pragma('vm:prefer-inline') _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>(this, _$identity); + __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>( + this, _$identity); @override @optionalTypeArgs @@ -942,7 +961,8 @@ class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { } abstract class InputType_LnUrlPay extends InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = _$InputType_LnUrlPayImpl; + const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = + _$InputType_LnUrlPayImpl; const InputType_LnUrlPay._() : super._(); LnUrlPayRequestData get data; @@ -954,7 +974,8 @@ abstract class InputType_LnUrlPay extends InputType { /// @nodoc abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, $Res Function(_$InputType_LnUrlWithdrawImpl) then) = + _$InputType_LnUrlWithdrawImpl value, + $Res Function(_$InputType_LnUrlWithdrawImpl) then) = __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlWithdrawRequestData data}); @@ -965,7 +986,8 @@ class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, $Res Function(_$InputType_LnUrlWithdrawImpl) _then) + _$InputType_LnUrlWithdrawImpl _value, + $Res Function(_$InputType_LnUrlWithdrawImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1009,8 +1031,9 @@ class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - __$$InputType_LnUrlWithdrawImplCopyWithImpl<_$InputType_LnUrlWithdrawImpl>(this, _$identity); + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> + get copyWith => __$$InputType_LnUrlWithdrawImplCopyWithImpl< + _$InputType_LnUrlWithdrawImpl>(this, _$identity); @override @optionalTypeArgs @@ -1112,20 +1135,21 @@ class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { } abstract class InputType_LnUrlWithdraw extends InputType { - const factory InputType_LnUrlWithdraw({required final LnUrlWithdrawRequestData data}) = + const factory InputType_LnUrlWithdraw( + {required final LnUrlWithdrawRequestData data}) = _$InputType_LnUrlWithdrawImpl; const InputType_LnUrlWithdraw._() : super._(); LnUrlWithdrawRequestData get data; @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith( - _$InputType_LnUrlAuthImpl value, $Res Function(_$InputType_LnUrlAuthImpl) then) = + factory _$$InputType_LnUrlAuthImplCopyWith(_$InputType_LnUrlAuthImpl value, + $Res Function(_$InputType_LnUrlAuthImpl) then) = __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlAuthRequestData data}); @@ -1135,8 +1159,8 @@ abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl( - _$InputType_LnUrlAuthImpl _value, $Res Function(_$InputType_LnUrlAuthImpl) _then) + __$$InputType_LnUrlAuthImplCopyWithImpl(_$InputType_LnUrlAuthImpl _value, + $Res Function(_$InputType_LnUrlAuthImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1181,7 +1205,8 @@ class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { @override @pragma('vm:prefer-inline') _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>(this, _$identity); + __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1283,7 +1308,8 @@ class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { } abstract class InputType_LnUrlAuth extends InputType { - const factory InputType_LnUrlAuth({required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; + const factory InputType_LnUrlAuth( + {required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; const InputType_LnUrlAuth._() : super._(); LnUrlAuthRequestData get data; @@ -1294,8 +1320,8 @@ abstract class InputType_LnUrlAuth extends InputType { /// @nodoc abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith( - _$InputType_LnUrlErrorImpl value, $Res Function(_$InputType_LnUrlErrorImpl) then) = + factory _$$InputType_LnUrlErrorImplCopyWith(_$InputType_LnUrlErrorImpl value, + $Res Function(_$InputType_LnUrlErrorImpl) then) = __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; @useResult $Res call({LnUrlErrorData data}); @@ -1305,8 +1331,8 @@ abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl( - _$InputType_LnUrlErrorImpl _value, $Res Function(_$InputType_LnUrlErrorImpl) _then) + __$$InputType_LnUrlErrorImplCopyWithImpl(_$InputType_LnUrlErrorImpl _value, + $Res Function(_$InputType_LnUrlErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1350,8 +1376,10 @@ class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>(this, _$identity); + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> + get copyWith => + __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1453,11 +1481,12 @@ class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { } abstract class InputType_LnUrlError extends InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = _$InputType_LnUrlErrorImpl; + const factory InputType_LnUrlError({required final LnUrlErrorData data}) = + _$InputType_LnUrlErrorImpl; const InputType_LnUrlError._() : super._(); LnUrlErrorData get data; @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> + get copyWith => throw _privateConstructorUsedError; } diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index f547c7e85..e46eea34b 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -3,10 +3,8 @@ // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import +import 'binding.dart'; import 'frb_generated.dart'; -import 'input_parser.dart'; -import 'invoice.dart'; -import 'lnurl/pay/model.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'models.freezed.dart'; @@ -253,24 +251,41 @@ enum EnvironmentType { /// Client-specific credentials to connect to and manage a Greenlight node in the cloud class GreenlightCredentials { - final Uint8List deviceKey; - final Uint8List deviceCert; + final Uint8List developerKey; + final Uint8List developerCert; const GreenlightCredentials({ - required this.deviceKey, - required this.deviceCert, + required this.developerKey, + required this.developerCert, }); @override - int get hashCode => deviceKey.hashCode ^ deviceCert.hashCode; + int get hashCode => developerKey.hashCode ^ developerCert.hashCode; @override bool operator ==(Object other) => identical(this, other) || other is GreenlightCredentials && runtimeType == other.runtimeType && - deviceKey == other.deviceKey && - deviceCert == other.deviceCert; + developerKey == other.developerKey && + developerCert == other.developerCert; +} + +/// Device credentials used to authenticate to Greenlight with the current device. +class GreenlightDeviceCredentials { + final Uint8List device; + + const GreenlightDeviceCredentials({ + required this.device, + }); + + @override + int get hashCode => device.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is GreenlightDeviceCredentials && runtimeType == other.runtimeType && device == other.device; } class GreenlightNodeConfig { @@ -452,115 +467,6 @@ class LnPaymentDetails { pendingExpirationBlock == other.pendingExpirationBlock; } -@freezed -sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { - const LnUrlCallbackStatus._(); - - /// On-wire format is: `{"status": "OK"}` - const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; - - /// On-wire format is: `{"status": "ERROR", "reason": "error details..."}` - const factory LnUrlCallbackStatus.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlCallbackStatus_ErrorStatus; -} - -/// Represents a LNURL-pay request. -class LnUrlPayRequest { - /// The [LnUrlPayRequestData] returned by [crate::input_parser::parse] - final LnUrlPayRequestData data; - - /// The amount in millisatoshis for this payment - final BigInt amountMsat; - - /// An optional comment for this payment - final String? comment; - - /// The external label or identifier of the [Payment] - final String? paymentLabel; - - const LnUrlPayRequest({ - required this.data, - required this.amountMsat, - this.comment, - this.paymentLabel, - }); - - @override - int get hashCode => data.hashCode ^ amountMsat.hashCode ^ comment.hashCode ^ paymentLabel.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlPayRequest && - runtimeType == other.runtimeType && - data == other.data && - amountMsat == other.amountMsat && - comment == other.comment && - paymentLabel == other.paymentLabel; -} - -class LnUrlWithdrawRequest { - /// Request data containing information on how to call the lnurl withdraw - /// endpoint. Typically retrieved by calling `parse()` on a lnurl withdraw - /// input. - final LnUrlWithdrawRequestData data; - - /// The amount to withdraw from the lnurl withdraw endpoint. Must be between - /// `min_withdrawable` and `max_withdrawable`. - final BigInt amountMsat; - - /// Optional description that will be put in the payment request for the - /// lnurl withdraw endpoint. - final String? description; - - const LnUrlWithdrawRequest({ - required this.data, - required this.amountMsat, - this.description, - }); - - @override - int get hashCode => data.hashCode ^ amountMsat.hashCode ^ description.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlWithdrawRequest && - runtimeType == other.runtimeType && - data == other.data && - amountMsat == other.amountMsat && - description == other.description; -} - -@freezed -sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { - const LnUrlWithdrawResult._(); - - const factory LnUrlWithdrawResult.ok({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Ok; - const factory LnUrlWithdrawResult.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlWithdrawResult_ErrorStatus; -} - -class LnUrlWithdrawSuccessData { - final LNInvoice invoice; - - const LnUrlWithdrawSuccessData({ - required this.invoice, - }); - - @override - int get hashCode => invoice.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlWithdrawSuccessData && runtimeType == other.runtimeType && invoice == other.invoice; -} - /// Internal SDK log entry class LogEntry { final String line; @@ -623,16 +529,6 @@ class MetadataFilter { jsonValue == other.jsonValue; } -/// The different supported bitcoin networks -enum Network { - /// Mainnet - Bitcoin, - Testnet, - Signet, - Regtest, - ; -} - @freezed sealed class NodeConfig with _$NodeConfig { const NodeConfig._(); @@ -647,7 +543,7 @@ sealed class NodeCredentials with _$NodeCredentials { const NodeCredentials._(); const factory NodeCredentials.greenlight({ - required GreenlightCredentials credentials, + required GreenlightDeviceCredentials credentials, }) = NodeCredentials_Greenlight; } diff --git a/libs/sdk-flutter/lib/generated/models.freezed.dart b/libs/sdk-flutter/lib/generated/models.freezed.dart index f056ff34b..003e2e524 100644 --- a/libs/sdk-flutter/lib/generated/models.freezed.dart +++ b/libs/sdk-flutter/lib/generated/models.freezed.dart @@ -14,637 +14,6 @@ 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 _$LnUrlCallbackStatus { - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlCallbackStatusCopyWith<$Res> { - factory $LnUrlCallbackStatusCopyWith(LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = - _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; -} - -/// @nodoc -class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> - implements $LnUrlCallbackStatusCopyWith<$Res> { - _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_OkImplCopyWith( - _$LnUrlCallbackStatus_OkImpl value, $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = - __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_OkImpl> - implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_OkImplCopyWithImpl( - _$LnUrlCallbackStatus_OkImpl _value, $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$LnUrlCallbackStatus_OkImpl extends LnUrlCallbackStatus_Ok { - const _$LnUrlCallbackStatus_OkImpl() : super._(); - - @override - String toString() { - return 'LnUrlCallbackStatus.ok()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_Ok extends LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; - const LnUrlCallbackStatus_Ok._() : super._(); -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith(_$LnUrlCallbackStatus_ErrorStatusImpl value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_ErrorStatusImpl> - implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl(_$LnUrlCallbackStatus_ErrorStatusImpl _value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlCallbackStatus_ErrorStatusImpl extends LnUrlCallbackStatus_ErrorStatus { - const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}) : super._(); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlCallbackStatus.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<_$LnUrlCallbackStatus_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_ErrorStatus extends LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlCallbackStatus_ErrorStatusImpl; - const LnUrlCallbackStatus_ErrorStatus._() : super._(); - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlWithdrawResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlWithdrawResultCopyWith<$Res> { - factory $LnUrlWithdrawResultCopyWith(LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = - _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; -} - -/// @nodoc -class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> - implements $LnUrlWithdrawResultCopyWith<$Res> { - _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_OkImplCopyWith( - _$LnUrlWithdrawResult_OkImpl value, $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_OkImpl> - implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_OkImplCopyWithImpl( - _$LnUrlWithdrawResult_OkImpl _value, $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_OkImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { - const _$LnUrlWithdrawResult_OkImpl({required this.data}) : super._(); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.ok(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_OkImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<_$LnUrlWithdrawResult_OkImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Ok({required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_OkImpl; - const LnUrlWithdrawResult_Ok._() : super._(); - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_ErrorStatusImpl> - implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl(_$LnUrlWithdrawResult_ErrorStatusImpl _value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorStatus { - const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}) : super._(); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<_$LnUrlWithdrawResult_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_ErrorStatus extends LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlWithdrawResult_ErrorStatusImpl; - const LnUrlWithdrawResult_ErrorStatus._() : super._(); - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - /// @nodoc mixin _$NodeConfig { GreenlightNodeConfig get config => throw _privateConstructorUsedError; @@ -850,20 +219,20 @@ abstract class NodeConfig_Greenlight extends NodeConfig { /// @nodoc mixin _$NodeCredentials { - GreenlightCredentials get credentials => throw _privateConstructorUsedError; + GreenlightDeviceCredentials get credentials => throw _privateConstructorUsedError; @optionalTypeArgs TResult when({ - required TResult Function(GreenlightCredentials credentials) greenlight, + required TResult Function(GreenlightDeviceCredentials credentials) greenlight, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(GreenlightCredentials credentials)? greenlight, + TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ - TResult Function(GreenlightCredentials credentials)? greenlight, + TResult Function(GreenlightDeviceCredentials credentials)? greenlight, required TResult orElse(), }) => throw _privateConstructorUsedError; @@ -893,7 +262,7 @@ abstract class $NodeCredentialsCopyWith<$Res> { factory $NodeCredentialsCopyWith(NodeCredentials value, $Res Function(NodeCredentials) then) = _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; @useResult - $Res call({GreenlightCredentials credentials}); + $Res call({GreenlightDeviceCredentials credentials}); } /// @nodoc @@ -915,7 +284,7 @@ class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> credentials: null == credentials ? _value.credentials : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightCredentials, + as GreenlightDeviceCredentials, ) as $Val); } } @@ -927,7 +296,7 @@ abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> implements $NodeC __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; @override @useResult - $Res call({GreenlightCredentials credentials}); + $Res call({GreenlightDeviceCredentials credentials}); } /// @nodoc @@ -947,7 +316,7 @@ class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> credentials: null == credentials ? _value.credentials : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightCredentials, + as GreenlightDeviceCredentials, )); } } @@ -958,7 +327,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { const _$NodeCredentials_GreenlightImpl({required this.credentials}) : super._(); @override - final GreenlightCredentials credentials; + final GreenlightDeviceCredentials credentials; @override String toString() { @@ -985,7 +354,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { @override @optionalTypeArgs TResult when({ - required TResult Function(GreenlightCredentials credentials) greenlight, + required TResult Function(GreenlightDeviceCredentials credentials) greenlight, }) { return greenlight(credentials); } @@ -993,7 +362,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { @override @optionalTypeArgs TResult? whenOrNull({ - TResult? Function(GreenlightCredentials credentials)? greenlight, + TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, }) { return greenlight?.call(credentials); } @@ -1001,7 +370,7 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { @override @optionalTypeArgs TResult maybeWhen({ - TResult Function(GreenlightCredentials credentials)? greenlight, + TResult Function(GreenlightDeviceCredentials credentials)? greenlight, required TResult orElse(), }) { if (greenlight != null) { @@ -1040,12 +409,12 @@ class _$NodeCredentials_GreenlightImpl extends NodeCredentials_Greenlight { } abstract class NodeCredentials_Greenlight extends NodeCredentials { - const factory NodeCredentials_Greenlight({required final GreenlightCredentials credentials}) = + const factory NodeCredentials_Greenlight({required final GreenlightDeviceCredentials credentials}) = _$NodeCredentials_GreenlightImpl; const NodeCredentials_Greenlight._() : super._(); @override - GreenlightCredentials get credentials; + GreenlightDeviceCredentials get credentials; @override @JsonKey(ignore: true) _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => diff --git a/libs/sdk-flutter/lib/sdk.dart b/libs/sdk-flutter/lib/sdk.dart index 7ba0c8018..e62b19944 100644 --- a/libs/sdk-flutter/lib/sdk.dart +++ b/libs/sdk-flutter/lib/sdk.dart @@ -1,12 +1,8 @@ +export 'generated/binding.dart'; export 'generated/breez_services.dart'; export 'generated/chain.dart'; -export 'generated/fiat.dart'; export 'generated/frb_generated.dart'; export 'generated/frb_generated.io.dart'; -export 'generated/input_parser.dart'; -export 'generated/invoice.dart'; -export 'generated/lnurl/pay/model.dart'; export 'generated/lsp.dart'; export 'generated/models.dart'; -export 'generated/binding.dart'; export 'exceptions.dart'; From 5c9fc001549f29778547014838daf3146fa7f2b2 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 13:59:30 +0300 Subject: [PATCH 18/23] Tell frb to ignore lnrurl module --- libs/sdk-core/src/lib.rs | 1 + .../lib/generated/lnurl/pay/model.dart | 164 -- .../generated/lnurl/pay/model.freezed.dart | 1343 ----------------- 3 files changed, 1 insertion(+), 1507 deletions(-) delete mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay/model.dart delete mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index 2c557b1bc..dc38cdd3f 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -171,6 +171,7 @@ pub mod error; mod node_api; // flutter_rust_bridge_codegen: has to be defined before greenlight; greenlight::node_api mod greenlight; #[rustfmt::skip] +/// flutter_rust_bridge:ignore pub mod lnurl; mod buy; mod lsp; diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart deleted file mode 100644 index 95f034693..000000000 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart +++ /dev/null @@ -1,164 +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 '../../input_parser.dart'; -import '../../models.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -part 'model.freezed.dart'; - -/// Wrapper for the decrypted [AesSuccessActionData] payload -class AesSuccessActionDataDecrypted { - /// Contents description, up to 144 characters - final String description; - - /// Decrypted content - final String plaintext; - - const AesSuccessActionDataDecrypted({ - required this.description, - required this.plaintext, - }); - - @override - int get hashCode => description.hashCode ^ plaintext.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is AesSuccessActionDataDecrypted && - runtimeType == other.runtimeType && - description == other.description && - plaintext == other.plaintext; -} - -@freezed -sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { - const AesSuccessActionDataResult._(); - - const factory AesSuccessActionDataResult.decrypted({ - required AesSuccessActionDataDecrypted data, - }) = AesSuccessActionDataResult_Decrypted; - const factory AesSuccessActionDataResult.errorStatus({ - required String reason, - }) = AesSuccessActionDataResult_ErrorStatus; -} - -class LnUrlPayErrorData { - final String paymentHash; - final String reason; - - const LnUrlPayErrorData({ - required this.paymentHash, - required this.reason, - }); - - @override - int get hashCode => paymentHash.hashCode ^ reason.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlPayErrorData && - runtimeType == other.runtimeType && - paymentHash == other.paymentHash && - reason == other.reason; -} - -@freezed -sealed class LnUrlPayResult with _$LnUrlPayResult { - const LnUrlPayResult._(); - - const factory LnUrlPayResult.endpointSuccess({ - required LnUrlPaySuccessData data, - }) = LnUrlPayResult_EndpointSuccess; - const factory LnUrlPayResult.endpointError({ - required LnUrlErrorData data, - }) = LnUrlPayResult_EndpointError; - const factory LnUrlPayResult.payError({ - required LnUrlPayErrorData data, - }) = LnUrlPayResult_PayError; -} - -class LnUrlPaySuccessData { - final Payment payment; - final SuccessActionProcessed? successAction; - - const LnUrlPaySuccessData({ - required this.payment, - this.successAction, - }); - - @override - int get hashCode => payment.hashCode ^ successAction.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlPaySuccessData && - runtimeType == other.runtimeType && - payment == other.payment && - successAction == other.successAction; -} - -class MessageSuccessActionData { - final String message; - - const MessageSuccessActionData({ - required this.message, - }); - - @override - int get hashCode => message.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is MessageSuccessActionData && runtimeType == other.runtimeType && message == other.message; -} - -@freezed -sealed class SuccessActionProcessed with _$SuccessActionProcessed { - const SuccessActionProcessed._(); - - /// See [SuccessAction::Aes] for received payload - /// - /// See [AesSuccessActionDataDecrypted] for decrypted payload - const factory SuccessActionProcessed.aes({ - required AesSuccessActionDataResult result, - }) = SuccessActionProcessed_Aes; - - /// See [SuccessAction::Message] - const factory SuccessActionProcessed.message({ - required MessageSuccessActionData data, - }) = SuccessActionProcessed_Message; - - /// See [SuccessAction::Url] - const factory SuccessActionProcessed.url({ - required UrlSuccessActionData data, - }) = SuccessActionProcessed_Url; -} - -class UrlSuccessActionData { - final String description; - final String url; - - const UrlSuccessActionData({ - required this.description, - required this.url, - }); - - @override - int get hashCode => description.hashCode ^ url.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is UrlSuccessActionData && - runtimeType == other.runtimeType && - description == other.description && - url == other.url; -} diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart deleted file mode 100644 index c5887f5fa..000000000 --- a/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart +++ /dev/null @@ -1,1343 +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 'model.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 _$AesSuccessActionDataResult { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AesSuccessActionDataResultCopyWith<$Res> { - factory $AesSuccessActionDataResultCopyWith( - AesSuccessActionDataResult value, $Res Function(AesSuccessActionDataResult) then) = - _$AesSuccessActionDataResultCopyWithImpl<$Res, AesSuccessActionDataResult>; -} - -/// @nodoc -class _$AesSuccessActionDataResultCopyWithImpl<$Res, $Val extends AesSuccessActionDataResult> - implements $AesSuccessActionDataResultCopyWith<$Res> { - _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( - _$AesSuccessActionDataResult_DecryptedImpl value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataDecrypted data}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_DecryptedImpl> - implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl(_$AesSuccessActionDataResult_DecryptedImpl _value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$AesSuccessActionDataResult_DecryptedImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataDecrypted, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_DecryptedImpl extends AesSuccessActionDataResult_Decrypted { - const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}) : super._(); - - @override - final AesSuccessActionDataDecrypted data; - - @override - String toString() { - return 'AesSuccessActionDataResult.decrypted(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_DecryptedImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< - _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return decrypted(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return decrypted?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return decrypted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return decrypted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_Decrypted extends AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_Decrypted({required final AesSuccessActionDataDecrypted data}) = - _$AesSuccessActionDataResult_DecryptedImpl; - const AesSuccessActionDataResult_Decrypted._() : super._(); - - AesSuccessActionDataDecrypted get data; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( - _$AesSuccessActionDataResult_ErrorStatusImpl value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({String reason}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_ErrorStatusImpl> - implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( - _$AesSuccessActionDataResult_ErrorStatusImpl _value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? reason = null, - }) { - return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_ErrorStatusImpl extends AesSuccessActionDataResult_ErrorStatus { - const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}) : super._(); - - @override - final String reason; - - @override - String toString() { - return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_ErrorStatusImpl && - (identical(other.reason, reason) || other.reason == reason)); - } - - @override - int get hashCode => Object.hash(runtimeType, reason); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< - _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return errorStatus(reason); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return errorStatus?.call(reason); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(reason); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_ErrorStatus extends AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_ErrorStatus({required final String reason}) = - _$AesSuccessActionDataResult_ErrorStatusImpl; - const AesSuccessActionDataResult_ErrorStatus._() : super._(); - - String get reason; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlPayResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlPayResultCopyWith<$Res> { - factory $LnUrlPayResultCopyWith(LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = - _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; -} - -/// @nodoc -class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> - implements $LnUrlPayResultCopyWith<$Res> { - _$LnUrlPayResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith(_$LnUrlPayResult_EndpointSuccessImpl value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPaySuccessData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointSuccessImpl> - implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( - _$LnUrlPayResult_EndpointSuccessImpl _value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointSuccessImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPaySuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointSuccessImpl extends LnUrlPayResult_EndpointSuccess { - const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}) : super._(); - - @override - final LnUrlPaySuccessData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointSuccess(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointSuccessImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<_$LnUrlPayResult_EndpointSuccessImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointSuccess(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointSuccess?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointSuccess(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointSuccess?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointSuccess extends LnUrlPayResult { - const factory LnUrlPayResult_EndpointSuccess({required final LnUrlPaySuccessData data}) = - _$LnUrlPayResult_EndpointSuccessImpl; - const LnUrlPayResult_EndpointSuccess._() : super._(); - - @override - LnUrlPaySuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( - _$LnUrlPayResult_EndpointErrorImpl value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointErrorImpl> - implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( - _$LnUrlPayResult_EndpointErrorImpl _value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { - const _$LnUrlPayResult_EndpointErrorImpl({required this.data}) : super._(); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<_$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointError extends LnUrlPayResult { - const factory LnUrlPayResult_EndpointError({required final LnUrlErrorData data}) = - _$LnUrlPayResult_EndpointErrorImpl; - const LnUrlPayResult_EndpointError._() : super._(); - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_PayErrorImplCopyWith( - _$LnUrlPayResult_PayErrorImpl value, $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> - implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_PayErrorImplCopyWithImpl( - _$LnUrlPayResult_PayErrorImpl _value, $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_PayErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { - const _$LnUrlPayResult_PayErrorImpl({required this.data}) : super._(); - - @override - final LnUrlPayErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.payError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_PayErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<_$LnUrlPayResult_PayErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return payError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return payError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return payError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return payError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_PayError extends LnUrlPayResult { - const factory LnUrlPayResult_PayError({required final LnUrlPayErrorData data}) = - _$LnUrlPayResult_PayErrorImpl; - const LnUrlPayResult_PayError._() : super._(); - - @override - LnUrlPayErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$SuccessActionProcessed { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SuccessActionProcessedCopyWith<$Res> { - factory $SuccessActionProcessedCopyWith( - SuccessActionProcessed value, $Res Function(SuccessActionProcessed) then) = - _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; -} - -/// @nodoc -class _$SuccessActionProcessedCopyWithImpl<$Res, $Val extends SuccessActionProcessed> - implements $SuccessActionProcessedCopyWith<$Res> { - _$SuccessActionProcessedCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_AesImplCopyWith( - _$SuccessActionProcessed_AesImpl value, $Res Function(_$SuccessActionProcessed_AesImpl) then) = - __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataResult result}); - - $AesSuccessActionDataResultCopyWith<$Res> get result; -} - -/// @nodoc -class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_AesImpl> - implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - __$$SuccessActionProcessed_AesImplCopyWithImpl( - _$SuccessActionProcessed_AesImpl _value, $Res Function(_$SuccessActionProcessed_AesImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? result = null, - }) { - return _then(_$SuccessActionProcessed_AesImpl( - result: null == result - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataResult, - )); - } - - @override - @pragma('vm:prefer-inline') - $AesSuccessActionDataResultCopyWith<$Res> get result { - return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { - return _then(_value.copyWith(result: value)); - }); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_AesImpl extends SuccessActionProcessed_Aes { - const _$SuccessActionProcessed_AesImpl({required this.result}) : super._(); - - @override - final AesSuccessActionDataResult result; - - @override - String toString() { - return 'SuccessActionProcessed.aes(result: $result)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_AesImpl && - (identical(other.result, result) || other.result == result)); - } - - @override - int get hashCode => Object.hash(runtimeType, result); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - __$$SuccessActionProcessed_AesImplCopyWithImpl<_$SuccessActionProcessed_AesImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return aes(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return aes?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return aes(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return aes?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Aes extends SuccessActionProcessed { - const factory SuccessActionProcessed_Aes({required final AesSuccessActionDataResult result}) = - _$SuccessActionProcessed_AesImpl; - const SuccessActionProcessed_Aes._() : super._(); - - AesSuccessActionDataResult get result; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_MessageImplCopyWith(_$SuccessActionProcessed_MessageImpl value, - $Res Function(_$SuccessActionProcessed_MessageImpl) then) = - __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; - @useResult - $Res call({MessageSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_MessageImpl> - implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - __$$SuccessActionProcessed_MessageImplCopyWithImpl( - _$SuccessActionProcessed_MessageImpl _value, $Res Function(_$SuccessActionProcessed_MessageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_MessageImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as MessageSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_MessageImpl extends SuccessActionProcessed_Message { - const _$SuccessActionProcessed_MessageImpl({required this.data}) : super._(); - - @override - final MessageSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.message(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_MessageImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - __$$SuccessActionProcessed_MessageImplCopyWithImpl<_$SuccessActionProcessed_MessageImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return message(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return message?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return message(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return message?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Message extends SuccessActionProcessed { - const factory SuccessActionProcessed_Message({required final MessageSuccessActionData data}) = - _$SuccessActionProcessed_MessageImpl; - const SuccessActionProcessed_Message._() : super._(); - - MessageSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_UrlImplCopyWith( - _$SuccessActionProcessed_UrlImpl value, $Res Function(_$SuccessActionProcessed_UrlImpl) then) = - __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({UrlSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_UrlImpl> - implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - __$$SuccessActionProcessed_UrlImplCopyWithImpl( - _$SuccessActionProcessed_UrlImpl _value, $Res Function(_$SuccessActionProcessed_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_UrlImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as UrlSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_UrlImpl extends SuccessActionProcessed_Url { - const _$SuccessActionProcessed_UrlImpl({required this.data}) : super._(); - - @override - final UrlSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.url(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_UrlImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - __$$SuccessActionProcessed_UrlImplCopyWithImpl<_$SuccessActionProcessed_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return url(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return url?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Url extends SuccessActionProcessed { - const factory SuccessActionProcessed_Url({required final UrlSuccessActionData data}) = - _$SuccessActionProcessed_UrlImpl; - const SuccessActionProcessed_Url._() : super._(); - - UrlSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - throw _privateConstructorUsedError; -} From b2a2283c17b04258db49eb952ce257c729273eaf Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 14:07:49 +0300 Subject: [PATCH 19/23] Re-add lnurl module after fixing imports on bindings cargo fmt --- libs/sdk-core/src/binding.rs | 10 +- libs/sdk-core/src/frb_generated.io.rs | 196 +++++-- libs/sdk-core/src/frb_generated.rs | 246 ++++++--- libs/sdk-core/src/lib.rs | 2 +- libs/sdk-flutter/ios/Classes/frb_generated.h | 45 +- libs/sdk-flutter/lib/generated/binding.dart | 27 +- .../lib/generated/frb_generated.dart | 261 +++++---- .../lib/generated/frb_generated.io.dart | 255 ++++++--- libs/sdk-flutter/lib/generated/lnurl/pay.dart | 47 ++ .../lib/generated/lnurl/pay.freezed.dart | 508 ++++++++++++++++++ libs/sdk-flutter/lib/sdk.dart | 1 + 11 files changed, 1268 insertions(+), 330 deletions(-) create mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay.dart create mode 100644 libs/sdk-flutter/lib/generated/lnurl/pay.freezed.dart diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 98c2261dd..b1c858f5d 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -14,6 +14,7 @@ use std::future::Future; use std::sync::Arc; use crate::frb_generated::StreamSink; +use crate::lnurl::pay::LnUrlPayResult; use anyhow::{anyhow, Result}; use log::{Level, LevelFilter, Metadata, Record}; use once_cell::sync::{Lazy, OnceCell}; @@ -26,6 +27,7 @@ pub use sdk_common::prelude::{ LocaleOverrides, LocalizedName, MessageSuccessActionData, Network, Rate, RouteHint, RouteHintHop, SuccessActionProcessed, Symbol, UrlSuccessActionData, }; +use sdk_common::prelude::{LnUrlPayError, LnUrlWithdrawError}; use tokio::sync::Mutex; use crate::breez_services::{self, BreezEvent, BreezServices, EventListener}; @@ -560,19 +562,19 @@ pub fn receive_payment(req: ReceivePaymentRequest) -> Result Result { +pub fn lnurl_pay(req: LnUrlPayRequest) -> Result { block_on(async { get_breez_services().await?.lnurl_pay(req).await }) - .map_err(anyhow::Error::new::) + .map_err(anyhow::Error::new::) } /// See [BreezServices::lnurl_withdraw] pub fn lnurl_withdraw(req: LnUrlWithdrawRequest) -> Result { block_on(async { get_breez_services().await?.lnurl_withdraw(req).await }) - .map_err(anyhow::Error::new::) + .map_err(anyhow::Error::new::) } /// See [BreezServices::lnurl_auth] -pub fn lnurl_auth(req_data: crate::LnUrlAuthRequestData) -> Result { +pub fn lnurl_auth(req_data: LnUrlAuthRequestData) -> Result { block_on(async { get_breez_services().await?.lnurl_auth(req_data).await }) .map_err(anyhow::Error::new::) } diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index fcf8d29ca..8dc84ab10 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -4,7 +4,6 @@ // Section: imports use super::*; -use crate::binding::*; use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -24,29 +23,6 @@ impl CstDecode unimplemented!() } } -impl CstDecode for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> LnUrlPayResult { - flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(CstDecode::< - RustOpaqueNom>, - >::cst_decode( - self - )) - } -} -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< StreamSink, @@ -307,6 +283,13 @@ impl CstDecode for *mut wire_cst_ln_url_error_da CstDecode::::cst_decode(*wrap).into() } } +impl CstDecode for *mut wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut wire_cst_ln_url_pay_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::binding::LnUrlPayRequest { @@ -321,6 +304,13 @@ impl CstDecode for *mut wire_cst_ln_url_pay CstDecode::::cst_decode(*wrap).into() } } +impl CstDecode for *mut wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } +} impl CstDecode for *mut wire_cst_ln_url_withdraw_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { @@ -1083,6 +1073,15 @@ impl CstDecode for wire_cst_ln_url_error_data { } } } +impl CstDecode for wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + crate::binding::LnUrlPayErrorData { + payment_hash: self.payment_hash.cst_decode(), + reason: self.reason.cst_decode(), + } + } +} impl CstDecode for wire_cst_ln_url_pay_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::binding::LnUrlPayRequest { @@ -1110,6 +1109,41 @@ impl CstDecode for wire_cst_ln_url_pay_requ } } } +impl CstDecode for wire_cst_ln_url_pay_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPayResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EndpointSuccess }; + crate::lnurl::pay::LnUrlPayResult::EndpointSuccess { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.EndpointError }; + crate::lnurl::pay::LnUrlPayResult::EndpointError { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PayError }; + crate::lnurl::pay::LnUrlPayResult::PayError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +impl CstDecode for wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + crate::lnurl::pay::LnUrlPaySuccessData { + payment: self.payment.cst_decode(), + success_action: self.success_action.cst_decode(), + } + } +} impl CstDecode for wire_cst_ln_url_withdraw_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { @@ -2236,6 +2270,19 @@ impl Default for wire_cst_ln_url_error_data { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_ln_url_pay_error_data { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + reason: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_ln_url_pay_request { fn new_with_null_ptr() -> Self { Self { @@ -2271,6 +2318,32 @@ impl Default for wire_cst_ln_url_pay_request_data { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_ln_url_pay_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayResultKind { nil__: () }, + } + } +} +impl Default for wire_cst_ln_url_pay_result { + fn default() -> Self { + Self::new_with_null_ptr() + } +} +impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + success_action: core::ptr::null_mut(), + } + } +} +impl Default for wire_cst_ln_url_pay_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_ln_url_withdraw_request { fn new_with_null_ptr() -> Self { Self { @@ -3597,24 +3670,6 @@ pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( wire__crate__binding__unregister_webhook_impl(port_, webhook_url) } -#[no_mangle] -pub extern "C" fn frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::increment_strong_count(ptr as _); - } -} - -#[no_mangle] -pub extern "C" fn frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ptr: *const std::ffi::c_void, -) { - unsafe { - StdArc::>::decrement_strong_count(ptr as _); - } -} - #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( ) -> *mut wire_cst_aes_success_action_data_decrypted { @@ -3779,6 +3834,14 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data( ) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data( +) -> *mut wire_cst_ln_url_pay_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_error_data::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request( ) -> *mut wire_cst_ln_url_pay_request { @@ -3795,6 +3858,14 @@ pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data( ) } +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data( +) -> *mut wire_cst_ln_url_pay_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_success_data::new_with_null_ptr(), + ) +} + #[no_mangle] pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request( ) -> *mut wire_cst_ln_url_withdraw_request { @@ -4714,6 +4785,12 @@ pub struct wire_cst_ln_url_error_data { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_error_data { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + reason: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_ln_url_pay_request { data: wire_cst_ln_url_pay_request_data, amount_msat: u64, @@ -4735,6 +4812,41 @@ pub struct wire_cst_ln_url_pay_request_data { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_result { + tag: i32, + kind: LnUrlPayResultKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union LnUrlPayResultKind { + EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, + EndpointError: wire_cst_LnUrlPayResult_EndpointError, + PayError: wire_cst_LnUrlPayResult_PayError, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_EndpointSuccess { + data: *mut wire_cst_ln_url_pay_success_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_EndpointError { + data: *mut wire_cst_ln_url_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_LnUrlPayResult_PayError { + data: *mut wire_cst_ln_url_pay_error_data, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ln_url_pay_success_data { + payment: wire_cst_payment, + success_action: *mut wire_cst_success_action_processed, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_ln_url_withdraw_request { data: wire_cst_ln_url_withdraw_request_data, amount_msat: u64, diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index a73c82e95..9a7d6a83e 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -25,7 +25,6 @@ // Section: imports -use crate::binding::*; use crate::breez_services::EventListener; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; @@ -1524,6 +1523,11 @@ const _: fn() = || { let LnUrlErrorData = None::.unwrap(); let _: String = LnUrlErrorData.reason; } + { + let LnUrlPayErrorData = None::.unwrap(); + let _: String = LnUrlPayErrorData.payment_hash; + let _: String = LnUrlPayErrorData.reason; + } { let LnUrlPayRequest = None::.unwrap(); let _: crate::binding::LnUrlPayRequestData = LnUrlPayRequest.data; @@ -1802,12 +1806,6 @@ impl CstDecode for u8 { self } } -impl CstDecode for usize { - // Codec=Cst (C-struct based), see doc to use other codecs - fn cst_decode(self) -> usize { - self - } -} 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 { @@ -1816,26 +1814,6 @@ impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { } } -impl SseDecode for LnUrlPayResult { - // 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::rust_auto_opaque_decode_owned(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 StreamSink { @@ -2681,6 +2659,18 @@ impl SseDecode for crate::binding::LnUrlErrorData { } } +impl SseDecode for crate::binding::LnUrlPayErrorData { + // 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_paymentHash = ::sse_decode(deserializer); + let mut var_reason = ::sse_decode(deserializer); + return crate::binding::LnUrlPayErrorData { + payment_hash: var_paymentHash, + reason: var_reason, + }; + } +} + impl SseDecode for crate::binding::LnUrlPayRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -2723,6 +2713,44 @@ impl SseDecode for crate::binding::LnUrlPayRequestData { } } +impl SseDecode for crate::lnurl::pay::LnUrlPayResult { + // 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_data = + ::sse_decode(deserializer); + return crate::lnurl::pay::LnUrlPayResult::EndpointSuccess { data: var_data }; + } + 1 => { + let mut var_data = ::sse_decode(deserializer); + return crate::lnurl::pay::LnUrlPayResult::EndpointError { data: var_data }; + } + 2 => { + let mut var_data = ::sse_decode(deserializer); + return crate::lnurl::pay::LnUrlPayResult::PayError { data: var_data }; + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseDecode for crate::lnurl::pay::LnUrlPaySuccessData { + // 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_payment = ::sse_decode(deserializer); + let mut var_successAction = + >::sse_decode(deserializer); + return crate::lnurl::pay::LnUrlPaySuccessData { + payment: var_payment, + success_action: var_successAction, + }; + } +} + impl SseDecode for crate::binding::LnUrlWithdrawRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -4040,13 +4068,6 @@ impl SseDecode for crate::binding::UrlSuccessActionData { } } -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 _ - } -} - fn pde_ffi_dispatcher_primary_impl( func_id: i32, port: flutter_rust_bridge::for_generated::MessagePort, @@ -4074,21 +4095,6 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart -// Codec=Dco (DartCObject based), see doc to use other codecs -impl flutter_rust_bridge::IntoDart for FrbWrapper { - fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { - flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self.0) - .into_dart() - } -} -impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for FrbWrapper {} - -impl flutter_rust_bridge::IntoIntoDart> for LnUrlPayResult { - fn into_into_dart(self) -> FrbWrapper { - self.into() - } -} - // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -4837,6 +4843,27 @@ impl flutter_rust_bridge::IntoIntoDart { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.0.payment_hash.into_into_dart().into_dart(), + self.0.reason.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} +impl flutter_rust_bridge::IntoIntoDart> + for crate::binding::LnUrlPayErrorData +{ + fn into_into_dart(self) -> FrbWrapper { + self.into() + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -4888,6 +4915,57 @@ impl flutter_rust_bridge::IntoIntoDart flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::lnurl::pay::LnUrlPayResult::EndpointSuccess { data } => { + [0.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::LnUrlPayResult::EndpointError { data } => { + [1.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + crate::lnurl::pay::LnUrlPayResult::PayError { data } => { + [2.into_dart(), data.into_into_dart().into_dart()].into_dart() + } + _ => { + unimplemented!(""); + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::LnUrlPayResult +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::LnUrlPayResult +{ + fn into_into_dart(self) -> crate::lnurl::pay::LnUrlPayResult { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::LnUrlPaySuccessData { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + [ + self.payment.into_into_dart().into_dart(), + self.success_action.into_into_dart().into_dart(), + ] + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for crate::lnurl::pay::LnUrlPaySuccessData +{ +} +impl flutter_rust_bridge::IntoIntoDart + for crate::lnurl::pay::LnUrlPaySuccessData +{ + fn into_into_dart(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for FrbWrapper { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -6362,24 +6440,6 @@ impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error { } } -impl SseEncode for LnUrlPayResult { - // Codec=Sse (Serialization based), see doc to use other codecs - fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { - >>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self), 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 StreamSink { @@ -7036,6 +7096,14 @@ impl SseEncode for crate::binding::LnUrlErrorData { } } +impl SseEncode for crate::binding::LnUrlPayErrorData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment_hash, serializer); + ::sse_encode(self.reason, serializer); + } +} + impl SseEncode for crate::binding::LnUrlPayRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -7061,6 +7129,40 @@ impl SseEncode for crate::binding::LnUrlPayRequestData { } } +impl SseEncode for crate::lnurl::pay::LnUrlPayResult { + // 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::lnurl::pay::LnUrlPayResult::EndpointSuccess { data } => { + ::sse_encode(0, serializer); + ::sse_encode(data, serializer); + } + crate::lnurl::pay::LnUrlPayResult::EndpointError { data } => { + ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + crate::lnurl::pay::LnUrlPayResult::PayError { data } => { + ::sse_encode(2, serializer); + ::sse_encode(data, serializer); + } + _ => { + unimplemented!(""); + } + } + } +} + +impl SseEncode for crate::lnurl::pay::LnUrlPaySuccessData { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + ::sse_encode(self.payment, serializer); + >::sse_encode( + self.success_action, + serializer, + ); + } +} + impl SseEncode for crate::binding::LnUrlWithdrawRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -8060,16 +8162,6 @@ impl SseEncode for crate::binding::UrlSuccessActionData { } } -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(); - } -} - #[cfg(not(target_family = "wasm"))] #[path = "frb_generated.io.rs"] mod io; diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index dc38cdd3f..7d656c553 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -171,7 +171,6 @@ pub mod error; mod node_api; // flutter_rust_bridge_codegen: has to be defined before greenlight; greenlight::node_api mod greenlight; #[rustfmt::skip] -/// flutter_rust_bridge:ignore pub mod lnurl; mod buy; mod lsp; @@ -179,6 +178,7 @@ mod lsps0; /// flutter_rust_bridge:ignore mod lsps2; mod models; +mod moonpay; mod persist; mod serializer; mod support; diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index 87a34bbf9..a3765a58e 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -553,6 +553,16 @@ typedef struct wire_cst_ln_url_error_data { struct wire_cst_list_prim_u_8_strict *reason; } wire_cst_ln_url_error_data; +typedef struct wire_cst_ln_url_pay_error_data { + struct wire_cst_list_prim_u_8_strict *payment_hash; + struct wire_cst_list_prim_u_8_strict *reason; +} wire_cst_ln_url_pay_error_data; + +typedef struct wire_cst_ln_url_pay_success_data { + struct wire_cst_payment payment; + struct wire_cst_success_action_processed *success_action; +} wire_cst_ln_url_pay_success_data; + typedef struct wire_cst_ln_url_withdraw_success_data { struct wire_cst_ln_invoice invoice; } wire_cst_ln_url_withdraw_success_data; @@ -759,6 +769,29 @@ typedef struct wire_cst_ln_url_callback_status { union LnUrlCallbackStatusKind kind; } wire_cst_ln_url_callback_status; +typedef struct wire_cst_LnUrlPayResult_EndpointSuccess { + struct wire_cst_ln_url_pay_success_data *data; +} wire_cst_LnUrlPayResult_EndpointSuccess; + +typedef struct wire_cst_LnUrlPayResult_EndpointError { + struct wire_cst_ln_url_error_data *data; +} wire_cst_LnUrlPayResult_EndpointError; + +typedef struct wire_cst_LnUrlPayResult_PayError { + struct wire_cst_ln_url_pay_error_data *data; +} wire_cst_LnUrlPayResult_PayError; + +typedef union LnUrlPayResultKind { + struct wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; + struct wire_cst_LnUrlPayResult_EndpointError EndpointError; + struct wire_cst_LnUrlPayResult_PayError PayError; +} LnUrlPayResultKind; + +typedef struct wire_cst_ln_url_pay_result { + int32_t tag; + union LnUrlPayResultKind kind; +} wire_cst_ln_url_pay_result; + typedef struct wire_cst_LnUrlWithdrawResult_Ok { struct wire_cst_ln_url_withdraw_success_data *data; } wire_cst_LnUrlWithdrawResult_Ok; @@ -1045,10 +1078,6 @@ void frbgen_breez_sdk_wire__crate__binding__sync(int64_t port_); void frbgen_breez_sdk_wire__crate__binding__unregister_webhook(int64_t port_, struct wire_cst_list_prim_u_8_strict *webhook_url); -void frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult(const void *ptr); - -void frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult(const void *ptr); - struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); struct wire_cst_aes_success_action_data_result *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result(void); @@ -1093,10 +1122,14 @@ struct wire_cst_ln_url_auth_request_data *frbgen_breez_sdk_cst_new_box_autoadd_l struct wire_cst_ln_url_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data(void); +struct wire_cst_ln_url_pay_error_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data(void); + struct wire_cst_ln_url_pay_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request(void); struct wire_cst_ln_url_pay_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data(void); +struct wire_cst_ln_url_pay_success_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data(void); + struct wire_cst_ln_url_withdraw_request *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request(void); struct wire_cst_ln_url_withdraw_request_data *frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data(void); @@ -1222,8 +1255,10 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data); @@ -1275,8 +1310,6 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_swap_info); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_tlv_entry); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup_status); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event); diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index a82e7ac29..060e15390 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -6,6 +6,7 @@ import 'breez_services.dart'; import 'chain.dart'; import 'frb_generated.dart'; +import 'lnurl/pay.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; @@ -13,7 +14,7 @@ import 'package:freezed_annotation/freezed_annotation.dart' hide protected; part 'binding.freezed.dart'; // These functions are ignored because they are not marked as `pub`: `block_on`, `get_breez_services`, `init`, `new`, `rt` -// These types are ignored because they are not used by any `pub` functions: `BindingLogger`, `LnUrlPayErrorData`, `LnUrlPayError` +// These types are ignored because they are not used by any `pub` functions: `BindingLogger`, `LnUrlPayError` // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `enabled`, `flush`, `log` /// Wrapper around [BreezServices::connect] which also initializes SDK logging @@ -240,9 +241,6 @@ Future executeCommand({required String command}) => /// See [BreezServices::generate_diagnostic_data] Future generateDiagnosticData() => BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(); -// Rust type: RustOpaqueNom> -abstract class LnUrlPayResult implements RustOpaqueInterface {} - class AesSuccessActionDataDecrypted { final String description; final String plaintext; @@ -528,6 +526,27 @@ class LnUrlErrorData { other is LnUrlErrorData && runtimeType == other.runtimeType && reason == other.reason; } +class LnUrlPayErrorData { + final String paymentHash; + final String reason; + + const LnUrlPayErrorData({ + required this.paymentHash, + required this.reason, + }); + + @override + int get hashCode => paymentHash.hashCode ^ reason.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPayErrorData && + runtimeType == other.runtimeType && + paymentHash == other.paymentHash && + reason == other.reason; +} + class LnUrlPayRequest { final LnUrlPayRequestData data; final BigInt amountMsat; diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 767ebfac5..2ac58a617 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'dart:convert'; import 'frb_generated.dart'; import 'frb_generated.io.dart' if (dart.library.js_interop) 'frb_generated.web.dart'; +import 'lnurl/pay.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; @@ -196,12 +197,6 @@ abstract class BreezSdkBindingsApi extends BaseApi { Future crateBindingSync(); Future crateBindingUnregisterWebhook({required String webhookUrl}); - - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_LnUrlPayResult; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_LnUrlPayResult; - - CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_LnUrlPayResultPtr; } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -810,8 +805,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return wire.wire__crate__binding__lnurl_pay(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult, + decodeSuccessData: dco_decode_ln_url_pay_result, decodeErrorData: dco_decode_AnyhowException, ), constMeta: kCrateBindingLnurlPayConstMeta, @@ -1569,33 +1563,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements argNames: ["webhookUrl"], ); - RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_LnUrlPayResult => wire - .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult; - - RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_LnUrlPayResult => wire - .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult; - @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs return AnyhowException(raw as String); } - @protected - LnUrlPayResult - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return LnUrlPayResultImpl.frbInternalDcoDecode(raw as List); - } - - @protected - LnUrlPayResult dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return LnUrlPayResultImpl.frbInternalDcoDecode(raw as List); - } - @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1823,6 +1796,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_ln_url_error_data(raw); } + @protected + LnUrlPayErrorData dco_decode_box_autoadd_ln_url_pay_error_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_error_data(raw); + } + @protected LnUrlPayRequest dco_decode_box_autoadd_ln_url_pay_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -1835,6 +1814,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return dco_decode_ln_url_pay_request_data(raw); } + @protected + LnUrlPaySuccessData dco_decode_box_autoadd_ln_url_pay_success_data(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_ln_url_pay_success_data(raw); + } + @protected LnUrlWithdrawRequest dco_decode_box_autoadd_ln_url_withdraw_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2533,6 +2518,17 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + LnUrlPayErrorData dco_decode_ln_url_pay_error_data(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 LnUrlPayErrorData( + paymentHash: dco_decode_String(arr[0]), + reason: dco_decode_String(arr[1]), + ); + } + @protected LnUrlPayRequest dco_decode_ln_url_pay_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2564,6 +2560,38 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + LnUrlPayResult dco_decode_ln_url_pay_result(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return LnUrlPayResult_EndpointSuccess( + data: dco_decode_box_autoadd_ln_url_pay_success_data(raw[1]), + ); + case 1: + return LnUrlPayResult_EndpointError( + data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), + ); + case 2: + return LnUrlPayResult_PayError( + data: dco_decode_box_autoadd_ln_url_pay_error_data(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @protected + LnUrlPaySuccessData dco_decode_ln_url_pay_success_data(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 LnUrlPaySuccessData( + payment: dco_decode_payment(arr[0]), + successAction: dco_decode_opt_box_autoadd_success_action_processed(arr[1]), + ); + } + @protected LnUrlWithdrawRequest dco_decode_ln_url_withdraw_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3551,12 +3579,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } - @protected - BigInt dco_decode_usize(dynamic raw) { - // Codec=Dco (DartCObject based), see doc to use other codecs - return dcoDecodeU64(raw); - } - @protected AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3564,23 +3586,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return AnyhowException(inner); } - @protected - LnUrlPayResult - sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return LnUrlPayResultImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - - @protected - LnUrlPayResult sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return LnUrlPayResultImpl.frbInternalSseDecode( - sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); - } - @protected RustStreamSink sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3804,6 +3809,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_ln_url_error_data(deserializer)); } + @protected + LnUrlPayErrorData sse_decode_box_autoadd_ln_url_pay_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_error_data(deserializer)); + } + @protected LnUrlPayRequest sse_decode_box_autoadd_ln_url_pay_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3816,6 +3827,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return (sse_decode_ln_url_pay_request_data(deserializer)); } + @protected + LnUrlPaySuccessData sse_decode_box_autoadd_ln_url_pay_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_ln_url_pay_success_data(deserializer)); + } + @protected LnUrlWithdrawRequest sse_decode_box_autoadd_ln_url_withdraw_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4611,6 +4628,14 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return LnUrlErrorData(reason: var_reason); } + @protected + LnUrlPayErrorData sse_decode_ln_url_pay_error_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_paymentHash = sse_decode_String(deserializer); + var var_reason = sse_decode_String(deserializer); + return LnUrlPayErrorData(paymentHash: var_paymentHash, reason: var_reason); + } + @protected LnUrlPayRequest sse_decode_ln_url_pay_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4646,6 +4671,34 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements lnAddress: var_lnAddress); } + @protected + LnUrlPayResult sse_decode_ln_url_pay_result(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_data = sse_decode_box_autoadd_ln_url_pay_success_data(deserializer); + return LnUrlPayResult_EndpointSuccess(data: var_data); + case 1: + var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); + return LnUrlPayResult_EndpointError(data: var_data); + case 2: + var var_data = sse_decode_box_autoadd_ln_url_pay_error_data(deserializer); + return LnUrlPayResult_PayError(data: var_data); + default: + throw UnimplementedError(''); + } + } + + @protected + LnUrlPaySuccessData sse_decode_ln_url_pay_success_data(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + var var_payment = sse_decode_payment(deserializer); + var var_successAction = sse_decode_opt_box_autoadd_success_action_processed(deserializer); + return LnUrlPaySuccessData(payment: var_payment, successAction: var_successAction); + } + @protected LnUrlWithdrawRequest sse_decode_ln_url_withdraw_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5696,28 +5749,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return UrlSuccessActionData(description: var_description, url: var_url); } - @protected - BigInt sse_decode_usize(SseDeserializer deserializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - return deserializer.buffer.getBigUint64(); - } - - @protected - int cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - LnUrlPayResult raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as LnUrlPayResultImpl).frbInternalCstEncode(move: true); - } - - @protected - int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - LnUrlPayResult raw) { - // Codec=Cst (C-struct based), see doc to use other codecs -// ignore: invalid_use_of_internal_member - return (raw as LnUrlPayResultImpl).frbInternalCstEncode(); - } - @protected bool cst_encode_bool(bool raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -5832,20 +5863,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.message, serializer); } - @protected - void sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - LnUrlPayResult self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize((self as LnUrlPayResultImpl).frbInternalSseEncode(move: true), serializer); - } - - @protected - void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - LnUrlPayResult self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - sse_encode_usize((self as LnUrlPayResultImpl).frbInternalSseEncode(move: null), serializer); - } - @protected void sse_encode_StreamSink_breez_event_Dco(RustStreamSink self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6069,6 +6086,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_ln_url_error_data(self, serializer); } + @protected + void sse_encode_box_autoadd_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_error_data(self, serializer); + } + @protected void sse_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6081,6 +6104,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_ln_url_pay_request_data(self, serializer); } + @protected + void sse_encode_box_autoadd_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_ln_url_pay_success_data(self, serializer); + } + @protected void sse_encode_box_autoadd_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6748,6 +6777,13 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.reason, serializer); } + @protected + void sse_encode_ln_url_pay_error_data(LnUrlPayErrorData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_String(self.paymentHash, serializer); + sse_encode_String(self.reason, serializer); + } + @protected void sse_encode_ln_url_pay_request(LnUrlPayRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6771,6 +6807,31 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_String(self.lnAddress, serializer); } + @protected + void sse_encode_ln_url_pay_result(LnUrlPayResult self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case LnUrlPayResult_EndpointSuccess(data: final data): + sse_encode_i_32(0, serializer); + sse_encode_box_autoadd_ln_url_pay_success_data(data, serializer); + case LnUrlPayResult_EndpointError(data: final data): + sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_error_data(data, serializer); + case LnUrlPayResult_PayError(data: final data): + sse_encode_i_32(2, serializer); + sse_encode_box_autoadd_ln_url_pay_error_data(data, serializer); + default: + throw UnimplementedError(''); + } + } + + @protected + void sse_encode_ln_url_pay_success_data(LnUrlPaySuccessData self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_payment(self.payment, serializer); + sse_encode_opt_box_autoadd_success_action_processed(self.successAction, serializer); + } + @protected void sse_encode_ln_url_withdraw_request(LnUrlWithdrawRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7611,28 +7672,4 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.description, serializer); sse_encode_String(self.url, serializer); } - - @protected - void sse_encode_usize(BigInt self, SseSerializer serializer) { - // Codec=Sse (Serialization based), see doc to use other codecs - serializer.buffer.putBigUint64(self); - } -} - -@sealed -class LnUrlPayResultImpl extends RustOpaque implements LnUrlPayResult { - // Not to be used by end users - LnUrlPayResultImpl.frbInternalDcoDecode(List wire) - : super.frbInternalDcoDecode(wire, _kStaticData); - - // Not to be used by end users - LnUrlPayResultImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative) - : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData); - - static final _kStaticData = RustArcStaticData( - rustArcIncrementStrongCount: BreezSdkBindings.instance.api.rust_arc_increment_strong_count_LnUrlPayResult, - rustArcDecrementStrongCount: BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_LnUrlPayResult, - rustArcDecrementStrongCountPtr: - BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_LnUrlPayResultPtr, - ); } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index bdc2b7de2..63824be8b 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:ffi' as ffi; import 'frb_generated.dart'; +import 'lnurl/pay.dart'; import 'lsp.dart'; import 'models.dart'; import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated_io.dart'; @@ -22,21 +23,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wire - ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr; - @protected AnyhowException dco_decode_AnyhowException(dynamic raw); - @protected - LnUrlPayResult - dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - dynamic raw); - - @protected - LnUrlPayResult dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - dynamic raw); - @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw); @@ -133,12 +122,18 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer); @@ -782,12 +774,18 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_AnyhowException(AnyhowException raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1545,6 +1549,15 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_ln_url_pay_error_data( + LnUrlPayErrorData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_error_data(); + cst_api_fill_to_wire_ln_url_pay_error_data(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -1562,6 +1575,15 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_box_autoadd_ln_url_pay_success_data( + LnUrlPaySuccessData raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + final ptr = wire.cst_new_box_autoadd_ln_url_pay_success_data(); + cst_api_fill_to_wire_ln_url_pay_success_data(raw, ptr.ref); + return ptr; + } + @protected ffi.Pointer cst_encode_box_autoadd_ln_url_withdraw_request( LnUrlWithdrawRequest raw) { @@ -2160,12 +2182,6 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { + cst_api_fill_to_wire_ln_url_pay_error_data(apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_ln_url_pay_request( LnUrlPayRequest apiObj, ffi.Pointer wireObj) { @@ -2341,6 +2363,12 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wireObj) { + cst_api_fill_to_wire_ln_url_pay_success_data(apiObj, wireObj.ref); + } + @protected void cst_api_fill_to_wire_box_autoadd_ln_url_withdraw_request( LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { @@ -2824,6 +2852,13 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl self, SseSerializer serializer); @@ -3567,12 +3615,18 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl)>(); - void - rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ffi.Pointer ptr, - ) { - return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ptr, - ); - } - - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr = - _lookup)>>( - 'frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult'); - late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult = - _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr - .asFunction)>(); - - void - rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ffi.Pointer ptr, - ) { - return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult( - ptr, - ); - } - - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr = - _lookup)>>( - 'frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult'); - late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResult = - _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerLnUrlPayResultPtr - .asFunction)>(); - ffi.Pointer cst_new_box_autoadd_aes_success_action_data_decrypted() { return _cst_new_box_autoadd_aes_success_action_data_decrypted(); @@ -5391,6 +5419,16 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_ln_url_error_data = _cst_new_box_autoadd_ln_url_error_dataPtr .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_ln_url_pay_error_data() { + return _cst_new_box_autoadd_ln_url_pay_error_data(); + } + + late final _cst_new_box_autoadd_ln_url_pay_error_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data'); + late final _cst_new_box_autoadd_ln_url_pay_error_data = _cst_new_box_autoadd_ln_url_pay_error_dataPtr + .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_ln_url_pay_request() { return _cst_new_box_autoadd_ln_url_pay_request(); } @@ -5411,6 +5449,16 @@ class BreezSdkBindingsWire implements BaseWire { late final _cst_new_box_autoadd_ln_url_pay_request_data = _cst_new_box_autoadd_ln_url_pay_request_dataPtr .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_ln_url_pay_success_data() { + return _cst_new_box_autoadd_ln_url_pay_success_data(); + } + + late final _cst_new_box_autoadd_ln_url_pay_success_dataPtr = + _lookup Function()>>( + 'frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data'); + late final _cst_new_box_autoadd_ln_url_pay_success_data = _cst_new_box_autoadd_ln_url_pay_success_dataPtr + .asFunction Function()>(); + ffi.Pointer cst_new_box_autoadd_ln_url_withdraw_request() { return _cst_new_box_autoadd_ln_url_withdraw_request(); } @@ -6812,6 +6860,18 @@ final class wire_cst_ln_url_error_data extends ffi.Struct { external ffi.Pointer reason; } +final class wire_cst_ln_url_pay_error_data extends ffi.Struct { + external ffi.Pointer payment_hash; + + external ffi.Pointer reason; +} + +final class wire_cst_ln_url_pay_success_data extends ffi.Struct { + external wire_cst_payment payment; + + external ffi.Pointer success_action; +} + final class wire_cst_ln_url_withdraw_success_data extends ffi.Struct { external wire_cst_ln_invoice invoice; } @@ -7092,6 +7152,33 @@ final class wire_cst_ln_url_callback_status extends ffi.Struct { external LnUrlCallbackStatusKind kind; } +final class wire_cst_LnUrlPayResult_EndpointSuccess extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_LnUrlPayResult_EndpointError extends ffi.Struct { + external ffi.Pointer data; +} + +final class wire_cst_LnUrlPayResult_PayError extends ffi.Struct { + external ffi.Pointer data; +} + +final class LnUrlPayResultKind extends ffi.Union { + external wire_cst_LnUrlPayResult_EndpointSuccess EndpointSuccess; + + external wire_cst_LnUrlPayResult_EndpointError EndpointError; + + external wire_cst_LnUrlPayResult_PayError PayError; +} + +final class wire_cst_ln_url_pay_result extends ffi.Struct { + @ffi.Int32() + external int tag; + + external LnUrlPayResultKind kind; +} + final class wire_cst_LnUrlWithdrawResult_Ok extends ffi.Struct { external ffi.Pointer data; } diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay.dart b/libs/sdk-flutter/lib/generated/lnurl/pay.dart new file mode 100644 index 000000000..ae8095aed --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lnurl/pay.dart @@ -0,0 +1,47 @@ +// 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 '../binding.dart'; +import '../frb_generated.dart'; +import '../models.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'pay.freezed.dart'; + +@freezed +sealed class LnUrlPayResult with _$LnUrlPayResult { + const LnUrlPayResult._(); + + const factory LnUrlPayResult.endpointSuccess({ + required LnUrlPaySuccessData data, + }) = LnUrlPayResult_EndpointSuccess; + const factory LnUrlPayResult.endpointError({ + required LnUrlErrorData data, + }) = LnUrlPayResult_EndpointError; + const factory LnUrlPayResult.payError({ + required LnUrlPayErrorData data, + }) = LnUrlPayResult_PayError; +} + +class LnUrlPaySuccessData { + final Payment payment; + final SuccessActionProcessed? successAction; + + const LnUrlPaySuccessData({ + required this.payment, + this.successAction, + }); + + @override + int get hashCode => payment.hashCode ^ successAction.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is LnUrlPaySuccessData && + runtimeType == other.runtimeType && + payment == other.payment && + successAction == other.successAction; +} diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay.freezed.dart b/libs/sdk-flutter/lib/generated/lnurl/pay.freezed.dart new file mode 100644 index 000000000..f4eaaa03d --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lnurl/pay.freezed.dart @@ -0,0 +1,508 @@ +// 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 'pay.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 _$LnUrlPayResult { + Object get data => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $LnUrlPayResultCopyWith<$Res> { + factory $LnUrlPayResultCopyWith(LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = + _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; +} + +/// @nodoc +class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> + implements $LnUrlPayResultCopyWith<$Res> { + _$LnUrlPayResultCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { + factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith(_$LnUrlPayResult_EndpointSuccessImpl value, + $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPaySuccessData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointSuccessImpl> + implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( + _$LnUrlPayResult_EndpointSuccessImpl _value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_EndpointSuccessImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPaySuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_EndpointSuccessImpl extends LnUrlPayResult_EndpointSuccess { + const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}) : super._(); + + @override + final LnUrlPaySuccessData data; + + @override + String toString() { + return 'LnUrlPayResult.endpointSuccess(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_EndpointSuccessImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => + __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<_$LnUrlPayResult_EndpointSuccessImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return endpointSuccess(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return endpointSuccess?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (endpointSuccess != null) { + return endpointSuccess(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return endpointSuccess(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return endpointSuccess?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (endpointSuccess != null) { + return endpointSuccess(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_EndpointSuccess extends LnUrlPayResult { + const factory LnUrlPayResult_EndpointSuccess({required final LnUrlPaySuccessData data}) = + _$LnUrlPayResult_EndpointSuccessImpl; + const LnUrlPayResult_EndpointSuccess._() : super._(); + + @override + LnUrlPaySuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { + factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( + _$LnUrlPayResult_EndpointErrorImpl value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlErrorData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointErrorImpl> + implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( + _$LnUrlPayResult_EndpointErrorImpl _value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_EndpointErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_EndpointErrorImpl extends LnUrlPayResult_EndpointError { + const _$LnUrlPayResult_EndpointErrorImpl({required this.data}) : super._(); + + @override + final LnUrlErrorData data; + + @override + String toString() { + return 'LnUrlPayResult.endpointError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_EndpointErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => + __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<_$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return endpointError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return endpointError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (endpointError != null) { + return endpointError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return endpointError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return endpointError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (endpointError != null) { + return endpointError(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_EndpointError extends LnUrlPayResult { + const factory LnUrlPayResult_EndpointError({required final LnUrlErrorData data}) = + _$LnUrlPayResult_EndpointErrorImpl; + const LnUrlPayResult_EndpointError._() : super._(); + + @override + LnUrlErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { + factory _$$LnUrlPayResult_PayErrorImplCopyWith( + _$LnUrlPayResult_PayErrorImpl value, $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = + __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlPayErrorData data}); +} + +/// @nodoc +class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> + extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> + implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { + __$$LnUrlPayResult_PayErrorImplCopyWithImpl( + _$LnUrlPayResult_PayErrorImpl _value, $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlPayResult_PayErrorImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlPayErrorData, + )); + } +} + +/// @nodoc + +class _$LnUrlPayResult_PayErrorImpl extends LnUrlPayResult_PayError { + const _$LnUrlPayResult_PayErrorImpl({required this.data}) : super._(); + + @override + final LnUrlPayErrorData data; + + @override + String toString() { + return 'LnUrlPayResult.payError(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlPayResult_PayErrorImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => + __$$LnUrlPayResult_PayErrorImplCopyWithImpl<_$LnUrlPayResult_PayErrorImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlPaySuccessData data) endpointSuccess, + required TResult Function(LnUrlErrorData data) endpointError, + required TResult Function(LnUrlPayErrorData data) payError, + }) { + return payError(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult? Function(LnUrlErrorData data)? endpointError, + TResult? Function(LnUrlPayErrorData data)? payError, + }) { + return payError?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlPaySuccessData data)? endpointSuccess, + TResult Function(LnUrlErrorData data)? endpointError, + TResult Function(LnUrlPayErrorData data)? payError, + required TResult orElse(), + }) { + if (payError != null) { + return payError(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, + required TResult Function(LnUrlPayResult_EndpointError value) endpointError, + required TResult Function(LnUrlPayResult_PayError value) payError, + }) { + return payError(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult? Function(LnUrlPayResult_PayError value)? payError, + }) { + return payError?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, + TResult Function(LnUrlPayResult_EndpointError value)? endpointError, + TResult Function(LnUrlPayResult_PayError value)? payError, + required TResult orElse(), + }) { + if (payError != null) { + return payError(this); + } + return orElse(); + } +} + +abstract class LnUrlPayResult_PayError extends LnUrlPayResult { + const factory LnUrlPayResult_PayError({required final LnUrlPayErrorData data}) = + _$LnUrlPayResult_PayErrorImpl; + const LnUrlPayResult_PayError._() : super._(); + + @override + LnUrlPayErrorData get data; + @JsonKey(ignore: true) + _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/sdk.dart b/libs/sdk-flutter/lib/sdk.dart index e62b19944..540832134 100644 --- a/libs/sdk-flutter/lib/sdk.dart +++ b/libs/sdk-flutter/lib/sdk.dart @@ -4,5 +4,6 @@ export 'generated/chain.dart'; export 'generated/frb_generated.dart'; export 'generated/frb_generated.io.dart'; export 'generated/lsp.dart'; +export 'generated/lnurl/pay.dart'; export 'generated/models.dart'; export 'exceptions.dart'; From 5e5c29204ed649d80ea2c23b7fd22d77d439f725 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 14:58:29 +0300 Subject: [PATCH 20/23] Do not export "frb_generated.io.dart" --- libs/sdk-flutter/lib/sdk.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libs/sdk-flutter/lib/sdk.dart b/libs/sdk-flutter/lib/sdk.dart index 540832134..4a4a7af6e 100644 --- a/libs/sdk-flutter/lib/sdk.dart +++ b/libs/sdk-flutter/lib/sdk.dart @@ -2,8 +2,7 @@ export 'generated/binding.dart'; export 'generated/breez_services.dart'; export 'generated/chain.dart'; export 'generated/frb_generated.dart'; -export 'generated/frb_generated.io.dart'; export 'generated/lsp.dart'; export 'generated/lnurl/pay.dart'; export 'generated/models.dart'; -export 'exceptions.dart'; +export 'exceptions.dart'; \ No newline at end of file From ab782cf81f441104ecd53e5c69afdc9198c70559 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Mon, 24 Jun 2024 15:13:16 +0300 Subject: [PATCH 21/23] Cleanup extracted generated files --- libs/sdk-flutter/lib/generated/fiat.dart | 164 -- .../lib/generated/input_parser.dart | 290 ---- .../lib/generated/input_parser.freezed.dart | 1492 ----------------- libs/sdk-flutter/lib/generated/invoice.dart | 143 -- libs/sdk-flutter/lib/sdk.dart | 2 +- 5 files changed, 1 insertion(+), 2090 deletions(-) delete mode 100644 libs/sdk-flutter/lib/generated/fiat.dart delete mode 100644 libs/sdk-flutter/lib/generated/input_parser.dart delete mode 100644 libs/sdk-flutter/lib/generated/input_parser.freezed.dart delete mode 100644 libs/sdk-flutter/lib/generated/invoice.dart diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart deleted file mode 100644 index 3014f97b3..000000000 --- a/libs/sdk-flutter/lib/generated/fiat.dart +++ /dev/null @@ -1,164 +0,0 @@ -// This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. - -// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import - -import 'frb_generated.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - -/// Details about a supported currency in the fiat rate feed -class CurrencyInfo { - final String name; - final int fractionSize; - final int? spacing; - final Symbol? symbol; - final Symbol? uniqSymbol; - final List? localizedName; - final List? localeOverrides; - - const CurrencyInfo({ - required this.name, - required this.fractionSize, - this.spacing, - this.symbol, - this.uniqSymbol, - this.localizedName, - this.localeOverrides, - }); - - @override - int get hashCode => - name.hashCode ^ - fractionSize.hashCode ^ - spacing.hashCode ^ - symbol.hashCode ^ - uniqSymbol.hashCode ^ - localizedName.hashCode ^ - localeOverrides.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is CurrencyInfo && - runtimeType == other.runtimeType && - name == other.name && - fractionSize == other.fractionSize && - spacing == other.spacing && - symbol == other.symbol && - uniqSymbol == other.uniqSymbol && - localizedName == other.localizedName && - localeOverrides == other.localeOverrides; -} - -/// Wrapper around the [CurrencyInfo] of a fiat currency -class FiatCurrency { - final String id; - final CurrencyInfo info; - - const FiatCurrency({ - required this.id, - required this.info, - }); - - @override - int get hashCode => id.hashCode ^ info.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is FiatCurrency && runtimeType == other.runtimeType && id == other.id && info == other.info; -} - -/// Locale-specific settings for the representation of a currency -class LocaleOverrides { - final String locale; - final int? spacing; - final Symbol symbol; - - const LocaleOverrides({ - required this.locale, - this.spacing, - required this.symbol, - }); - - @override - int get hashCode => locale.hashCode ^ spacing.hashCode ^ symbol.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LocaleOverrides && - runtimeType == other.runtimeType && - locale == other.locale && - spacing == other.spacing && - symbol == other.symbol; -} - -/// Localized name of a currency -class LocalizedName { - final String locale; - final String name; - - const LocalizedName({ - required this.locale, - required this.name, - }); - - @override - int get hashCode => locale.hashCode ^ name.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LocalizedName && - runtimeType == other.runtimeType && - locale == other.locale && - name == other.name; -} - -/// Denominator in an exchange rate -class Rate { - final String coin; - final double value; - - const Rate({ - required this.coin, - required this.value, - }); - - @override - int get hashCode => coin.hashCode ^ value.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Rate && runtimeType == other.runtimeType && coin == other.coin && value == other.value; -} - -/// Settings for the symbol representation of a currency -class Symbol { - final String? grapheme; - final String? template; - final bool? rtl; - final int? position; - - const Symbol({ - this.grapheme, - this.template, - this.rtl, - this.position, - }); - - @override - int get hashCode => grapheme.hashCode ^ template.hashCode ^ rtl.hashCode ^ position.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is Symbol && - runtimeType == other.runtimeType && - grapheme == other.grapheme && - template == other.template && - rtl == other.rtl && - position == other.position; -} diff --git a/libs/sdk-flutter/lib/generated/input_parser.dart b/libs/sdk-flutter/lib/generated/input_parser.dart deleted file mode 100644 index 0022fdae3..000000000 --- a/libs/sdk-flutter/lib/generated/input_parser.dart +++ /dev/null @@ -1,290 +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 'invoice.dart'; -import 'models.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; -part 'input_parser.freezed.dart'; - -/// Wrapped in a [BitcoinAddress], this is the result of [parse] when given a plain or BIP-21 BTC address. -class BitcoinAddressData { - final String address; - final Network network; - final BigInt? amountSat; - final String? label; - final String? message; - - const BitcoinAddressData({ - required this.address, - required this.network, - this.amountSat, - this.label, - this.message, - }); - - @override - int get hashCode => - address.hashCode ^ network.hashCode ^ amountSat.hashCode ^ label.hashCode ^ message.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is BitcoinAddressData && - runtimeType == other.runtimeType && - address == other.address && - network == other.network && - amountSat == other.amountSat && - label == other.label && - message == other.message; -} - -@freezed -sealed class InputType with _$InputType { - const InputType._(); - - /// # Supported standards - /// - /// - plain on-chain BTC address - /// - BIP21 - const factory InputType.bitcoinAddress({ - required BitcoinAddressData address, - }) = InputType_BitcoinAddress; - - /// Also covers URIs like `bitcoin:...&lightning=bolt11`. In this case, it returns the BOLT11 - /// and discards all other data. - const factory InputType.bolt11({ - required LNInvoice invoice, - }) = InputType_Bolt11; - const factory InputType.nodeId({ - required String nodeId, - }) = InputType_NodeId; - const factory InputType.url({ - required String url, - }) = InputType_Url; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-06 `payRequest` spec - /// - LUD-16 LN Address - /// - LUD-17 Support for lnurlp prefix with non-bech32-encoded LNURL URLs - const factory InputType.lnUrlPay({ - required LnUrlPayRequestData data, - }) = InputType_LnUrlPay; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-03 `withdrawRequest` spec - /// - LUD-17 Support for lnurlw prefix with non-bech32-encoded LNURL URLs - /// - /// # Not supported (yet) - /// - /// - LUD-14 `balanceCheck`: reusable `withdrawRequest`s - /// - LUD-19 Pay link discoverable from withdraw link - const factory InputType.lnUrlWithdraw({ - required LnUrlWithdrawRequestData data, - }) = InputType_LnUrlWithdraw; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-04 `auth` base spec - /// - LUD-17 Support for keyauth prefix with non-bech32-encoded LNURL URLs - const factory InputType.lnUrlAuth({ - required LnUrlAuthRequestData data, - }) = InputType_LnUrlAuth; - const factory InputType.lnUrlError({ - required LnUrlErrorData data, - }) = InputType_LnUrlError; -} - -/// Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlAuthRequestData { - /// Hex encoded 32 bytes of challenge - final String k1; - - /// When available, one of: register, login, link, auth - final String? action; - - /// Indicates the domain of the LNURL-auth service, to be shown to the user when asking for - /// auth confirmation, as per LUD-04 spec. - final String domain; - - /// Indicates the URL of the LNURL-auth service, including the query arguments. This will be - /// extended with the signed challenge and the linking key, then called in the second step of the workflow. - final String url; - - const LnUrlAuthRequestData({ - required this.k1, - this.action, - required this.domain, - required this.url, - }); - - @override - int get hashCode => k1.hashCode ^ action.hashCode ^ domain.hashCode ^ url.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlAuthRequestData && - runtimeType == other.runtimeType && - k1 == other.k1 && - action == other.action && - domain == other.domain && - url == other.url; -} - -/// Wrapped in a [LnUrlError], this represents a LNURL-endpoint error. -class LnUrlErrorData { - final String reason; - - const LnUrlErrorData({ - required this.reason, - }); - - @override - int get hashCode => reason.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlErrorData && runtimeType == other.runtimeType && reason == other.reason; -} - -/// Wrapped in a [LnUrlPay], this is the result of [parse] when given a LNURL-pay endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlPayRequestData { - final String callback; - - /// The minimum amount, in millisats, that this LNURL-pay endpoint accepts - final BigInt minSendable; - - /// The maximum amount, in millisats, that this LNURL-pay endpoint accepts - final BigInt maxSendable; - - /// As per LUD-06, `metadata` is a raw string (e.g. a json representation of the inner map). - /// Use `metadata_vec()` to get the parsed items. - final String metadataStr; - - /// The comment length accepted by this endpoint - /// - /// See - final int commentAllowed; - - /// Indicates the domain of the LNURL-pay service, to be shown to the user when asking for - /// payment input, as per LUD-06 spec. - /// - /// Note: this is not the domain of the callback, but the domain of the LNURL-pay endpoint. - final String domain; - - /// Value indicating whether the recipient supports Nostr Zaps through NIP-57. - /// - /// See - final bool allowsNostr; - - /// Optional recipient's lnurl provider's Nostr pubkey for NIP-57. If it exists it should be a - /// valid BIP 340 public key in hex. - /// - /// See - /// See - final String? nostrPubkey; - - /// If sending to a LN Address, this will be filled. - final String? lnAddress; - - const LnUrlPayRequestData({ - required this.callback, - required this.minSendable, - required this.maxSendable, - required this.metadataStr, - required this.commentAllowed, - required this.domain, - required this.allowsNostr, - this.nostrPubkey, - this.lnAddress, - }); - - @override - int get hashCode => - callback.hashCode ^ - minSendable.hashCode ^ - maxSendable.hashCode ^ - metadataStr.hashCode ^ - commentAllowed.hashCode ^ - domain.hashCode ^ - allowsNostr.hashCode ^ - nostrPubkey.hashCode ^ - lnAddress.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlPayRequestData && - runtimeType == other.runtimeType && - callback == other.callback && - minSendable == other.minSendable && - maxSendable == other.maxSendable && - metadataStr == other.metadataStr && - commentAllowed == other.commentAllowed && - domain == other.domain && - allowsNostr == other.allowsNostr && - nostrPubkey == other.nostrPubkey && - lnAddress == other.lnAddress; -} - -/// Wrapped in a [LnUrlWithdraw], this is the result of [parse] when given a LNURL-withdraw endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlWithdrawRequestData { - final String callback; - final String k1; - final String defaultDescription; - - /// The minimum amount, in millisats, that this LNURL-withdraw endpoint accepts - final BigInt minWithdrawable; - - /// The maximum amount, in millisats, that this LNURL-withdraw endpoint accepts - final BigInt maxWithdrawable; - - const LnUrlWithdrawRequestData({ - required this.callback, - required this.k1, - required this.defaultDescription, - required this.minWithdrawable, - required this.maxWithdrawable, - }); - - @override - int get hashCode => - callback.hashCode ^ - k1.hashCode ^ - defaultDescription.hashCode ^ - minWithdrawable.hashCode ^ - maxWithdrawable.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LnUrlWithdrawRequestData && - runtimeType == other.runtimeType && - callback == other.callback && - k1 == other.k1 && - defaultDescription == other.defaultDescription && - minWithdrawable == other.minWithdrawable && - maxWithdrawable == other.maxWithdrawable; -} diff --git a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart deleted file mode 100644 index bec050b19..000000000 --- a/libs/sdk-flutter/lib/generated/input_parser.freezed.dart +++ /dev/null @@ -1,1492 +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 'input_parser.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 _$InputType { - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $InputTypeCopyWith<$Res> { - factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = - _$InputTypeCopyWithImpl<$Res, InputType>; -} - -/// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> - implements $InputTypeCopyWith<$Res> { - _$InputTypeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { - factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, - $Res Function(_$InputType_BitcoinAddressImpl) then) = - __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; - @useResult - $Res call({BitcoinAddressData address}); -} - -/// @nodoc -class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> - implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { - __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, - $Res Function(_$InputType_BitcoinAddressImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_$InputType_BitcoinAddressImpl( - address: null == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as BitcoinAddressData, - )); - } -} - -/// @nodoc - -class _$InputType_BitcoinAddressImpl extends InputType_BitcoinAddress { - const _$InputType_BitcoinAddressImpl({required this.address}) : super._(); - - @override - final BitcoinAddressData address; - - @override - String toString() { - return 'InputType.bitcoinAddress(address: $address)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_BitcoinAddressImpl && - (identical(other.address, address) || other.address == address)); - } - - @override - int get hashCode => Object.hash(runtimeType, address); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => __$$InputType_BitcoinAddressImplCopyWithImpl< - _$InputType_BitcoinAddressImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bitcoinAddress(address); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bitcoinAddress?.call(address); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(address); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bitcoinAddress(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bitcoinAddress?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(this); - } - return orElse(); - } -} - -abstract class InputType_BitcoinAddress extends InputType { - const factory InputType_BitcoinAddress( - {required final BitcoinAddressData address}) = - _$InputType_BitcoinAddressImpl; - const InputType_BitcoinAddress._() : super._(); - - BitcoinAddressData get address; - @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith(_$InputType_Bolt11Impl value, - $Res Function(_$InputType_Bolt11Impl) then) = - __$$InputType_Bolt11ImplCopyWithImpl<$Res>; - @useResult - $Res call({LNInvoice invoice}); -} - -/// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> - implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl(_$InputType_Bolt11Impl _value, - $Res Function(_$InputType_Bolt11Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? invoice = null, - }) { - return _then(_$InputType_Bolt11Impl( - invoice: null == invoice - ? _value.invoice - : invoice // ignore: cast_nullable_to_non_nullable - as LNInvoice, - )); - } -} - -/// @nodoc - -class _$InputType_Bolt11Impl extends InputType_Bolt11 { - const _$InputType_Bolt11Impl({required this.invoice}) : super._(); - - @override - final LNInvoice invoice; - - @override - String toString() { - return 'InputType.bolt11(invoice: $invoice)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_Bolt11Impl && - (identical(other.invoice, invoice) || other.invoice == invoice)); - } - - @override - int get hashCode => Object.hash(runtimeType, invoice); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bolt11(invoice); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bolt11?.call(invoice); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(invoice); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bolt11(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bolt11?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(this); - } - return orElse(); - } -} - -abstract class InputType_Bolt11 extends InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = - _$InputType_Bolt11Impl; - const InputType_Bolt11._() : super._(); - - LNInvoice get invoice; - @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith(_$InputType_NodeIdImpl value, - $Res Function(_$InputType_NodeIdImpl) then) = - __$$InputType_NodeIdImplCopyWithImpl<$Res>; - @useResult - $Res call({String nodeId}); -} - -/// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> - implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl(_$InputType_NodeIdImpl _value, - $Res Function(_$InputType_NodeIdImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? nodeId = null, - }) { - return _then(_$InputType_NodeIdImpl( - nodeId: null == nodeId - ? _value.nodeId - : nodeId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_NodeIdImpl extends InputType_NodeId { - const _$InputType_NodeIdImpl({required this.nodeId}) : super._(); - - @override - final String nodeId; - - @override - String toString() { - return 'InputType.nodeId(nodeId: $nodeId)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_NodeIdImpl && - (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); - } - - @override - int get hashCode => Object.hash(runtimeType, nodeId); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return nodeId(this.nodeId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return nodeId?.call(this.nodeId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this.nodeId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return nodeId(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return nodeId?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this); - } - return orElse(); - } -} - -abstract class InputType_NodeId extends InputType { - const factory InputType_NodeId({required final String nodeId}) = - _$InputType_NodeIdImpl; - const InputType_NodeId._() : super._(); - - String get nodeId; - @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith( - _$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = - __$$InputType_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({String url}); -} - -/// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> - implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl( - _$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - }) { - return _then(_$InputType_UrlImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_UrlImpl extends InputType_Url { - const _$InputType_UrlImpl({required this.url}) : super._(); - - @override - final String url; - - @override - String toString() { - return 'InputType.url(url: $url)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_UrlImpl && - (identical(other.url, url) || other.url == url)); - } - - @override - int get hashCode => Object.hash(runtimeType, url); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return url(this.url); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return url?.call(this.url); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this.url); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class InputType_Url extends InputType { - const factory InputType_Url({required final String url}) = - _$InputType_UrlImpl; - const InputType_Url._() : super._(); - - String get url; - @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith(_$InputType_LnUrlPayImpl value, - $Res Function(_$InputType_LnUrlPayImpl) then) = - __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> - implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl(_$InputType_LnUrlPayImpl _value, - $Res Function(_$InputType_LnUrlPayImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlPayImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlPayImpl extends InputType_LnUrlPay { - const _$InputType_LnUrlPayImpl({required this.data}) : super._(); - - @override - final LnUrlPayRequestData data; - - @override - String toString() { - return 'InputType.lnUrlPay(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlPayImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlPay(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlPay?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlPay(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlPay?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlPay extends InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = - _$InputType_LnUrlPayImpl; - const InputType_LnUrlPay._() : super._(); - - LnUrlPayRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, - $Res Function(_$InputType_LnUrlWithdrawImpl) then) = - __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> - implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, - $Res Function(_$InputType_LnUrlWithdrawImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlWithdrawImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlWithdrawImpl extends InputType_LnUrlWithdraw { - const _$InputType_LnUrlWithdrawImpl({required this.data}) : super._(); - - @override - final LnUrlWithdrawRequestData data; - - @override - String toString() { - return 'InputType.lnUrlWithdraw(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlWithdrawImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => __$$InputType_LnUrlWithdrawImplCopyWithImpl< - _$InputType_LnUrlWithdrawImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlWithdraw(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlWithdraw?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlWithdraw(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlWithdraw?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlWithdraw extends InputType { - const factory InputType_LnUrlWithdraw( - {required final LnUrlWithdrawRequestData data}) = - _$InputType_LnUrlWithdrawImpl; - const InputType_LnUrlWithdraw._() : super._(); - - LnUrlWithdrawRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith(_$InputType_LnUrlAuthImpl value, - $Res Function(_$InputType_LnUrlAuthImpl) then) = - __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlAuthRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> - implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl(_$InputType_LnUrlAuthImpl _value, - $Res Function(_$InputType_LnUrlAuthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlAuthImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlAuthRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlAuthImpl extends InputType_LnUrlAuth { - const _$InputType_LnUrlAuthImpl({required this.data}) : super._(); - - @override - final LnUrlAuthRequestData data; - - @override - String toString() { - return 'InputType.lnUrlAuth(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlAuthImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlAuth(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlAuth?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlAuth(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlAuth?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlAuth extends InputType { - const factory InputType_LnUrlAuth( - {required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; - const InputType_LnUrlAuth._() : super._(); - - LnUrlAuthRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith(_$InputType_LnUrlErrorImpl value, - $Res Function(_$InputType_LnUrlErrorImpl) then) = - __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> - implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl(_$InputType_LnUrlErrorImpl _value, - $Res Function(_$InputType_LnUrlErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlErrorImpl extends InputType_LnUrlError { - const _$InputType_LnUrlErrorImpl({required this.data}) : super._(); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'InputType.lnUrlError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlError extends InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = - _$InputType_LnUrlErrorImpl; - const InputType_LnUrlError._() : super._(); - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/libs/sdk-flutter/lib/generated/invoice.dart b/libs/sdk-flutter/lib/generated/invoice.dart deleted file mode 100644 index 3d9967678..000000000 --- a/libs/sdk-flutter/lib/generated/invoice.dart +++ /dev/null @@ -1,143 +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 'models.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; - -/// Wrapper for a BOLT11 LN invoice -class LNInvoice { - final String bolt11; - final Network network; - final String payeePubkey; - final String paymentHash; - final String? description; - final String? descriptionHash; - final BigInt? amountMsat; - final BigInt timestamp; - final BigInt expiry; - final List routingHints; - final Uint8List paymentSecret; - final BigInt minFinalCltvExpiryDelta; - - const LNInvoice({ - required this.bolt11, - required this.network, - required this.payeePubkey, - required this.paymentHash, - this.description, - this.descriptionHash, - this.amountMsat, - required this.timestamp, - required this.expiry, - required this.routingHints, - required this.paymentSecret, - required this.minFinalCltvExpiryDelta, - }); - - @override - int get hashCode => - bolt11.hashCode ^ - network.hashCode ^ - payeePubkey.hashCode ^ - paymentHash.hashCode ^ - description.hashCode ^ - descriptionHash.hashCode ^ - amountMsat.hashCode ^ - timestamp.hashCode ^ - expiry.hashCode ^ - routingHints.hashCode ^ - paymentSecret.hashCode ^ - minFinalCltvExpiryDelta.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is LNInvoice && - runtimeType == other.runtimeType && - bolt11 == other.bolt11 && - network == other.network && - payeePubkey == other.payeePubkey && - paymentHash == other.paymentHash && - description == other.description && - descriptionHash == other.descriptionHash && - amountMsat == other.amountMsat && - timestamp == other.timestamp && - expiry == other.expiry && - routingHints == other.routingHints && - paymentSecret == other.paymentSecret && - minFinalCltvExpiryDelta == other.minFinalCltvExpiryDelta; -} - -/// A route hint for a LN payment -class RouteHint { - final List hops; - - const RouteHint({ - required this.hops, - }); - - @override - int get hashCode => hops.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || other is RouteHint && runtimeType == other.runtimeType && hops == other.hops; -} - -/// Details of a specific hop in a larger route hint -class RouteHintHop { - /// The node_id of the non-target end of the route - final String srcNodeId; - - /// The short_channel_id of this channel - final BigInt shortChannelId; - - /// The fees which must be paid to use this channel - final int feesBaseMsat; - final int feesProportionalMillionths; - - /// The difference in CLTV values between this node and the next node. - final BigInt cltvExpiryDelta; - - /// The minimum value, in msat, which must be relayed to the next hop. - final BigInt? htlcMinimumMsat; - - /// The maximum value in msat available for routing with a single HTLC. - final BigInt? htlcMaximumMsat; - - const RouteHintHop({ - required this.srcNodeId, - required this.shortChannelId, - required this.feesBaseMsat, - required this.feesProportionalMillionths, - required this.cltvExpiryDelta, - this.htlcMinimumMsat, - this.htlcMaximumMsat, - }); - - @override - int get hashCode => - srcNodeId.hashCode ^ - shortChannelId.hashCode ^ - feesBaseMsat.hashCode ^ - feesProportionalMillionths.hashCode ^ - cltvExpiryDelta.hashCode ^ - htlcMinimumMsat.hashCode ^ - htlcMaximumMsat.hashCode; - - @override - bool operator ==(Object other) => - identical(this, other) || - other is RouteHintHop && - runtimeType == other.runtimeType && - srcNodeId == other.srcNodeId && - shortChannelId == other.shortChannelId && - feesBaseMsat == other.feesBaseMsat && - feesProportionalMillionths == other.feesProportionalMillionths && - cltvExpiryDelta == other.cltvExpiryDelta && - htlcMinimumMsat == other.htlcMinimumMsat && - htlcMaximumMsat == other.htlcMaximumMsat; -} diff --git a/libs/sdk-flutter/lib/sdk.dart b/libs/sdk-flutter/lib/sdk.dart index 4a4a7af6e..ad43d20c4 100644 --- a/libs/sdk-flutter/lib/sdk.dart +++ b/libs/sdk-flutter/lib/sdk.dart @@ -5,4 +5,4 @@ export 'generated/frb_generated.dart'; export 'generated/lsp.dart'; export 'generated/lnurl/pay.dart'; export 'generated/models.dart'; -export 'exceptions.dart'; \ No newline at end of file +export 'exceptions.dart'; From 3881144f6ccd0ebf77fd5eb5fd98791f4b7592b3 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Tue, 5 Nov 2024 17:25:46 +0300 Subject: [PATCH 22/23] Bump flutter_rust_bridge to 2.5.1 Specify range for flutter_rust_bridge from 2.0.0 to latest * Remove moonpay from lib.rs * Remove generated files from previous approach * Add matches_callback_domain to mirrored UrlSuccessActionData --- libs/Cargo.toml | 2 +- libs/sdk-core/Cargo.toml | 2 +- libs/sdk-core/src/binding.rs | 1 + libs/sdk-core/src/bridge_generated.io.rs | 2099 ----- libs/sdk-core/src/bridge_generated.rs | 2678 ------- libs/sdk-core/src/frb_generated.rs | 5592 +++++++++++++- libs/sdk-core/src/lib.rs | 1 - libs/sdk-flutter/ios/Classes/frb_generated.h | 25 +- libs/sdk-flutter/lib/bridge_generated.dart | 6873 ----------------- .../lib/bridge_generated.freezed.dart | 6327 --------------- libs/sdk-flutter/lib/generated/binding.dart | 34 +- .../lib/generated/binding.freezed.dart | 160 + .../lib/generated/breez_services.dart | 11 +- .../lib/generated/breez_services.freezed.dart | 244 + libs/sdk-flutter/lib/generated/chain.dart | 2 +- .../lib/generated/frb_generated.dart | 139 +- .../lib/generated/frb_generated.io.dart | 82 +- libs/sdk-flutter/lib/generated/lnurl/pay.dart | 2 +- libs/sdk-flutter/lib/generated/lsp.dart | 2 +- libs/sdk-flutter/lib/generated/models.dart | 57 +- libs/sdk-flutter/makefile | 2 +- libs/sdk-flutter/pubspec.lock | 134 +- libs/sdk-flutter/pubspec.yaml | 4 +- 23 files changed, 6315 insertions(+), 18158 deletions(-) delete mode 100644 libs/sdk-core/src/bridge_generated.io.rs delete mode 100644 libs/sdk-core/src/bridge_generated.rs delete mode 100644 libs/sdk-flutter/lib/bridge_generated.dart delete mode 100644 libs/sdk-flutter/lib/bridge_generated.freezed.dart diff --git a/libs/Cargo.toml b/libs/Cargo.toml index eee2c9fe5..4a97f2f78 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -21,7 +21,7 @@ aes = "0.8" anyhow = { version = "1.0.79", features = ["backtrace"] } base64 = "0.13.0" bitcoin = "=0.29.2" # Same version as used in gl-client -flutter_rust_bridge = "=2.0.0" +flutter_rust_bridge = ">=2.0.0, =2.5.1" # Pin the reqwest dependency until macOS linker issue is fixed: https://github.com/seanmonstar/reqwest/issues/2006 hex = "0.4" lightning = "=0.0.118" # Same version as used in gl-client diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index c55b66d26..627794ea0 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["staticlib", "cdylib", "lib"] [dependencies] aes = { workspace = true } anyhow = { workspace = true } -flutter_rust_bridge = { workspace = true } +flutter_rust_bridge = "=2.5.1" hex = { workspace = true } gl-client = { git = "https://github.com/Blockstream/greenlight.git", features = [ "permissive", diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index b1c858f5d..0f84ef23c 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -209,6 +209,7 @@ pub struct _MessageSuccessActionData { pub struct _UrlSuccessActionData { pub description: String, pub url: String, + pub matches_callback_domain: bool, } #[frb(mirror(LnUrlPayErrorData))] diff --git a/libs/sdk-core/src/bridge_generated.io.rs b/libs/sdk-core/src/bridge_generated.io.rs deleted file mode 100644 index f67df9ca1..000000000 --- a/libs/sdk-core/src/bridge_generated.io.rs +++ /dev/null @@ -1,2099 +0,0 @@ -use super::*; -// Section: wire functions - -#[no_mangle] -pub extern "C" fn wire_connect(port_: i64, req: *mut wire_ConnectRequest) { - wire_connect_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_is_initialized(port_: i64) { - wire_is_initialized_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_sync(port_: i64) { - wire_sync_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_node_credentials(port_: i64) { - wire_node_credentials_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_node_info(port_: i64) { - wire_node_info_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_configure_node(port_: i64, req: *mut wire_ConfigureNodeRequest) { - wire_configure_node_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_disconnect(port_: i64) { - wire_disconnect_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_sign_message(port_: i64, req: *mut wire_SignMessageRequest) { - wire_sign_message_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_check_message(port_: i64, req: *mut wire_CheckMessageRequest) { - wire_check_message_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_mnemonic_to_seed(port_: i64, phrase: *mut wire_uint_8_list) { - wire_mnemonic_to_seed_impl(port_, phrase) -} - -#[no_mangle] -pub extern "C" fn wire_default_config( - port_: i64, - env_type: i32, - api_key: *mut wire_uint_8_list, - node_config: *mut wire_NodeConfig, -) { - wire_default_config_impl(port_, env_type, api_key, node_config) -} - -#[no_mangle] -pub extern "C" fn wire_static_backup(port_: i64, req: *mut wire_StaticBackupRequest) { - wire_static_backup_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_service_health_check(port_: i64, api_key: *mut wire_uint_8_list) { - wire_service_health_check_impl(port_, api_key) -} - -#[no_mangle] -pub extern "C" fn wire_breez_events_stream(port_: i64) { - wire_breez_events_stream_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_breez_log_stream(port_: i64) { - wire_breez_log_stream_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_list_lsps(port_: i64) { - wire_list_lsps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_connect_lsp(port_: i64, lsp_id: *mut wire_uint_8_list) { - wire_connect_lsp_impl(port_, lsp_id) -} - -#[no_mangle] -pub extern "C" fn wire_lsp_id(port_: i64) { - wire_lsp_id_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_lsp_info(port_: i64, id: *mut wire_uint_8_list) { - wire_fetch_lsp_info_impl(port_, id) -} - -#[no_mangle] -pub extern "C" fn wire_lsp_info(port_: i64) { - wire_lsp_info_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_close_lsp_channels(port_: i64) { - wire_close_lsp_channels_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_register_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) { - wire_register_webhook_impl(port_, webhook_url) -} - -#[no_mangle] -pub extern "C" fn wire_unregister_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) { - wire_unregister_webhook_impl(port_, webhook_url) -} - -#[no_mangle] -pub extern "C" fn wire_backup(port_: i64) { - wire_backup_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_backup_status(port_: i64) { - wire_backup_status_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_parse_invoice(port_: i64, invoice: *mut wire_uint_8_list) { - wire_parse_invoice_impl(port_, invoice) -} - -#[no_mangle] -pub extern "C" fn wire_parse_input(port_: i64, input: *mut wire_uint_8_list) { - wire_parse_input_impl(port_, input) -} - -#[no_mangle] -pub extern "C" fn wire_list_payments(port_: i64, req: *mut wire_ListPaymentsRequest) { - wire_list_payments_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_payment_by_hash(port_: i64, hash: *mut wire_uint_8_list) { - wire_payment_by_hash_impl(port_, hash) -} - -#[no_mangle] -pub extern "C" fn wire_set_payment_metadata( - port_: i64, - hash: *mut wire_uint_8_list, - metadata: *mut wire_uint_8_list, -) { - wire_set_payment_metadata_impl(port_, hash, metadata) -} - -#[no_mangle] -pub extern "C" fn wire_send_payment(port_: i64, req: *mut wire_SendPaymentRequest) { - wire_send_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_send_spontaneous_payment( - port_: i64, - req: *mut wire_SendSpontaneousPaymentRequest, -) { - wire_send_spontaneous_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_receive_payment(port_: i64, req: *mut wire_ReceivePaymentRequest) { - wire_receive_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_pay(port_: i64, req: *mut wire_LnUrlPayRequest) { - wire_lnurl_pay_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_withdraw(port_: i64, req: *mut wire_LnUrlWithdrawRequest) { - wire_lnurl_withdraw_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_auth(port_: i64, req_data: *mut wire_LnUrlAuthRequestData) { - wire_lnurl_auth_impl(port_, req_data) -} - -#[no_mangle] -pub extern "C" fn wire_report_issue(port_: i64, req: *mut wire_ReportIssueRequest) { - wire_report_issue_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_fiat_rates(port_: i64) { - wire_fetch_fiat_rates_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_list_fiat_currencies(port_: i64) { - wire_list_fiat_currencies_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_max_reverse_swap_amount(port_: i64) { - wire_max_reverse_swap_amount_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_send_onchain(port_: i64, req: *mut wire_SendOnchainRequest) { - wire_send_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_pay_onchain(port_: i64, req: *mut wire_PayOnchainRequest) { - wire_pay_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_receive_onchain(port_: i64, req: *mut wire_ReceiveOnchainRequest) { - wire_receive_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_buy_bitcoin(port_: i64, req: *mut wire_BuyBitcoinRequest) { - wire_buy_bitcoin_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_redeem_onchain_funds(port_: i64, req: *mut wire_RedeemOnchainFundsRequest) { - wire_redeem_onchain_funds_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_redeem_onchain_funds( - port_: i64, - req: *mut wire_PrepareRedeemOnchainFundsRequest, -) { - wire_prepare_redeem_onchain_funds_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_list_refundables(port_: i64) { - wire_list_refundables_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_refund(port_: i64, req: *mut wire_PrepareRefundRequest) { - wire_prepare_refund_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_refund(port_: i64, req: *mut wire_RefundRequest) { - wire_refund_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_rescan_swaps(port_: i64) { - wire_rescan_swaps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_redeem_swap(port_: i64, swap_address: *mut wire_uint_8_list) { - wire_redeem_swap_impl(port_, swap_address) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_swap(port_: i64) { - wire_in_progress_swap_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_reverse_swaps(port_: i64) { - wire_in_progress_reverse_swaps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_claim_reverse_swap(port_: i64, lockup_address: *mut wire_uint_8_list) { - wire_claim_reverse_swap_impl(port_, lockup_address) -} - -#[no_mangle] -pub extern "C" fn wire_open_channel_fee(port_: i64, req: *mut wire_OpenChannelFeeRequest) { - wire_open_channel_fee_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_reverse_swap_fees(port_: i64, req: *mut wire_ReverseSwapFeesRequest) { - wire_fetch_reverse_swap_fees_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_onchain_payment_limits(port_: i64) { - wire_onchain_payment_limits_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_onchain_payment( - port_: i64, - req: *mut wire_PrepareOnchainPaymentRequest, -) { - wire_prepare_onchain_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_onchain_payments(port_: i64) { - wire_in_progress_onchain_payments_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_recommended_fees(port_: i64) { - wire_recommended_fees_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_execute_command(port_: i64, command: *mut wire_uint_8_list) { - wire_execute_command_impl(port_, command) -} - -#[no_mangle] -pub extern "C" fn wire_generate_diagnostic_data(port_: i64) { - wire_generate_diagnostic_data_impl(port_) -} - -// Section: allocate functions - -#[no_mangle] -pub extern "C" fn new_box_autoadd_bool_0(value: bool) -> *mut bool { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_buy_bitcoin_request_0() -> *mut wire_BuyBitcoinRequest { - support::new_leak_box_ptr(wire_BuyBitcoinRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_check_message_request_0() -> *mut wire_CheckMessageRequest { - support::new_leak_box_ptr(wire_CheckMessageRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_configure_node_request_0() -> *mut wire_ConfigureNodeRequest { - support::new_leak_box_ptr(wire_ConfigureNodeRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_connect_request_0() -> *mut wire_ConnectRequest { - support::new_leak_box_ptr(wire_ConnectRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_greenlight_credentials_0() -> *mut wire_GreenlightCredentials { - support::new_leak_box_ptr(wire_GreenlightCredentials::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_greenlight_node_config_0() -> *mut wire_GreenlightNodeConfig { - support::new_leak_box_ptr(wire_GreenlightNodeConfig::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_i64_0(value: i64) -> *mut i64 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_list_payments_request_0() -> *mut wire_ListPaymentsRequest { - support::new_leak_box_ptr(wire_ListPaymentsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_auth_request_data_0() -> *mut wire_LnUrlAuthRequestData { - support::new_leak_box_ptr(wire_LnUrlAuthRequestData::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_pay_request_0() -> *mut wire_LnUrlPayRequest { - support::new_leak_box_ptr(wire_LnUrlPayRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_withdraw_request_0() -> *mut wire_LnUrlWithdrawRequest { - support::new_leak_box_ptr(wire_LnUrlWithdrawRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_node_config_0() -> *mut wire_NodeConfig { - support::new_leak_box_ptr(wire_NodeConfig::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_open_channel_fee_request_0() -> *mut wire_OpenChannelFeeRequest { - support::new_leak_box_ptr(wire_OpenChannelFeeRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_opening_fee_params_0() -> *mut wire_OpeningFeeParams { - support::new_leak_box_ptr(wire_OpeningFeeParams::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_pay_onchain_request_0() -> *mut wire_PayOnchainRequest { - support::new_leak_box_ptr(wire_PayOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_onchain_payment_request_0( -) -> *mut wire_PrepareOnchainPaymentRequest { - support::new_leak_box_ptr(wire_PrepareOnchainPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_redeem_onchain_funds_request_0( -) -> *mut wire_PrepareRedeemOnchainFundsRequest { - support::new_leak_box_ptr(wire_PrepareRedeemOnchainFundsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_refund_request_0() -> *mut wire_PrepareRefundRequest { - support::new_leak_box_ptr(wire_PrepareRefundRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_receive_onchain_request_0() -> *mut wire_ReceiveOnchainRequest { - support::new_leak_box_ptr(wire_ReceiveOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_receive_payment_request_0() -> *mut wire_ReceivePaymentRequest { - support::new_leak_box_ptr(wire_ReceivePaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_redeem_onchain_funds_request_0( -) -> *mut wire_RedeemOnchainFundsRequest { - support::new_leak_box_ptr(wire_RedeemOnchainFundsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_refund_request_0() -> *mut wire_RefundRequest { - support::new_leak_box_ptr(wire_RefundRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_report_issue_request_0() -> *mut wire_ReportIssueRequest { - support::new_leak_box_ptr(wire_ReportIssueRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_report_payment_failure_details_0( -) -> *mut wire_ReportPaymentFailureDetails { - support::new_leak_box_ptr(wire_ReportPaymentFailureDetails::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_reverse_swap_fees_request_0() -> *mut wire_ReverseSwapFeesRequest -{ - support::new_leak_box_ptr(wire_ReverseSwapFeesRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_onchain_request_0() -> *mut wire_SendOnchainRequest { - support::new_leak_box_ptr(wire_SendOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_payment_request_0() -> *mut wire_SendPaymentRequest { - support::new_leak_box_ptr(wire_SendPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_spontaneous_payment_request_0( -) -> *mut wire_SendSpontaneousPaymentRequest { - support::new_leak_box_ptr(wire_SendSpontaneousPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_sign_message_request_0() -> *mut wire_SignMessageRequest { - support::new_leak_box_ptr(wire_SignMessageRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_static_backup_request_0() -> *mut wire_StaticBackupRequest { - support::new_leak_box_ptr(wire_StaticBackupRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_u32_0(value: u32) -> *mut u32 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_u64_0(value: u64) -> *mut u64 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_list_metadata_filter_0(len: i32) -> *mut wire_list_metadata_filter { - let wrap = wire_list_metadata_filter { - ptr: support::new_leak_vec_ptr(::new_with_null_ptr(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_list_payment_type_filter_0(len: i32) -> *mut wire_list_payment_type_filter { - let wrap = wire_list_payment_type_filter { - ptr: support::new_leak_vec_ptr(Default::default(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_list_tlv_entry_0(len: i32) -> *mut wire_list_tlv_entry { - let wrap = wire_list_tlv_entry { - ptr: support::new_leak_vec_ptr(::new_with_null_ptr(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_uint_8_list_0(len: i32) -> *mut wire_uint_8_list { - let ans = wire_uint_8_list { - ptr: support::new_leak_vec_ptr(Default::default(), len), - len, - }; - support::new_leak_box_ptr(ans) -} - -// Section: related functions - -// Section: impl Wire2Api - -impl Wire2Api for *mut wire_uint_8_list { - fn wire2api(self) -> String { - let vec: Vec = self.wire2api(); - String::from_utf8_lossy(&vec).into_owned() - } -} - -impl Wire2Api for *mut bool { - fn wire2api(self) -> bool { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut wire_BuyBitcoinRequest { - fn wire2api(self) -> BuyBitcoinRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_CheckMessageRequest { - fn wire2api(self) -> CheckMessageRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ConfigureNodeRequest { - fn wire2api(self) -> ConfigureNodeRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ConnectRequest { - fn wire2api(self) -> ConnectRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_GreenlightCredentials { - fn wire2api(self) -> GreenlightCredentials { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_GreenlightNodeConfig { - fn wire2api(self) -> GreenlightNodeConfig { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut i64 { - fn wire2api(self) -> i64 { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut wire_ListPaymentsRequest { - fn wire2api(self) -> ListPaymentsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlAuthRequestData { - fn wire2api(self) -> LnUrlAuthRequestData { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlPayRequest { - fn wire2api(self) -> LnUrlPayRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlWithdrawRequest { - fn wire2api(self) -> LnUrlWithdrawRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_NodeConfig { - fn wire2api(self) -> NodeConfig { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_OpenChannelFeeRequest { - fn wire2api(self) -> OpenChannelFeeRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_OpeningFeeParams { - fn wire2api(self) -> OpeningFeeParams { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PayOnchainRequest { - fn wire2api(self) -> PayOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareOnchainPaymentRequest { - fn wire2api(self) -> PrepareOnchainPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareRedeemOnchainFundsRequest { - fn wire2api(self) -> PrepareRedeemOnchainFundsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareRefundRequest { - fn wire2api(self) -> PrepareRefundRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReceiveOnchainRequest { - fn wire2api(self) -> ReceiveOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReceivePaymentRequest { - fn wire2api(self) -> ReceivePaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_RedeemOnchainFundsRequest { - fn wire2api(self) -> RedeemOnchainFundsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_RefundRequest { - fn wire2api(self) -> RefundRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReportIssueRequest { - fn wire2api(self) -> ReportIssueRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReportPaymentFailureDetails { - fn wire2api(self) -> ReportPaymentFailureDetails { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReverseSwapFeesRequest { - fn wire2api(self) -> ReverseSwapFeesRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendOnchainRequest { - fn wire2api(self) -> SendOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendPaymentRequest { - fn wire2api(self) -> SendPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendSpontaneousPaymentRequest { - fn wire2api(self) -> SendSpontaneousPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SignMessageRequest { - fn wire2api(self) -> SignMessageRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_StaticBackupRequest { - fn wire2api(self) -> StaticBackupRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut u32 { - fn wire2api(self) -> u32 { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut u64 { - fn wire2api(self) -> u64 { - unsafe { *support::box_from_leak_ptr(self) } - } -} - -impl Wire2Api for wire_BuyBitcoinRequest { - fn wire2api(self) -> BuyBitcoinRequest { - BuyBitcoinRequest { - provider: self.provider.wire2api(), - opening_fee_params: self.opening_fee_params.wire2api(), - redirect_url: self.redirect_url.wire2api(), - } - } -} -impl Wire2Api for wire_CheckMessageRequest { - fn wire2api(self) -> CheckMessageRequest { - CheckMessageRequest { - message: self.message.wire2api(), - pubkey: self.pubkey.wire2api(), - signature: self.signature.wire2api(), - } - } -} -impl Wire2Api for wire_Config { - fn wire2api(self) -> Config { - Config { - breezserver: self.breezserver.wire2api(), - chainnotifier_url: self.chainnotifier_url.wire2api(), - mempoolspace_url: self.mempoolspace_url.wire2api(), - working_dir: self.working_dir.wire2api(), - network: self.network.wire2api(), - payment_timeout_sec: self.payment_timeout_sec.wire2api(), - default_lsp_id: self.default_lsp_id.wire2api(), - api_key: self.api_key.wire2api(), - maxfee_percent: self.maxfee_percent.wire2api(), - exemptfee_msat: self.exemptfee_msat.wire2api(), - node_config: self.node_config.wire2api(), - } - } -} -impl Wire2Api for wire_ConfigureNodeRequest { - fn wire2api(self) -> ConfigureNodeRequest { - ConfigureNodeRequest { - close_to_address: self.close_to_address.wire2api(), - } - } -} -impl Wire2Api for wire_ConnectRequest { - fn wire2api(self) -> ConnectRequest { - ConnectRequest { - config: self.config.wire2api(), - seed: self.seed.wire2api(), - restore_only: self.restore_only.wire2api(), - } - } -} - -impl Wire2Api for wire_GreenlightCredentials { - fn wire2api(self) -> GreenlightCredentials { - GreenlightCredentials { - developer_key: self.developer_key.wire2api(), - developer_cert: self.developer_cert.wire2api(), - } - } -} -impl Wire2Api for wire_GreenlightNodeConfig { - fn wire2api(self) -> GreenlightNodeConfig { - GreenlightNodeConfig { - partner_credentials: self.partner_credentials.wire2api(), - invite_code: self.invite_code.wire2api(), - } - } -} - -impl Wire2Api> for *mut wire_list_metadata_filter { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api> for *mut wire_list_payment_type_filter { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api for wire_ListPaymentsRequest { - fn wire2api(self) -> ListPaymentsRequest { - ListPaymentsRequest { - filters: self.filters.wire2api(), - metadata_filters: self.metadata_filters.wire2api(), - from_timestamp: self.from_timestamp.wire2api(), - to_timestamp: self.to_timestamp.wire2api(), - include_failures: self.include_failures.wire2api(), - offset: self.offset.wire2api(), - limit: self.limit.wire2api(), - } - } -} -impl Wire2Api> for *mut wire_list_tlv_entry { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api for wire_LnUrlAuthRequestData { - fn wire2api(self) -> LnUrlAuthRequestData { - LnUrlAuthRequestData { - k1: self.k1.wire2api(), - action: self.action.wire2api(), - domain: self.domain.wire2api(), - url: self.url.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlPayRequest { - fn wire2api(self) -> LnUrlPayRequest { - LnUrlPayRequest { - data: self.data.wire2api(), - amount_msat: self.amount_msat.wire2api(), - use_trampoline: self.use_trampoline.wire2api(), - comment: self.comment.wire2api(), - payment_label: self.payment_label.wire2api(), - validate_success_action_url: self.validate_success_action_url.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlPayRequestData { - fn wire2api(self) -> LnUrlPayRequestData { - LnUrlPayRequestData { - callback: self.callback.wire2api(), - min_sendable: self.min_sendable.wire2api(), - max_sendable: self.max_sendable.wire2api(), - metadata_str: self.metadata_str.wire2api(), - comment_allowed: self.comment_allowed.wire2api(), - domain: self.domain.wire2api(), - allows_nostr: self.allows_nostr.wire2api(), - nostr_pubkey: self.nostr_pubkey.wire2api(), - ln_address: self.ln_address.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlWithdrawRequest { - fn wire2api(self) -> LnUrlWithdrawRequest { - LnUrlWithdrawRequest { - data: self.data.wire2api(), - amount_msat: self.amount_msat.wire2api(), - description: self.description.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlWithdrawRequestData { - fn wire2api(self) -> LnUrlWithdrawRequestData { - LnUrlWithdrawRequestData { - callback: self.callback.wire2api(), - k1: self.k1.wire2api(), - default_description: self.default_description.wire2api(), - min_withdrawable: self.min_withdrawable.wire2api(), - max_withdrawable: self.max_withdrawable.wire2api(), - } - } -} -impl Wire2Api for wire_MetadataFilter { - fn wire2api(self) -> MetadataFilter { - MetadataFilter { - json_path: self.json_path.wire2api(), - json_value: self.json_value.wire2api(), - } - } -} - -impl Wire2Api for wire_NodeConfig { - fn wire2api(self) -> NodeConfig { - match self.tag { - 0 => unsafe { - let ans = support::box_from_leak_ptr(self.kind); - let ans = support::box_from_leak_ptr(ans.Greenlight); - NodeConfig::Greenlight { - config: ans.config.wire2api(), - } - }, - _ => unreachable!(), - } - } -} -impl Wire2Api for wire_OpenChannelFeeRequest { - fn wire2api(self) -> OpenChannelFeeRequest { - OpenChannelFeeRequest { - amount_msat: self.amount_msat.wire2api(), - expiry: self.expiry.wire2api(), - } - } -} -impl Wire2Api for wire_OpeningFeeParams { - fn wire2api(self) -> OpeningFeeParams { - OpeningFeeParams { - min_msat: self.min_msat.wire2api(), - proportional: self.proportional.wire2api(), - valid_until: self.valid_until.wire2api(), - max_idle_time: self.max_idle_time.wire2api(), - max_client_to_self_delay: self.max_client_to_self_delay.wire2api(), - promise: self.promise.wire2api(), - } - } -} - -impl Wire2Api for wire_PayOnchainRequest { - fn wire2api(self) -> PayOnchainRequest { - PayOnchainRequest { - recipient_address: self.recipient_address.wire2api(), - prepare_res: self.prepare_res.wire2api(), - } - } -} - -impl Wire2Api for wire_PrepareOnchainPaymentRequest { - fn wire2api(self) -> PrepareOnchainPaymentRequest { - PrepareOnchainPaymentRequest { - amount_sat: self.amount_sat.wire2api(), - amount_type: self.amount_type.wire2api(), - claim_tx_feerate: self.claim_tx_feerate.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareOnchainPaymentResponse { - fn wire2api(self) -> PrepareOnchainPaymentResponse { - PrepareOnchainPaymentResponse { - fees_hash: self.fees_hash.wire2api(), - fees_percentage: self.fees_percentage.wire2api(), - fees_lockup: self.fees_lockup.wire2api(), - fees_claim: self.fees_claim.wire2api(), - sender_amount_sat: self.sender_amount_sat.wire2api(), - recipient_amount_sat: self.recipient_amount_sat.wire2api(), - total_fees: self.total_fees.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareRedeemOnchainFundsRequest { - fn wire2api(self) -> PrepareRedeemOnchainFundsRequest { - PrepareRedeemOnchainFundsRequest { - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareRefundRequest { - fn wire2api(self) -> PrepareRefundRequest { - PrepareRefundRequest { - swap_address: self.swap_address.wire2api(), - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_ReceiveOnchainRequest { - fn wire2api(self) -> ReceiveOnchainRequest { - ReceiveOnchainRequest { - opening_fee_params: self.opening_fee_params.wire2api(), - } - } -} -impl Wire2Api for wire_ReceivePaymentRequest { - fn wire2api(self) -> ReceivePaymentRequest { - ReceivePaymentRequest { - amount_msat: self.amount_msat.wire2api(), - description: self.description.wire2api(), - preimage: self.preimage.wire2api(), - opening_fee_params: self.opening_fee_params.wire2api(), - use_description_hash: self.use_description_hash.wire2api(), - expiry: self.expiry.wire2api(), - cltv: self.cltv.wire2api(), - } - } -} -impl Wire2Api for wire_RedeemOnchainFundsRequest { - fn wire2api(self) -> RedeemOnchainFundsRequest { - RedeemOnchainFundsRequest { - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_RefundRequest { - fn wire2api(self) -> RefundRequest { - RefundRequest { - swap_address: self.swap_address.wire2api(), - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_ReportIssueRequest { - fn wire2api(self) -> ReportIssueRequest { - match self.tag { - 0 => unsafe { - let ans = support::box_from_leak_ptr(self.kind); - let ans = support::box_from_leak_ptr(ans.PaymentFailure); - ReportIssueRequest::PaymentFailure { - data: ans.data.wire2api(), - } - }, - _ => unreachable!(), - } - } -} -impl Wire2Api for wire_ReportPaymentFailureDetails { - fn wire2api(self) -> ReportPaymentFailureDetails { - ReportPaymentFailureDetails { - payment_hash: self.payment_hash.wire2api(), - comment: self.comment.wire2api(), - } - } -} -impl Wire2Api for wire_ReverseSwapFeesRequest { - fn wire2api(self) -> ReverseSwapFeesRequest { - ReverseSwapFeesRequest { - send_amount_sat: self.send_amount_sat.wire2api(), - claim_tx_feerate: self.claim_tx_feerate.wire2api(), - } - } -} -impl Wire2Api for wire_SendOnchainRequest { - fn wire2api(self) -> SendOnchainRequest { - SendOnchainRequest { - amount_sat: self.amount_sat.wire2api(), - onchain_recipient_address: self.onchain_recipient_address.wire2api(), - pair_hash: self.pair_hash.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_SendPaymentRequest { - fn wire2api(self) -> SendPaymentRequest { - SendPaymentRequest { - bolt11: self.bolt11.wire2api(), - use_trampoline: self.use_trampoline.wire2api(), - amount_msat: self.amount_msat.wire2api(), - label: self.label.wire2api(), - } - } -} -impl Wire2Api for wire_SendSpontaneousPaymentRequest { - fn wire2api(self) -> SendSpontaneousPaymentRequest { - SendSpontaneousPaymentRequest { - node_id: self.node_id.wire2api(), - amount_msat: self.amount_msat.wire2api(), - extra_tlvs: self.extra_tlvs.wire2api(), - label: self.label.wire2api(), - } - } -} -impl Wire2Api for wire_SignMessageRequest { - fn wire2api(self) -> SignMessageRequest { - SignMessageRequest { - message: self.message.wire2api(), - } - } -} -impl Wire2Api for wire_StaticBackupRequest { - fn wire2api(self) -> StaticBackupRequest { - StaticBackupRequest { - working_dir: self.working_dir.wire2api(), - } - } -} - -impl Wire2Api for wire_TlvEntry { - fn wire2api(self) -> TlvEntry { - TlvEntry { - field_number: self.field_number.wire2api(), - value: self.value.wire2api(), - } - } -} - -impl Wire2Api> for *mut wire_uint_8_list { - fn wire2api(self) -> Vec { - unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -// Section: wire structs - -#[repr(C)] -#[derive(Clone)] -pub struct wire_BuyBitcoinRequest { - provider: i32, - opening_fee_params: *mut wire_OpeningFeeParams, - redirect_url: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_CheckMessageRequest { - message: *mut wire_uint_8_list, - pubkey: *mut wire_uint_8_list, - signature: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_Config { - breezserver: *mut wire_uint_8_list, - chainnotifier_url: *mut wire_uint_8_list, - mempoolspace_url: *mut wire_uint_8_list, - working_dir: *mut wire_uint_8_list, - network: i32, - payment_timeout_sec: u32, - default_lsp_id: *mut wire_uint_8_list, - api_key: *mut wire_uint_8_list, - maxfee_percent: f64, - exemptfee_msat: u64, - node_config: wire_NodeConfig, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ConfigureNodeRequest { - close_to_address: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ConnectRequest { - config: wire_Config, - seed: *mut wire_uint_8_list, - restore_only: *mut bool, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_GreenlightCredentials { - developer_key: *mut wire_uint_8_list, - developer_cert: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_GreenlightNodeConfig { - partner_credentials: *mut wire_GreenlightCredentials, - invite_code: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_metadata_filter { - ptr: *mut wire_MetadataFilter, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_payment_type_filter { - ptr: *mut i32, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ListPaymentsRequest { - filters: *mut wire_list_payment_type_filter, - metadata_filters: *mut wire_list_metadata_filter, - from_timestamp: *mut i64, - to_timestamp: *mut i64, - include_failures: *mut bool, - offset: *mut u32, - limit: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_tlv_entry { - ptr: *mut wire_TlvEntry, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlAuthRequestData { - k1: *mut wire_uint_8_list, - action: *mut wire_uint_8_list, - domain: *mut wire_uint_8_list, - url: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlPayRequest { - data: wire_LnUrlPayRequestData, - amount_msat: u64, - use_trampoline: bool, - comment: *mut wire_uint_8_list, - payment_label: *mut wire_uint_8_list, - validate_success_action_url: *mut bool, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlPayRequestData { - callback: *mut wire_uint_8_list, - min_sendable: u64, - max_sendable: u64, - metadata_str: *mut wire_uint_8_list, - comment_allowed: u16, - domain: *mut wire_uint_8_list, - allows_nostr: bool, - nostr_pubkey: *mut wire_uint_8_list, - ln_address: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlWithdrawRequest { - data: wire_LnUrlWithdrawRequestData, - amount_msat: u64, - description: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlWithdrawRequestData { - callback: *mut wire_uint_8_list, - k1: *mut wire_uint_8_list, - default_description: *mut wire_uint_8_list, - min_withdrawable: u64, - max_withdrawable: u64, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_MetadataFilter { - json_path: *mut wire_uint_8_list, - json_value: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_OpenChannelFeeRequest { - amount_msat: *mut u64, - expiry: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_OpeningFeeParams { - min_msat: u64, - proportional: u32, - valid_until: *mut wire_uint_8_list, - max_idle_time: u32, - max_client_to_self_delay: u32, - promise: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PayOnchainRequest { - recipient_address: *mut wire_uint_8_list, - prepare_res: wire_PrepareOnchainPaymentResponse, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareOnchainPaymentRequest { - amount_sat: u64, - amount_type: i32, - claim_tx_feerate: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareOnchainPaymentResponse { - fees_hash: *mut wire_uint_8_list, - fees_percentage: f64, - fees_lockup: u64, - fees_claim: u64, - sender_amount_sat: u64, - recipient_amount_sat: u64, - total_fees: u64, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareRedeemOnchainFundsRequest { - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareRefundRequest { - swap_address: *mut wire_uint_8_list, - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReceiveOnchainRequest { - opening_fee_params: *mut wire_OpeningFeeParams, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReceivePaymentRequest { - amount_msat: u64, - description: *mut wire_uint_8_list, - preimage: *mut wire_uint_8_list, - opening_fee_params: *mut wire_OpeningFeeParams, - use_description_hash: *mut bool, - expiry: *mut u32, - cltv: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_RedeemOnchainFundsRequest { - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_RefundRequest { - swap_address: *mut wire_uint_8_list, - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportPaymentFailureDetails { - payment_hash: *mut wire_uint_8_list, - comment: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReverseSwapFeesRequest { - send_amount_sat: *mut u64, - claim_tx_feerate: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendOnchainRequest { - amount_sat: u64, - onchain_recipient_address: *mut wire_uint_8_list, - pair_hash: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendPaymentRequest { - bolt11: *mut wire_uint_8_list, - use_trampoline: bool, - amount_msat: *mut u64, - label: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendSpontaneousPaymentRequest { - node_id: *mut wire_uint_8_list, - amount_msat: u64, - extra_tlvs: *mut wire_list_tlv_entry, - label: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SignMessageRequest { - message: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_StaticBackupRequest { - working_dir: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_TlvEntry { - field_number: u64, - value: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_uint_8_list { - ptr: *mut u8, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_NodeConfig { - tag: i32, - kind: *mut NodeConfigKind, -} - -#[repr(C)] -pub union NodeConfigKind { - Greenlight: *mut wire_NodeConfig_Greenlight, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_NodeConfig_Greenlight { - config: *mut wire_GreenlightNodeConfig, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportIssueRequest { - tag: i32, - kind: *mut ReportIssueRequestKind, -} - -#[repr(C)] -pub union ReportIssueRequestKind { - PaymentFailure: *mut wire_ReportIssueRequest_PaymentFailure, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportIssueRequest_PaymentFailure { - data: *mut wire_ReportPaymentFailureDetails, -} - -// Section: impl NewWithNullPtr - -pub trait NewWithNullPtr { - fn new_with_null_ptr() -> Self; -} - -impl NewWithNullPtr for *mut T { - fn new_with_null_ptr() -> Self { - std::ptr::null_mut() - } -} - -impl NewWithNullPtr for wire_BuyBitcoinRequest { - fn new_with_null_ptr() -> Self { - Self { - provider: Default::default(), - opening_fee_params: core::ptr::null_mut(), - redirect_url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_BuyBitcoinRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_CheckMessageRequest { - fn new_with_null_ptr() -> Self { - Self { - message: core::ptr::null_mut(), - pubkey: core::ptr::null_mut(), - signature: core::ptr::null_mut(), - } - } -} - -impl Default for wire_CheckMessageRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_Config { - fn new_with_null_ptr() -> Self { - Self { - breezserver: core::ptr::null_mut(), - chainnotifier_url: core::ptr::null_mut(), - mempoolspace_url: core::ptr::null_mut(), - working_dir: core::ptr::null_mut(), - network: Default::default(), - payment_timeout_sec: Default::default(), - default_lsp_id: core::ptr::null_mut(), - api_key: core::ptr::null_mut(), - maxfee_percent: Default::default(), - exemptfee_msat: Default::default(), - node_config: Default::default(), - } - } -} - -impl Default for wire_Config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ConfigureNodeRequest { - fn new_with_null_ptr() -> Self { - Self { - close_to_address: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ConfigureNodeRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ConnectRequest { - fn new_with_null_ptr() -> Self { - Self { - config: Default::default(), - seed: core::ptr::null_mut(), - restore_only: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ConnectRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_GreenlightCredentials { - fn new_with_null_ptr() -> Self { - Self { - developer_key: core::ptr::null_mut(), - developer_cert: core::ptr::null_mut(), - } - } -} - -impl Default for wire_GreenlightCredentials { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_GreenlightNodeConfig { - fn new_with_null_ptr() -> Self { - Self { - partner_credentials: core::ptr::null_mut(), - invite_code: core::ptr::null_mut(), - } - } -} - -impl Default for wire_GreenlightNodeConfig { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ListPaymentsRequest { - fn new_with_null_ptr() -> Self { - Self { - filters: core::ptr::null_mut(), - metadata_filters: core::ptr::null_mut(), - from_timestamp: core::ptr::null_mut(), - to_timestamp: core::ptr::null_mut(), - include_failures: core::ptr::null_mut(), - offset: core::ptr::null_mut(), - limit: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ListPaymentsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlAuthRequestData { - fn new_with_null_ptr() -> Self { - Self { - k1: core::ptr::null_mut(), - action: core::ptr::null_mut(), - domain: core::ptr::null_mut(), - url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlAuthRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlPayRequest { - fn new_with_null_ptr() -> Self { - Self { - data: Default::default(), - amount_msat: Default::default(), - use_trampoline: Default::default(), - comment: core::ptr::null_mut(), - payment_label: core::ptr::null_mut(), - validate_success_action_url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlPayRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlPayRequestData { - fn new_with_null_ptr() -> Self { - Self { - callback: core::ptr::null_mut(), - min_sendable: Default::default(), - max_sendable: Default::default(), - metadata_str: core::ptr::null_mut(), - comment_allowed: Default::default(), - domain: core::ptr::null_mut(), - allows_nostr: Default::default(), - nostr_pubkey: core::ptr::null_mut(), - ln_address: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlPayRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlWithdrawRequest { - fn new_with_null_ptr() -> Self { - Self { - data: Default::default(), - amount_msat: Default::default(), - description: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlWithdrawRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlWithdrawRequestData { - fn new_with_null_ptr() -> Self { - Self { - callback: core::ptr::null_mut(), - k1: core::ptr::null_mut(), - default_description: core::ptr::null_mut(), - min_withdrawable: Default::default(), - max_withdrawable: Default::default(), - } - } -} - -impl Default for wire_LnUrlWithdrawRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_MetadataFilter { - fn new_with_null_ptr() -> Self { - Self { - json_path: core::ptr::null_mut(), - json_value: core::ptr::null_mut(), - } - } -} - -impl Default for wire_MetadataFilter { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl Default for wire_NodeConfig { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_NodeConfig { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: core::ptr::null_mut(), - } - } -} - -#[no_mangle] -pub extern "C" fn inflate_NodeConfig_Greenlight() -> *mut NodeConfigKind { - support::new_leak_box_ptr(NodeConfigKind { - Greenlight: support::new_leak_box_ptr(wire_NodeConfig_Greenlight { - config: core::ptr::null_mut(), - }), - }) -} - -impl NewWithNullPtr for wire_OpenChannelFeeRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_msat: core::ptr::null_mut(), - expiry: core::ptr::null_mut(), - } - } -} - -impl Default for wire_OpenChannelFeeRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_OpeningFeeParams { - fn new_with_null_ptr() -> Self { - Self { - min_msat: Default::default(), - proportional: Default::default(), - valid_until: core::ptr::null_mut(), - max_idle_time: Default::default(), - max_client_to_self_delay: Default::default(), - promise: core::ptr::null_mut(), - } - } -} - -impl Default for wire_OpeningFeeParams { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PayOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - recipient_address: core::ptr::null_mut(), - prepare_res: Default::default(), - } - } -} - -impl Default for wire_PayOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareOnchainPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_sat: Default::default(), - amount_type: Default::default(), - claim_tx_feerate: Default::default(), - } - } -} - -impl Default for wire_PrepareOnchainPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareOnchainPaymentResponse { - fn new_with_null_ptr() -> Self { - Self { - fees_hash: core::ptr::null_mut(), - fees_percentage: Default::default(), - fees_lockup: Default::default(), - fees_claim: Default::default(), - sender_amount_sat: Default::default(), - recipient_amount_sat: Default::default(), - total_fees: Default::default(), - } - } -} - -impl Default for wire_PrepareOnchainPaymentResponse { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareRedeemOnchainFundsRequest { - fn new_with_null_ptr() -> Self { - Self { - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_PrepareRedeemOnchainFundsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareRefundRequest { - fn new_with_null_ptr() -> Self { - Self { - swap_address: core::ptr::null_mut(), - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_PrepareRefundRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReceiveOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - opening_fee_params: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReceiveOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReceivePaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_msat: Default::default(), - description: core::ptr::null_mut(), - preimage: core::ptr::null_mut(), - opening_fee_params: core::ptr::null_mut(), - use_description_hash: core::ptr::null_mut(), - expiry: core::ptr::null_mut(), - cltv: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReceivePaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_RedeemOnchainFundsRequest { - fn new_with_null_ptr() -> Self { - Self { - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_RedeemOnchainFundsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_RefundRequest { - fn new_with_null_ptr() -> Self { - Self { - swap_address: core::ptr::null_mut(), - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_RefundRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl Default for wire_ReportIssueRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReportIssueRequest { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: core::ptr::null_mut(), - } - } -} - -#[no_mangle] -pub extern "C" fn inflate_ReportIssueRequest_PaymentFailure() -> *mut ReportIssueRequestKind { - support::new_leak_box_ptr(ReportIssueRequestKind { - PaymentFailure: support::new_leak_box_ptr(wire_ReportIssueRequest_PaymentFailure { - data: core::ptr::null_mut(), - }), - }) -} - -impl NewWithNullPtr for wire_ReportPaymentFailureDetails { - fn new_with_null_ptr() -> Self { - Self { - payment_hash: core::ptr::null_mut(), - comment: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReportPaymentFailureDetails { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReverseSwapFeesRequest { - fn new_with_null_ptr() -> Self { - Self { - send_amount_sat: core::ptr::null_mut(), - claim_tx_feerate: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReverseSwapFeesRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_sat: Default::default(), - onchain_recipient_address: core::ptr::null_mut(), - pair_hash: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_SendOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - bolt11: core::ptr::null_mut(), - use_trampoline: Default::default(), - amount_msat: core::ptr::null_mut(), - label: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SendPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendSpontaneousPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - node_id: core::ptr::null_mut(), - amount_msat: Default::default(), - extra_tlvs: core::ptr::null_mut(), - label: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SendSpontaneousPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SignMessageRequest { - fn new_with_null_ptr() -> Self { - Self { - message: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SignMessageRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_StaticBackupRequest { - fn new_with_null_ptr() -> Self { - Self { - working_dir: core::ptr::null_mut(), - } - } -} - -impl Default for wire_StaticBackupRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_TlvEntry { - fn new_with_null_ptr() -> Self { - Self { - field_number: Default::default(), - value: core::ptr::null_mut(), - } - } -} - -impl Default for wire_TlvEntry { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -// Section: sync execution mode utility - -#[no_mangle] -pub extern "C" fn free_WireSyncReturn(ptr: support::WireSyncReturn) { - unsafe { - let _ = support::box_from_leak_ptr(ptr); - }; -} diff --git a/libs/sdk-core/src/bridge_generated.rs b/libs/sdk-core/src/bridge_generated.rs deleted file mode 100644 index 5d6c32529..000000000 --- a/libs/sdk-core/src/bridge_generated.rs +++ /dev/null @@ -1,2678 +0,0 @@ -#![allow( - non_camel_case_types, - unused, - clippy::redundant_closure, - clippy::useless_conversion, - clippy::unit_arg, - clippy::double_parens, - non_snake_case, - clippy::too_many_arguments -)] -// AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.6. - -use crate::binding::*; -use core::panic::UnwindSafe; -use flutter_rust_bridge::rust2dart::IntoIntoDart; -use flutter_rust_bridge::*; -use std::ffi::c_void; -use std::sync::Arc; - -// Section: imports - -use crate::breez_services::BackupFailedData; -use crate::breez_services::BreezEvent; -use crate::breez_services::CheckMessageRequest; -use crate::breez_services::CheckMessageResponse; -use crate::breez_services::InvoicePaidDetails; -use crate::breez_services::PaymentFailedData; -use crate::breez_services::SignMessageRequest; -use crate::breez_services::SignMessageResponse; -use crate::chain::RecommendedFees; -use crate::lnurl::pay::LnUrlPayResult; -use crate::lnurl::pay::LnUrlPaySuccessData; -use crate::lsp::LspInformation; -use crate::models::BackupStatus; -use crate::models::BuyBitcoinProvider; -use crate::models::BuyBitcoinRequest; -use crate::models::BuyBitcoinResponse; -use crate::models::ChannelState; -use crate::models::ClosedChannelPaymentDetails; -use crate::models::Config; -use crate::models::ConfigureNodeRequest; -use crate::models::ConnectRequest; -use crate::models::EnvironmentType; -use crate::models::GreenlightCredentials; -use crate::models::GreenlightDeviceCredentials; -use crate::models::GreenlightNodeConfig; -use crate::models::HealthCheckStatus; -use crate::models::ListPaymentsRequest; -use crate::models::LnPaymentDetails; -use crate::models::LogEntry; -use crate::models::MaxReverseSwapAmountResponse; -use crate::models::MetadataFilter; -use crate::models::NodeConfig; -use crate::models::NodeCredentials; -use crate::models::NodeState; -use crate::models::OnchainPaymentLimitsResponse; -use crate::models::OpenChannelFeeRequest; -use crate::models::OpenChannelFeeResponse; -use crate::models::OpeningFeeParams; -use crate::models::OpeningFeeParamsMenu; -use crate::models::PayOnchainRequest; -use crate::models::PayOnchainResponse; -use crate::models::Payment; -use crate::models::PaymentDetails; -use crate::models::PaymentStatus; -use crate::models::PaymentType; -use crate::models::PaymentTypeFilter; -use crate::models::PrepareOnchainPaymentRequest; -use crate::models::PrepareOnchainPaymentResponse; -use crate::models::PrepareRedeemOnchainFundsRequest; -use crate::models::PrepareRedeemOnchainFundsResponse; -use crate::models::PrepareRefundRequest; -use crate::models::PrepareRefundResponse; -use crate::models::ReceiveOnchainRequest; -use crate::models::ReceivePaymentRequest; -use crate::models::ReceivePaymentResponse; -use crate::models::RedeemOnchainFundsRequest; -use crate::models::RedeemOnchainFundsResponse; -use crate::models::RefundRequest; -use crate::models::RefundResponse; -use crate::models::ReportIssueRequest; -use crate::models::ReportPaymentFailureDetails; -use crate::models::ReverseSwapFeesRequest; -use crate::models::ReverseSwapInfo; -use crate::models::ReverseSwapPairInfo; -use crate::models::ReverseSwapStatus; -use crate::models::SendOnchainRequest; -use crate::models::SendOnchainResponse; -use crate::models::SendPaymentRequest; -use crate::models::SendPaymentResponse; -use crate::models::SendSpontaneousPaymentRequest; -use crate::models::ServiceHealthCheckResponse; -use crate::models::StaticBackupRequest; -use crate::models::StaticBackupResponse; -use crate::models::SwapAmountType; -use crate::models::SwapInfo; -use crate::models::SwapStatus; -use crate::models::TlvEntry; -use crate::models::UnspentTransactionOutput; - -// Section: wire functions - -fn wire_connect_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "connect", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| connect(api_req) - }, - ) -} -fn wire_is_initialized_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, bool, _>( - WrapInfo { - debug_name: "is_initialized", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| Result::<_, ()>::Ok(is_initialized()), - ) -} -fn wire_sync_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "sync", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| sync(), - ) -} -fn wire_node_credentials_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "node_credentials", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| node_credentials(), - ) -} -fn wire_node_info_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, NodeState, _>( - WrapInfo { - debug_name: "node_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| node_info(), - ) -} -fn wire_configure_node_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "configure_node", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| configure_node(api_req) - }, - ) -} -fn wire_disconnect_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "disconnect", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| disconnect(), - ) -} -fn wire_sign_message_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SignMessageResponse, _>( - WrapInfo { - debug_name: "sign_message", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| sign_message(api_req) - }, - ) -} -fn wire_check_message_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, CheckMessageResponse, _>( - WrapInfo { - debug_name: "check_message", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| check_message(api_req) - }, - ) -} -fn wire_mnemonic_to_seed_impl(port_: MessagePort, phrase: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "mnemonic_to_seed", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_phrase = phrase.wire2api(); - move |task_callback| mnemonic_to_seed(api_phrase) - }, - ) -} -fn wire_default_config_impl( - port_: MessagePort, - env_type: impl Wire2Api + UnwindSafe, - api_key: impl Wire2Api + UnwindSafe, - node_config: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Config, _>( - WrapInfo { - debug_name: "default_config", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_env_type = env_type.wire2api(); - let api_api_key = api_key.wire2api(); - let api_node_config = node_config.wire2api(); - move |task_callback| { - Result::<_, ()>::Ok(default_config(api_env_type, api_api_key, api_node_config)) - } - }, - ) -} -fn wire_static_backup_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, StaticBackupResponse, _>( - WrapInfo { - debug_name: "static_backup", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| static_backup(api_req) - }, - ) -} -fn wire_service_health_check_impl(port_: MessagePort, api_key: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ServiceHealthCheckResponse, _>( - WrapInfo { - debug_name: "service_health_check", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_api_key = api_key.wire2api(); - move |task_callback| service_health_check(api_api_key) - }, - ) -} -fn wire_breez_events_stream_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "breez_events_stream", - port: Some(port_), - mode: FfiCallMode::Stream, - }, - move || { - move |task_callback| breez_events_stream(task_callback.stream_sink::<_, BreezEvent>()) - }, - ) -} -fn wire_breez_log_stream_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "breez_log_stream", - port: Some(port_), - mode: FfiCallMode::Stream, - }, - move || move |task_callback| breez_log_stream(task_callback.stream_sink::<_, LogEntry>()), - ) -} -fn wire_list_lsps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_lsps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_lsps(), - ) -} -fn wire_connect_lsp_impl(port_: MessagePort, lsp_id: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "connect_lsp", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_lsp_id = lsp_id.wire2api(); - move |task_callback| connect_lsp(api_lsp_id) - }, - ) -} -fn wire_lsp_id_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "lsp_id", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| lsp_id(), - ) -} -fn wire_fetch_lsp_info_impl(port_: MessagePort, id: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "fetch_lsp_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_id = id.wire2api(); - move |task_callback| fetch_lsp_info(api_id) - }, - ) -} -fn wire_lsp_info_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LspInformation, _>( - WrapInfo { - debug_name: "lsp_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| lsp_info(), - ) -} -fn wire_close_lsp_channels_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "close_lsp_channels", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| close_lsp_channels(), - ) -} -fn wire_register_webhook_impl(port_: MessagePort, webhook_url: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "register_webhook", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_webhook_url = webhook_url.wire2api(); - move |task_callback| register_webhook(api_webhook_url) - }, - ) -} -fn wire_unregister_webhook_impl( - port_: MessagePort, - webhook_url: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "unregister_webhook", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_webhook_url = webhook_url.wire2api(); - move |task_callback| unregister_webhook(api_webhook_url) - }, - ) -} -fn wire_backup_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "backup", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| backup(), - ) -} -fn wire_backup_status_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BackupStatus, _>( - WrapInfo { - debug_name: "backup_status", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| backup_status(), - ) -} -fn wire_parse_invoice_impl(port_: MessagePort, invoice: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LNInvoice, _>( - WrapInfo { - debug_name: "parse_invoice", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_invoice = invoice.wire2api(); - move |task_callback| parse_invoice(api_invoice) - }, - ) -} -fn wire_parse_input_impl(port_: MessagePort, input: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_InputType, _>( - WrapInfo { - debug_name: "parse_input", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_input = input.wire2api(); - move |task_callback| parse_input(api_input) - }, - ) -} -fn wire_list_payments_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_payments", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| list_payments(api_req) - }, - ) -} -fn wire_payment_by_hash_impl(port_: MessagePort, hash: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "payment_by_hash", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_hash = hash.wire2api(); - move |task_callback| payment_by_hash(api_hash) - }, - ) -} -fn wire_set_payment_metadata_impl( - port_: MessagePort, - hash: impl Wire2Api + UnwindSafe, - metadata: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "set_payment_metadata", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_hash = hash.wire2api(); - let api_metadata = metadata.wire2api(); - move |task_callback| set_payment_metadata(api_hash, api_metadata) - }, - ) -} -fn wire_send_payment_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>( - WrapInfo { - debug_name: "send_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_payment(api_req) - }, - ) -} -fn wire_send_spontaneous_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>( - WrapInfo { - debug_name: "send_spontaneous_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_spontaneous_payment(api_req) - }, - ) -} -fn wire_receive_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReceivePaymentResponse, _>( - WrapInfo { - debug_name: "receive_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| receive_payment(api_req) - }, - ) -} -fn wire_lnurl_pay_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LnUrlPayResult, _>( - WrapInfo { - debug_name: "lnurl_pay", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| lnurl_pay(api_req) - }, - ) -} -fn wire_lnurl_withdraw_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlWithdrawResult, _>( - WrapInfo { - debug_name: "lnurl_withdraw", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| lnurl_withdraw(api_req) - }, - ) -} -fn wire_lnurl_auth_impl( - port_: MessagePort, - req_data: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlCallbackStatus, _>( - WrapInfo { - debug_name: "lnurl_auth", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req_data = req_data.wire2api(); - move |task_callback| lnurl_auth(api_req_data) - }, - ) -} -fn wire_report_issue_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "report_issue", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| report_issue(api_req) - }, - ) -} -fn wire_fetch_fiat_rates_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "fetch_fiat_rates", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| fetch_fiat_rates(), - ) -} -fn wire_list_fiat_currencies_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_fiat_currencies", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_fiat_currencies(), - ) -} -fn wire_max_reverse_swap_amount_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, MaxReverseSwapAmountResponse, _>( - WrapInfo { - debug_name: "max_reverse_swap_amount", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| max_reverse_swap_amount(), - ) -} -fn wire_send_onchain_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendOnchainResponse, _>( - WrapInfo { - debug_name: "send_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_onchain(api_req) - }, - ) -} -fn wire_pay_onchain_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PayOnchainResponse, _>( - WrapInfo { - debug_name: "pay_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| pay_onchain(api_req) - }, - ) -} -fn wire_receive_onchain_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SwapInfo, _>( - WrapInfo { - debug_name: "receive_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| receive_onchain(api_req) - }, - ) -} -fn wire_buy_bitcoin_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BuyBitcoinResponse, _>( - WrapInfo { - debug_name: "buy_bitcoin", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| buy_bitcoin(api_req) - }, - ) -} -fn wire_redeem_onchain_funds_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RedeemOnchainFundsResponse, _>( - WrapInfo { - debug_name: "redeem_onchain_funds", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| redeem_onchain_funds(api_req) - }, - ) -} -fn wire_prepare_redeem_onchain_funds_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRedeemOnchainFundsResponse, _>( - WrapInfo { - debug_name: "prepare_redeem_onchain_funds", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_redeem_onchain_funds(api_req) - }, - ) -} -fn wire_list_refundables_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_refundables", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_refundables(), - ) -} -fn wire_prepare_refund_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRefundResponse, _>( - WrapInfo { - debug_name: "prepare_refund", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_refund(api_req) - }, - ) -} -fn wire_refund_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RefundResponse, _>( - WrapInfo { - debug_name: "refund", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| refund(api_req) - }, - ) -} -fn wire_rescan_swaps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "rescan_swaps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| rescan_swaps(), - ) -} -fn wire_redeem_swap_impl(port_: MessagePort, swap_address: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "redeem_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_swap_address = swap_address.wire2api(); - move |task_callback| redeem_swap(api_swap_address) - }, - ) -} -fn wire_in_progress_swap_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "in_progress_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_swap(), - ) -} -fn wire_in_progress_reverse_swaps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "in_progress_reverse_swaps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_reverse_swaps(), - ) -} -fn wire_claim_reverse_swap_impl( - port_: MessagePort, - lockup_address: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "claim_reverse_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_lockup_address = lockup_address.wire2api(); - move |task_callback| claim_reverse_swap(api_lockup_address) - }, - ) -} -fn wire_open_channel_fee_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OpenChannelFeeResponse, _>( - WrapInfo { - debug_name: "open_channel_fee", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| open_channel_fee(api_req) - }, - ) -} -fn wire_fetch_reverse_swap_fees_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReverseSwapPairInfo, _>( - WrapInfo { - debug_name: "fetch_reverse_swap_fees", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| fetch_reverse_swap_fees(api_req) - }, - ) -} -fn wire_onchain_payment_limits_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OnchainPaymentLimitsResponse, _>( - WrapInfo { - debug_name: "onchain_payment_limits", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| onchain_payment_limits(), - ) -} -fn wire_prepare_onchain_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareOnchainPaymentResponse, _>( - WrapInfo { - debug_name: "prepare_onchain_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_onchain_payment(api_req) - }, - ) -} -fn wire_in_progress_onchain_payments_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "in_progress_onchain_payments", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_onchain_payments(), - ) -} -fn wire_recommended_fees_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RecommendedFees, _>( - WrapInfo { - debug_name: "recommended_fees", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| recommended_fees(), - ) -} -fn wire_execute_command_impl(port_: MessagePort, command: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>( - WrapInfo { - debug_name: "execute_command", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_command = command.wire2api(); - move |task_callback| execute_command(api_command) - }, - ) -} -fn wire_generate_diagnostic_data_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>( - WrapInfo { - debug_name: "generate_diagnostic_data", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| generate_diagnostic_data(), - ) -} -// Section: wrapper structs - -#[derive(Clone)] -pub struct mirror_AesSuccessActionDataDecrypted(AesSuccessActionDataDecrypted); - -#[derive(Clone)] -pub struct mirror_AesSuccessActionDataResult(AesSuccessActionDataResult); - -#[derive(Clone)] -pub struct mirror_BitcoinAddressData(BitcoinAddressData); - -#[derive(Clone)] -pub struct mirror_CurrencyInfo(CurrencyInfo); - -#[derive(Clone)] -pub struct mirror_FiatCurrency(FiatCurrency); - -#[derive(Clone)] -pub struct mirror_InputType(InputType); - -#[derive(Clone)] -pub struct mirror_LNInvoice(LNInvoice); - -#[derive(Clone)] -pub struct mirror_LnUrlAuthRequestData(LnUrlAuthRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlCallbackStatus(LnUrlCallbackStatus); - -#[derive(Clone)] -pub struct mirror_LnUrlErrorData(LnUrlErrorData); - -#[derive(Clone)] -pub struct mirror_LnUrlPayErrorData(LnUrlPayErrorData); - -#[derive(Clone)] -pub struct mirror_LnUrlPayRequestData(LnUrlPayRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawRequestData(LnUrlWithdrawRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawResult(LnUrlWithdrawResult); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawSuccessData(LnUrlWithdrawSuccessData); - -#[derive(Clone)] -pub struct mirror_LocaleOverrides(LocaleOverrides); - -#[derive(Clone)] -pub struct mirror_LocalizedName(LocalizedName); - -#[derive(Clone)] -pub struct mirror_MessageSuccessActionData(MessageSuccessActionData); - -#[derive(Clone)] -pub struct mirror_Network(Network); - -#[derive(Clone)] -pub struct mirror_Rate(Rate); - -#[derive(Clone)] -pub struct mirror_RouteHint(RouteHint); - -#[derive(Clone)] -pub struct mirror_RouteHintHop(RouteHintHop); - -#[derive(Clone)] -pub struct mirror_SuccessActionProcessed(SuccessActionProcessed); - -#[derive(Clone)] -pub struct mirror_Symbol(Symbol); - -#[derive(Clone)] -pub struct mirror_UrlSuccessActionData(UrlSuccessActionData); - -// Section: static checks - -const _: fn() = || { - { - let AesSuccessActionDataDecrypted = None::.unwrap(); - let _: String = AesSuccessActionDataDecrypted.description; - let _: String = AesSuccessActionDataDecrypted.plaintext; - } - match None::.unwrap() { - AesSuccessActionDataResult::Decrypted { data } => { - let _: AesSuccessActionDataDecrypted = data; - } - AesSuccessActionDataResult::ErrorStatus { reason } => { - let _: String = reason; - } - } - { - let BitcoinAddressData = None::.unwrap(); - let _: String = BitcoinAddressData.address; - let _: Network = BitcoinAddressData.network; - let _: Option = BitcoinAddressData.amount_sat; - let _: Option = BitcoinAddressData.label; - let _: Option = BitcoinAddressData.message; - } - { - let CurrencyInfo = None::.unwrap(); - let _: String = CurrencyInfo.name; - let _: u32 = CurrencyInfo.fraction_size; - let _: Option = CurrencyInfo.spacing; - let _: Option = CurrencyInfo.symbol; - let _: Option = CurrencyInfo.uniq_symbol; - let _: Vec = CurrencyInfo.localized_name; - let _: Vec = CurrencyInfo.locale_overrides; - } - { - let FiatCurrency = None::.unwrap(); - let _: String = FiatCurrency.id; - let _: CurrencyInfo = FiatCurrency.info; - } - match None::.unwrap() { - InputType::BitcoinAddress { address } => { - let _: BitcoinAddressData = address; - } - InputType::Bolt11 { invoice } => { - let _: LNInvoice = invoice; - } - InputType::NodeId { node_id } => { - let _: String = node_id; - } - InputType::Url { url } => { - let _: String = url; - } - InputType::LnUrlPay { data } => { - let _: LnUrlPayRequestData = data; - } - InputType::LnUrlWithdraw { data } => { - let _: LnUrlWithdrawRequestData = data; - } - InputType::LnUrlAuth { data } => { - let _: LnUrlAuthRequestData = data; - } - InputType::LnUrlError { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LNInvoice = None::.unwrap(); - let _: String = LNInvoice.bolt11; - let _: Network = LNInvoice.network; - let _: String = LNInvoice.payee_pubkey; - let _: String = LNInvoice.payment_hash; - let _: Option = LNInvoice.description; - let _: Option = LNInvoice.description_hash; - let _: Option = LNInvoice.amount_msat; - let _: u64 = LNInvoice.timestamp; - let _: u64 = LNInvoice.expiry; - let _: Vec = LNInvoice.routing_hints; - let _: Vec = LNInvoice.payment_secret; - let _: u64 = LNInvoice.min_final_cltv_expiry_delta; - } - { - let LnUrlAuthRequestData = None::.unwrap(); - let _: String = LnUrlAuthRequestData.k1; - let _: Option = LnUrlAuthRequestData.action; - let _: String = LnUrlAuthRequestData.domain; - let _: String = LnUrlAuthRequestData.url; - } - match None::.unwrap() { - LnUrlCallbackStatus::Ok => {} - LnUrlCallbackStatus::ErrorStatus { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LnUrlErrorData = None::.unwrap(); - let _: String = LnUrlErrorData.reason; - } - { - let LnUrlPayErrorData = None::.unwrap(); - let _: String = LnUrlPayErrorData.payment_hash; - let _: String = LnUrlPayErrorData.reason; - } - { - let LnUrlPayRequestData = None::.unwrap(); - let _: String = LnUrlPayRequestData.callback; - let _: u64 = LnUrlPayRequestData.min_sendable; - let _: u64 = LnUrlPayRequestData.max_sendable; - let _: String = LnUrlPayRequestData.metadata_str; - let _: u16 = LnUrlPayRequestData.comment_allowed; - let _: String = LnUrlPayRequestData.domain; - let _: bool = LnUrlPayRequestData.allows_nostr; - let _: Option = LnUrlPayRequestData.nostr_pubkey; - let _: Option = LnUrlPayRequestData.ln_address; - } - { - let LnUrlWithdrawRequestData = None::.unwrap(); - let _: String = LnUrlWithdrawRequestData.callback; - let _: String = LnUrlWithdrawRequestData.k1; - let _: String = LnUrlWithdrawRequestData.default_description; - let _: u64 = LnUrlWithdrawRequestData.min_withdrawable; - let _: u64 = LnUrlWithdrawRequestData.max_withdrawable; - } - match None::.unwrap() { - LnUrlWithdrawResult::Ok { data } => { - let _: LnUrlWithdrawSuccessData = data; - } - LnUrlWithdrawResult::Timeout { data } => { - let _: LnUrlWithdrawSuccessData = data; - } - LnUrlWithdrawResult::ErrorStatus { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LnUrlWithdrawSuccessData = None::.unwrap(); - let _: LNInvoice = LnUrlWithdrawSuccessData.invoice; - } - { - let LocaleOverrides = None::.unwrap(); - let _: String = LocaleOverrides.locale; - let _: Option = LocaleOverrides.spacing; - let _: Symbol = LocaleOverrides.symbol; - } - { - let LocalizedName = None::.unwrap(); - let _: String = LocalizedName.locale; - let _: String = LocalizedName.name; - } - { - let MessageSuccessActionData = None::.unwrap(); - let _: String = MessageSuccessActionData.message; - } - match None::.unwrap() { - Network::Bitcoin => {} - Network::Testnet => {} - Network::Signet => {} - Network::Regtest => {} - } - { - let Rate = None::.unwrap(); - let _: String = Rate.coin; - let _: f64 = Rate.value; - } - { - let RouteHint = None::.unwrap(); - let _: Vec = RouteHint.hops; - } - { - let RouteHintHop = None::.unwrap(); - let _: String = RouteHintHop.src_node_id; - let _: String = RouteHintHop.short_channel_id; - let _: u32 = RouteHintHop.fees_base_msat; - let _: u32 = RouteHintHop.fees_proportional_millionths; - let _: u64 = RouteHintHop.cltv_expiry_delta; - let _: Option = RouteHintHop.htlc_minimum_msat; - let _: Option = RouteHintHop.htlc_maximum_msat; - } - match None::.unwrap() { - SuccessActionProcessed::Aes { result } => { - let _: AesSuccessActionDataResult = result; - } - SuccessActionProcessed::Message { data } => { - let _: MessageSuccessActionData = data; - } - SuccessActionProcessed::Url { data } => { - let _: UrlSuccessActionData = data; - } - } - { - let Symbol = None::.unwrap(); - let _: Option = Symbol.grapheme; - let _: Option = Symbol.template; - let _: Option = Symbol.rtl; - let _: Option = Symbol.position; - } - { - let UrlSuccessActionData = None::.unwrap(); - let _: String = UrlSuccessActionData.description; - let _: String = UrlSuccessActionData.url; - } -}; -// Section: allocate functions - -// Section: related functions - -// Section: impl Wire2Api - -pub trait Wire2Api { - fn wire2api(self) -> T; -} - -impl Wire2Api> for *mut S -where - *mut S: Wire2Api, -{ - fn wire2api(self) -> Option { - (!self.is_null()).then(|| self.wire2api()) - } -} - -impl Wire2Api for bool { - fn wire2api(self) -> bool { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> BuyBitcoinProvider { - match self { - 0 => BuyBitcoinProvider::Moonpay, - _ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> EnvironmentType { - match self { - 0 => EnvironmentType::Production, - 1 => EnvironmentType::Staging, - _ => unreachable!("Invalid variant for EnvironmentType: {}", self), - } - } -} -impl Wire2Api for f64 { - fn wire2api(self) -> f64 { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> i32 { - self - } -} -impl Wire2Api for i64 { - fn wire2api(self) -> i64 { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> Network { - match self { - 0 => Network::Bitcoin, - 1 => Network::Testnet, - 2 => Network::Signet, - 3 => Network::Regtest, - _ => unreachable!("Invalid variant for Network: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> PaymentTypeFilter { - match self { - 0 => PaymentTypeFilter::Sent, - 1 => PaymentTypeFilter::Received, - 2 => PaymentTypeFilter::ClosedChannel, - _ => unreachable!("Invalid variant for PaymentTypeFilter: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> SwapAmountType { - match self { - 0 => SwapAmountType::Send, - 1 => SwapAmountType::Receive, - _ => unreachable!("Invalid variant for SwapAmountType: {}", self), - } - } -} - -impl Wire2Api for u16 { - fn wire2api(self) -> u16 { - self - } -} -impl Wire2Api for u32 { - fn wire2api(self) -> u32 { - self - } -} -impl Wire2Api for u64 { - fn wire2api(self) -> u64 { - self - } -} -impl Wire2Api for u8 { - fn wire2api(self) -> u8 { - self - } -} - -// Section: impl IntoDart - -impl support::IntoDart for mirror_AesSuccessActionDataDecrypted { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.description.into_into_dart().into_dart(), - self.0.plaintext.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataDecrypted {} -impl rust2dart::IntoIntoDart - for AesSuccessActionDataDecrypted -{ - fn into_into_dart(self) -> mirror_AesSuccessActionDataDecrypted { - mirror_AesSuccessActionDataDecrypted(self) - } -} - -impl support::IntoDart for mirror_AesSuccessActionDataResult { - fn into_dart(self) -> support::DartAbi { - match self.0 { - AesSuccessActionDataResult::Decrypted { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - AesSuccessActionDataResult::ErrorStatus { reason } => { - vec![1.into_dart(), reason.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataResult {} -impl rust2dart::IntoIntoDart for AesSuccessActionDataResult { - fn into_into_dart(self) -> mirror_AesSuccessActionDataResult { - mirror_AesSuccessActionDataResult(self) - } -} - -impl support::IntoDart for BackupFailedData { - fn into_dart(self) -> support::DartAbi { - vec![self.error.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for BackupFailedData {} -impl rust2dart::IntoIntoDart for BackupFailedData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for BackupStatus { - fn into_dart(self) -> support::DartAbi { - vec![ - self.backed_up.into_into_dart().into_dart(), - self.last_backup_time.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BackupStatus {} -impl rust2dart::IntoIntoDart for BackupStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_BitcoinAddressData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.address.into_into_dart().into_dart(), - self.0.network.into_into_dart().into_dart(), - self.0.amount_sat.into_dart(), - self.0.label.into_dart(), - self.0.message.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_BitcoinAddressData {} -impl rust2dart::IntoIntoDart for BitcoinAddressData { - fn into_into_dart(self) -> mirror_BitcoinAddressData { - mirror_BitcoinAddressData(self) - } -} - -impl support::IntoDart for BreezEvent { - fn into_dart(self) -> support::DartAbi { - match self { - Self::NewBlock { block } => vec![0.into_dart(), block.into_into_dart().into_dart()], - Self::InvoicePaid { details } => { - vec![1.into_dart(), details.into_into_dart().into_dart()] - } - Self::Synced => vec![2.into_dart()], - Self::PaymentSucceed { details } => { - vec![3.into_dart(), details.into_into_dart().into_dart()] - } - Self::PaymentFailed { details } => { - vec![4.into_dart(), details.into_into_dart().into_dart()] - } - Self::BackupStarted => vec![5.into_dart()], - Self::BackupSucceeded => vec![6.into_dart()], - Self::BackupFailed { details } => { - vec![7.into_dart(), details.into_into_dart().into_dart()] - } - Self::ReverseSwapUpdated { details } => { - vec![8.into_dart(), details.into_into_dart().into_dart()] - } - Self::SwapUpdated { details } => { - vec![9.into_dart(), details.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BreezEvent {} -impl rust2dart::IntoIntoDart for BreezEvent { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for BuyBitcoinResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.url.into_into_dart().into_dart(), - self.opening_fee_params.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BuyBitcoinResponse {} -impl rust2dart::IntoIntoDart for BuyBitcoinResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ChannelState { - fn into_dart(self) -> support::DartAbi { - match self { - Self::PendingOpen => 0, - Self::Opened => 1, - Self::PendingClose => 2, - Self::Closed => 3, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ChannelState {} -impl rust2dart::IntoIntoDart for ChannelState { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for CheckMessageResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.is_valid.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for CheckMessageResponse {} -impl rust2dart::IntoIntoDart for CheckMessageResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ClosedChannelPaymentDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.state.into_into_dart().into_dart(), - self.funding_txid.into_into_dart().into_dart(), - self.short_channel_id.into_dart(), - self.closing_txid.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ClosedChannelPaymentDetails {} -impl rust2dart::IntoIntoDart for ClosedChannelPaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for Config { - fn into_dart(self) -> support::DartAbi { - vec![ - self.breezserver.into_into_dart().into_dart(), - self.chainnotifier_url.into_into_dart().into_dart(), - self.mempoolspace_url.into_dart(), - self.working_dir.into_into_dart().into_dart(), - self.network.into_into_dart().into_dart(), - self.payment_timeout_sec.into_into_dart().into_dart(), - self.default_lsp_id.into_dart(), - self.api_key.into_dart(), - self.maxfee_percent.into_into_dart().into_dart(), - self.exemptfee_msat.into_into_dart().into_dart(), - self.node_config.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for Config {} -impl rust2dart::IntoIntoDart for Config { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_CurrencyInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.name.into_into_dart().into_dart(), - self.0.fraction_size.into_into_dart().into_dart(), - self.0.spacing.into_dart(), - self.0.symbol.map(|v| mirror_Symbol(v)).into_dart(), - self.0.uniq_symbol.map(|v| mirror_Symbol(v)).into_dart(), - self.0.localized_name.into_into_dart().into_dart(), - self.0.locale_overrides.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_CurrencyInfo {} -impl rust2dart::IntoIntoDart for CurrencyInfo { - fn into_into_dart(self) -> mirror_CurrencyInfo { - mirror_CurrencyInfo(self) - } -} - -impl support::IntoDart for mirror_FiatCurrency { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.id.into_into_dart().into_dart(), - self.0.info.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_FiatCurrency {} -impl rust2dart::IntoIntoDart for FiatCurrency { - fn into_into_dart(self) -> mirror_FiatCurrency { - mirror_FiatCurrency(self) - } -} - -impl support::IntoDart for GreenlightCredentials { - fn into_dart(self) -> support::DartAbi { - vec![ - self.developer_key.into_into_dart().into_dart(), - self.developer_cert.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightCredentials {} -impl rust2dart::IntoIntoDart for GreenlightCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for GreenlightDeviceCredentials { - fn into_dart(self) -> support::DartAbi { - vec![self.device.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightDeviceCredentials {} -impl rust2dart::IntoIntoDart for GreenlightDeviceCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for GreenlightNodeConfig { - fn into_dart(self) -> support::DartAbi { - vec![ - self.partner_credentials.into_dart(), - self.invite_code.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightNodeConfig {} -impl rust2dart::IntoIntoDart for GreenlightNodeConfig { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for HealthCheckStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Operational => 0, - Self::Maintenance => 1, - Self::ServiceDisruption => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for HealthCheckStatus {} -impl rust2dart::IntoIntoDart for HealthCheckStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_InputType { - fn into_dart(self) -> support::DartAbi { - match self.0 { - InputType::BitcoinAddress { address } => { - vec![0.into_dart(), address.into_into_dart().into_dart()] - } - InputType::Bolt11 { invoice } => { - vec![1.into_dart(), invoice.into_into_dart().into_dart()] - } - InputType::NodeId { node_id } => { - vec![2.into_dart(), node_id.into_into_dart().into_dart()] - } - InputType::Url { url } => vec![3.into_dart(), url.into_into_dart().into_dart()], - InputType::LnUrlPay { data } => vec![4.into_dart(), data.into_into_dart().into_dart()], - InputType::LnUrlWithdraw { data } => { - vec![5.into_dart(), data.into_into_dart().into_dart()] - } - InputType::LnUrlAuth { data } => vec![6.into_dart(), data.into_into_dart().into_dart()], - InputType::LnUrlError { data } => { - vec![7.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_InputType {} -impl rust2dart::IntoIntoDart for InputType { - fn into_into_dart(self) -> mirror_InputType { - mirror_InputType(self) - } -} - -impl support::IntoDart for InvoicePaidDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment_hash.into_into_dart().into_dart(), - self.bolt11.into_into_dart().into_dart(), - self.payment.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for InvoicePaidDetails {} -impl rust2dart::IntoIntoDart for InvoicePaidDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LNInvoice { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.bolt11.into_into_dart().into_dart(), - self.0.network.into_into_dart().into_dart(), - self.0.payee_pubkey.into_into_dart().into_dart(), - self.0.payment_hash.into_into_dart().into_dart(), - self.0.description.into_dart(), - self.0.description_hash.into_dart(), - self.0.amount_msat.into_dart(), - self.0.timestamp.into_into_dart().into_dart(), - self.0.expiry.into_into_dart().into_dart(), - self.0.routing_hints.into_into_dart().into_dart(), - self.0.payment_secret.into_into_dart().into_dart(), - self.0 - .min_final_cltv_expiry_delta - .into_into_dart() - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LNInvoice {} -impl rust2dart::IntoIntoDart for LNInvoice { - fn into_into_dart(self) -> mirror_LNInvoice { - mirror_LNInvoice(self) - } -} - -impl support::IntoDart for LnPaymentDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment_hash.into_into_dart().into_dart(), - self.label.into_into_dart().into_dart(), - self.destination_pubkey.into_into_dart().into_dart(), - self.payment_preimage.into_into_dart().into_dart(), - self.keysend.into_into_dart().into_dart(), - self.bolt11.into_into_dart().into_dart(), - self.open_channel_bolt11.into_dart(), - self.lnurl_success_action - .map(|v| mirror_SuccessActionProcessed(v)) - .into_dart(), - self.lnurl_pay_domain.into_dart(), - self.lnurl_pay_comment.into_dart(), - self.ln_address.into_dart(), - self.lnurl_metadata.into_dart(), - self.lnurl_withdraw_endpoint.into_dart(), - self.swap_info.into_dart(), - self.reverse_swap_info.into_dart(), - self.pending_expiration_block.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnPaymentDetails {} -impl rust2dart::IntoIntoDart for LnPaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LnUrlAuthRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.k1.into_into_dart().into_dart(), - self.0.action.into_dart(), - self.0.domain.into_into_dart().into_dart(), - self.0.url.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlAuthRequestData {} -impl rust2dart::IntoIntoDart for LnUrlAuthRequestData { - fn into_into_dart(self) -> mirror_LnUrlAuthRequestData { - mirror_LnUrlAuthRequestData(self) - } -} - -impl support::IntoDart for mirror_LnUrlCallbackStatus { - fn into_dart(self) -> support::DartAbi { - match self.0 { - LnUrlCallbackStatus::Ok => vec![0.into_dart()], - LnUrlCallbackStatus::ErrorStatus { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlCallbackStatus {} -impl rust2dart::IntoIntoDart for LnUrlCallbackStatus { - fn into_into_dart(self) -> mirror_LnUrlCallbackStatus { - mirror_LnUrlCallbackStatus(self) - } -} - -impl support::IntoDart for mirror_LnUrlErrorData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.reason.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlErrorData {} -impl rust2dart::IntoIntoDart for LnUrlErrorData { - fn into_into_dart(self) -> mirror_LnUrlErrorData { - mirror_LnUrlErrorData(self) - } -} - -impl support::IntoDart for mirror_LnUrlPayErrorData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.payment_hash.into_into_dart().into_dart(), - self.0.reason.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlPayErrorData {} -impl rust2dart::IntoIntoDart for LnUrlPayErrorData { - fn into_into_dart(self) -> mirror_LnUrlPayErrorData { - mirror_LnUrlPayErrorData(self) - } -} - -impl support::IntoDart for mirror_LnUrlPayRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.callback.into_into_dart().into_dart(), - self.0.min_sendable.into_into_dart().into_dart(), - self.0.max_sendable.into_into_dart().into_dart(), - self.0.metadata_str.into_into_dart().into_dart(), - self.0.comment_allowed.into_into_dart().into_dart(), - self.0.domain.into_into_dart().into_dart(), - self.0.allows_nostr.into_into_dart().into_dart(), - self.0.nostr_pubkey.into_dart(), - self.0.ln_address.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlPayRequestData {} -impl rust2dart::IntoIntoDart for LnUrlPayRequestData { - fn into_into_dart(self) -> mirror_LnUrlPayRequestData { - mirror_LnUrlPayRequestData(self) - } -} - -impl support::IntoDart for LnUrlPayResult { - fn into_dart(self) -> support::DartAbi { - match self { - Self::EndpointSuccess { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - Self::EndpointError { data } => vec![1.into_dart(), data.into_into_dart().into_dart()], - Self::PayError { data } => vec![2.into_dart(), data.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnUrlPayResult {} -impl rust2dart::IntoIntoDart for LnUrlPayResult { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for LnUrlPaySuccessData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment.into_into_dart().into_dart(), - self.success_action - .map(|v| mirror_SuccessActionProcessed(v)) - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnUrlPaySuccessData {} -impl rust2dart::IntoIntoDart for LnUrlPaySuccessData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.callback.into_into_dart().into_dart(), - self.0.k1.into_into_dart().into_dart(), - self.0.default_description.into_into_dart().into_dart(), - self.0.min_withdrawable.into_into_dart().into_dart(), - self.0.max_withdrawable.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawRequestData {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawRequestData { - fn into_into_dart(self) -> mirror_LnUrlWithdrawRequestData { - mirror_LnUrlWithdrawRequestData(self) - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawResult { - fn into_dart(self) -> support::DartAbi { - match self.0 { - LnUrlWithdrawResult::Ok { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - LnUrlWithdrawResult::Timeout { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - LnUrlWithdrawResult::ErrorStatus { data } => { - vec![2.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawResult {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawResult { - fn into_into_dart(self) -> mirror_LnUrlWithdrawResult { - mirror_LnUrlWithdrawResult(self) - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawSuccessData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.invoice.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawSuccessData {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawSuccessData { - fn into_into_dart(self) -> mirror_LnUrlWithdrawSuccessData { - mirror_LnUrlWithdrawSuccessData(self) - } -} - -impl support::IntoDart for mirror_LocaleOverrides { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.locale.into_into_dart().into_dart(), - self.0.spacing.into_dart(), - self.0.symbol.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LocaleOverrides {} -impl rust2dart::IntoIntoDart for LocaleOverrides { - fn into_into_dart(self) -> mirror_LocaleOverrides { - mirror_LocaleOverrides(self) - } -} - -impl support::IntoDart for mirror_LocalizedName { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.locale.into_into_dart().into_dart(), - self.0.name.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LocalizedName {} -impl rust2dart::IntoIntoDart for LocalizedName { - fn into_into_dart(self) -> mirror_LocalizedName { - mirror_LocalizedName(self) - } -} - -impl support::IntoDart for LogEntry { - fn into_dart(self) -> support::DartAbi { - vec![ - self.line.into_into_dart().into_dart(), - self.level.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LogEntry {} -impl rust2dart::IntoIntoDart for LogEntry { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for LspInformation { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.name.into_into_dart().into_dart(), - self.widget_url.into_into_dart().into_dart(), - self.pubkey.into_into_dart().into_dart(), - self.host.into_into_dart().into_dart(), - self.base_fee_msat.into_into_dart().into_dart(), - self.fee_rate.into_into_dart().into_dart(), - self.time_lock_delta.into_into_dart().into_dart(), - self.min_htlc_msat.into_into_dart().into_dart(), - self.lsp_pubkey.into_into_dart().into_dart(), - self.opening_fee_params_list.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LspInformation {} -impl rust2dart::IntoIntoDart for LspInformation { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for MaxReverseSwapAmountResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.total_sat.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for MaxReverseSwapAmountResponse {} -impl rust2dart::IntoIntoDart for MaxReverseSwapAmountResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_MessageSuccessActionData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.message.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_MessageSuccessActionData {} -impl rust2dart::IntoIntoDart for MessageSuccessActionData { - fn into_into_dart(self) -> mirror_MessageSuccessActionData { - mirror_MessageSuccessActionData(self) - } -} - -impl support::IntoDart for mirror_Network { - fn into_dart(self) -> support::DartAbi { - match self.0 { - Network::Bitcoin => 0, - Network::Testnet => 1, - Network::Signet => 2, - Network::Regtest => 3, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Network {} -impl rust2dart::IntoIntoDart for Network { - fn into_into_dart(self) -> mirror_Network { - mirror_Network(self) - } -} - -impl support::IntoDart for NodeConfig { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Greenlight { config } => vec![0.into_dart(), config.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeConfig {} -impl rust2dart::IntoIntoDart for NodeConfig { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for NodeCredentials { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Greenlight { credentials } => { - vec![0.into_dart(), credentials.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeCredentials {} -impl rust2dart::IntoIntoDart for NodeCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for NodeState { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.block_height.into_into_dart().into_dart(), - self.channels_balance_msat.into_into_dart().into_dart(), - self.onchain_balance_msat.into_into_dart().into_dart(), - self.pending_onchain_balance_msat - .into_into_dart() - .into_dart(), - self.utxos.into_into_dart().into_dart(), - self.max_payable_msat.into_into_dart().into_dart(), - self.max_receivable_msat.into_into_dart().into_dart(), - self.max_single_payment_amount_msat - .into_into_dart() - .into_dart(), - self.max_chan_reserve_msats.into_into_dart().into_dart(), - self.connected_peers.into_into_dart().into_dart(), - self.max_receivable_single_payment_amount_msat - .into_into_dart() - .into_dart(), - self.total_inbound_liquidity_msats - .into_into_dart() - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeState {} -impl rust2dart::IntoIntoDart for NodeState { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OnchainPaymentLimitsResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min_sat.into_into_dart().into_dart(), - self.max_sat.into_into_dart().into_dart(), - self.max_payable_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OnchainPaymentLimitsResponse {} -impl rust2dart::IntoIntoDart for OnchainPaymentLimitsResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpenChannelFeeResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fee_msat.into_dart(), - self.fee_params.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpenChannelFeeResponse {} -impl rust2dart::IntoIntoDart for OpenChannelFeeResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpeningFeeParams { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min_msat.into_into_dart().into_dart(), - self.proportional.into_into_dart().into_dart(), - self.valid_until.into_into_dart().into_dart(), - self.max_idle_time.into_into_dart().into_dart(), - self.max_client_to_self_delay.into_into_dart().into_dart(), - self.promise.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpeningFeeParams {} -impl rust2dart::IntoIntoDart for OpeningFeeParams { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpeningFeeParamsMenu { - fn into_dart(self) -> support::DartAbi { - vec![self.values.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpeningFeeParamsMenu {} -impl rust2dart::IntoIntoDart for OpeningFeeParamsMenu { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PayOnchainResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.reverse_swap_info.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for PayOnchainResponse {} -impl rust2dart::IntoIntoDart for PayOnchainResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for Payment { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.payment_type.into_into_dart().into_dart(), - self.payment_time.into_into_dart().into_dart(), - self.amount_msat.into_into_dart().into_dart(), - self.fee_msat.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - self.error.into_dart(), - self.description.into_dart(), - self.details.into_into_dart().into_dart(), - self.metadata.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for Payment {} -impl rust2dart::IntoIntoDart for Payment { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentDetails { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Ln { data } => vec![0.into_dart(), data.into_into_dart().into_dart()], - Self::ClosedChannel { data } => vec![1.into_dart(), data.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentDetails {} -impl rust2dart::IntoIntoDart for PaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentFailedData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.error.into_into_dart().into_dart(), - self.node_id.into_into_dart().into_dart(), - self.invoice.map(|v| mirror_LNInvoice(v)).into_dart(), - self.label.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentFailedData {} -impl rust2dart::IntoIntoDart for PaymentFailedData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Pending => 0, - Self::Complete => 1, - Self::Failed => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentStatus {} -impl rust2dart::IntoIntoDart for PaymentStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentType { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Sent => 0, - Self::Received => 1, - Self::ClosedChannel => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentType {} -impl rust2dart::IntoIntoDart for PaymentType { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareOnchainPaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fees_hash.into_into_dart().into_dart(), - self.fees_percentage.into_into_dart().into_dart(), - self.fees_lockup.into_into_dart().into_dart(), - self.fees_claim.into_into_dart().into_dart(), - self.sender_amount_sat.into_into_dart().into_dart(), - self.recipient_amount_sat.into_into_dart().into_dart(), - self.total_fees.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareOnchainPaymentResponse {} -impl rust2dart::IntoIntoDart for PrepareOnchainPaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareRedeemOnchainFundsResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.tx_weight.into_into_dart().into_dart(), - self.tx_fee_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareRedeemOnchainFundsResponse {} -impl rust2dart::IntoIntoDart - for PrepareRedeemOnchainFundsResponse -{ - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareRefundResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.refund_tx_weight.into_into_dart().into_dart(), - self.refund_tx_fee_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareRefundResponse {} -impl rust2dart::IntoIntoDart for PrepareRefundResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_Rate { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.coin.into_into_dart().into_dart(), - self.0.value.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Rate {} -impl rust2dart::IntoIntoDart for Rate { - fn into_into_dart(self) -> mirror_Rate { - mirror_Rate(self) - } -} - -impl support::IntoDart for ReceivePaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.ln_invoice.into_into_dart().into_dart(), - self.opening_fee_params.into_dart(), - self.opening_fee_msat.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReceivePaymentResponse {} -impl rust2dart::IntoIntoDart for ReceivePaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RecommendedFees { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fastest_fee.into_into_dart().into_dart(), - self.half_hour_fee.into_into_dart().into_dart(), - self.hour_fee.into_into_dart().into_dart(), - self.economy_fee.into_into_dart().into_dart(), - self.minimum_fee.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for RecommendedFees {} -impl rust2dart::IntoIntoDart for RecommendedFees { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RedeemOnchainFundsResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.txid.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for RedeemOnchainFundsResponse {} -impl rust2dart::IntoIntoDart for RedeemOnchainFundsResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RefundResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.refund_tx_id.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for RefundResponse {} -impl rust2dart::IntoIntoDart for RefundResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.claim_pubkey.into_into_dart().into_dart(), - self.lockup_txid.into_dart(), - self.claim_txid.into_dart(), - self.onchain_amount_sat.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapInfo {} -impl rust2dart::IntoIntoDart for ReverseSwapInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapPairInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min.into_into_dart().into_dart(), - self.max.into_into_dart().into_dart(), - self.fees_hash.into_into_dart().into_dart(), - self.fees_percentage.into_into_dart().into_dart(), - self.fees_lockup.into_into_dart().into_dart(), - self.fees_claim.into_into_dart().into_dart(), - self.total_fees.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapPairInfo {} -impl rust2dart::IntoIntoDart for ReverseSwapPairInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Initial => 0, - Self::InProgress => 1, - Self::Cancelled => 2, - Self::CompletedSeen => 3, - Self::CompletedConfirmed => 4, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapStatus {} -impl rust2dart::IntoIntoDart for ReverseSwapStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_RouteHint { - fn into_dart(self) -> support::DartAbi { - vec![self.0.hops.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_RouteHint {} -impl rust2dart::IntoIntoDart for RouteHint { - fn into_into_dart(self) -> mirror_RouteHint { - mirror_RouteHint(self) - } -} - -impl support::IntoDart for mirror_RouteHintHop { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.src_node_id.into_into_dart().into_dart(), - self.0.short_channel_id.into_into_dart().into_dart(), - self.0.fees_base_msat.into_into_dart().into_dart(), - self.0 - .fees_proportional_millionths - .into_into_dart() - .into_dart(), - self.0.cltv_expiry_delta.into_into_dart().into_dart(), - self.0.htlc_minimum_msat.into_dart(), - self.0.htlc_maximum_msat.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_RouteHintHop {} -impl rust2dart::IntoIntoDart for RouteHintHop { - fn into_into_dart(self) -> mirror_RouteHintHop { - mirror_RouteHintHop(self) - } -} - -impl support::IntoDart for SendOnchainResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.reverse_swap_info.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SendOnchainResponse {} -impl rust2dart::IntoIntoDart for SendOnchainResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SendPaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.payment.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SendPaymentResponse {} -impl rust2dart::IntoIntoDart for SendPaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ServiceHealthCheckResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.status.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for ServiceHealthCheckResponse {} -impl rust2dart::IntoIntoDart for ServiceHealthCheckResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SignMessageResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.signature.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SignMessageResponse {} -impl rust2dart::IntoIntoDart for SignMessageResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for StaticBackupResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.backup.into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for StaticBackupResponse {} -impl rust2dart::IntoIntoDart for StaticBackupResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_SuccessActionProcessed { - fn into_dart(self) -> support::DartAbi { - match self.0 { - SuccessActionProcessed::Aes { result } => { - vec![0.into_dart(), result.into_into_dart().into_dart()] - } - SuccessActionProcessed::Message { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - SuccessActionProcessed::Url { data } => { - vec![2.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_SuccessActionProcessed {} -impl rust2dart::IntoIntoDart for SuccessActionProcessed { - fn into_into_dart(self) -> mirror_SuccessActionProcessed { - mirror_SuccessActionProcessed(self) - } -} - -impl support::IntoDart for SwapInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.bitcoin_address.into_into_dart().into_dart(), - self.created_at.into_into_dart().into_dart(), - self.lock_height.into_into_dart().into_dart(), - self.payment_hash.into_into_dart().into_dart(), - self.preimage.into_into_dart().into_dart(), - self.private_key.into_into_dart().into_dart(), - self.public_key.into_into_dart().into_dart(), - self.swapper_public_key.into_into_dart().into_dart(), - self.script.into_into_dart().into_dart(), - self.bolt11.into_dart(), - self.paid_msat.into_into_dart().into_dart(), - self.total_incoming_txs.into_into_dart().into_dart(), - self.confirmed_sats.into_into_dart().into_dart(), - self.unconfirmed_sats.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - self.refund_tx_ids.into_into_dart().into_dart(), - self.unconfirmed_tx_ids.into_into_dart().into_dart(), - self.confirmed_tx_ids.into_into_dart().into_dart(), - self.min_allowed_deposit.into_into_dart().into_dart(), - self.max_allowed_deposit.into_into_dart().into_dart(), - self.max_swapper_payable.into_into_dart().into_dart(), - self.last_redeem_error.into_dart(), - self.channel_opening_fees.into_dart(), - self.confirmed_at.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for SwapInfo {} -impl rust2dart::IntoIntoDart for SwapInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SwapStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Initial => 0, - Self::WaitingConfirmation => 1, - Self::Redeemable => 2, - Self::Redeemed => 3, - Self::Refundable => 4, - Self::Completed => 5, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for SwapStatus {} -impl rust2dart::IntoIntoDart for SwapStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_Symbol { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.grapheme.into_dart(), - self.0.template.into_dart(), - self.0.rtl.into_dart(), - self.0.position.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Symbol {} -impl rust2dart::IntoIntoDart for Symbol { - fn into_into_dart(self) -> mirror_Symbol { - mirror_Symbol(self) - } -} - -impl support::IntoDart for UnspentTransactionOutput { - fn into_dart(self) -> support::DartAbi { - vec![ - self.txid.into_into_dart().into_dart(), - self.outnum.into_into_dart().into_dart(), - self.amount_millisatoshi.into_into_dart().into_dart(), - self.address.into_into_dart().into_dart(), - self.reserved.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for UnspentTransactionOutput {} -impl rust2dart::IntoIntoDart for UnspentTransactionOutput { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_UrlSuccessActionData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.description.into_into_dart().into_dart(), - self.0.url.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_UrlSuccessActionData {} -impl rust2dart::IntoIntoDart for UrlSuccessActionData { - fn into_into_dart(self) -> mirror_UrlSuccessActionData { - mirror_UrlSuccessActionData(self) - } -} - -// Section: executor - -support::lazy_static! { - pub static ref FLUTTER_RUST_BRIDGE_HANDLER: support::DefaultHandler = Default::default(); -} - -#[cfg(not(target_family = "wasm"))] -#[path = "bridge_generated.io.rs"] -mod io; -#[cfg(not(target_family = "wasm"))] -pub use self::io::*; diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 9a7d6a83e..ca19bfa19 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/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.5.1. #![allow( non_camel_case_types, @@ -37,8 +37,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 = 847148110; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.5.1"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -488953100; // Section: executor @@ -205,6 +205,29 @@ fn wire__crate__binding__check_message_impl( }, ) } +fn wire__crate__binding__claim_reverse_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + lockup_address: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "claim_reverse_swap", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_lockup_address = lockup_address.cst_decode(); + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::claim_reverse_swap(api_lockup_address)?; + Ok(output_ok) + })(), + ) + } + }, + ) +} fn wire__crate__binding__close_lsp_channels_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ) { @@ -1532,8 +1555,10 @@ const _: fn() = || { let LnUrlPayRequest = None::.unwrap(); let _: crate::binding::LnUrlPayRequestData = LnUrlPayRequest.data; let _: u64 = LnUrlPayRequest.amount_msat; + let _: bool = LnUrlPayRequest.use_trampoline; let _: Option = LnUrlPayRequest.comment; let _: Option = LnUrlPayRequest.payment_label; + let _: Option = LnUrlPayRequest.validate_success_action_url; } { let LnUrlPayRequestData = None::.unwrap(); @@ -1565,6 +1590,9 @@ const _: fn() = || { crate::binding::LnUrlWithdrawResult::Ok { data } => { let _: crate::binding::LnUrlWithdrawSuccessData = data; } + crate::binding::LnUrlWithdrawResult::Timeout { data } => { + let _: crate::binding::LnUrlWithdrawSuccessData = data; + } crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { let _: crate::binding::LnUrlErrorData = data; } @@ -1600,7 +1628,7 @@ const _: fn() = || { { let RouteHintHop = None::.unwrap(); let _: String = RouteHintHop.src_node_id; - let _: u64 = RouteHintHop.short_channel_id; + let _: String = RouteHintHop.short_channel_id; let _: u32 = RouteHintHop.fees_base_msat; let _: u32 = RouteHintHop.fees_proportional_millionths; let _: u64 = RouteHintHop.cltv_expiry_delta; @@ -1629,6 +1657,7 @@ const _: fn() = || { let UrlSuccessActionData = None::.unwrap(); let _: String = UrlSuccessActionData.description; let _: String = UrlSuccessActionData.url; + let _: bool = UrlSuccessActionData.matches_callback_domain; } }; @@ -1975,6 +2004,12 @@ impl SseDecode for crate::breez_services::BreezEvent { }; } 8 => { + let mut var_details = ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::ReverseSwapUpdated { + details: var_details, + }; + } + 9 => { let mut var_details = ::sse_decode(deserializer); return crate::breez_services::BreezEvent::SwapUpdated { details: var_details, @@ -2004,9 +2039,11 @@ impl SseDecode for crate::models::BuyBitcoinRequest { let mut var_provider = ::sse_decode(deserializer); let mut var_openingFeeParams = >::sse_decode(deserializer); + let mut var_redirectUrl = >::sse_decode(deserializer); return crate::models::BuyBitcoinRequest { provider: var_provider, opening_fee_params: var_openingFeeParams, + redirect_url: var_redirectUrl, }; } } @@ -2676,13 +2713,17 @@ impl SseDecode for crate::binding::LnUrlPayRequest { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_data = ::sse_decode(deserializer); let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_useTrampoline = ::sse_decode(deserializer); let mut var_comment = >::sse_decode(deserializer); let mut var_paymentLabel = >::sse_decode(deserializer); + let mut var_validateSuccessActionUrl = >::sse_decode(deserializer); return crate::binding::LnUrlPayRequest { data: var_data, amount_msat: var_amountMsat, + use_trampoline: var_useTrampoline, comment: var_comment, payment_label: var_paymentLabel, + validate_success_action_url: var_validateSuccessActionUrl, }; } } @@ -2794,6 +2835,11 @@ impl SseDecode for crate::binding::LnUrlWithdrawResult { return crate::binding::LnUrlWithdrawResult::Ok { data: var_data }; } 1 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::binding::LnUrlWithdrawResult::Timeout { data: var_data }; + } + 2 => { let mut var_data = ::sse_decode(deserializer); return crate::binding::LnUrlWithdrawResult::ErrorStatus { data: var_data }; } @@ -2980,7 +3026,8 @@ impl SseDecode for crate::models::NodeState { let mut var_maxSinglePaymentAmountMsat = ::sse_decode(deserializer); let mut var_maxChanReserveMsats = ::sse_decode(deserializer); let mut var_connectedPeers = >::sse_decode(deserializer); - let mut var_inboundLiquidityMsats = ::sse_decode(deserializer); + let mut var_maxReceivableSinglePaymentAmountMsat = ::sse_decode(deserializer); + let mut var_totalInboundLiquidityMsats = ::sse_decode(deserializer); return crate::models::NodeState { id: var_id, block_height: var_blockHeight, @@ -2993,7 +3040,8 @@ impl SseDecode for crate::models::NodeState { max_single_payment_amount_msat: var_maxSinglePaymentAmountMsat, max_chan_reserve_msats: var_maxChanReserveMsats, connected_peers: var_connectedPeers, - inbound_liquidity_msats: var_inboundLiquidityMsats, + max_receivable_single_payment_amount_msat: var_maxReceivableSinglePaymentAmountMsat, + total_inbound_liquidity_msats: var_totalInboundLiquidityMsats, }; } } @@ -3003,9 +3051,11 @@ impl SseDecode for crate::models::OnchainPaymentLimitsResponse { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_minSat = ::sse_decode(deserializer); let mut var_maxSat = ::sse_decode(deserializer); + let mut var_maxPayableSat = ::sse_decode(deserializer); return crate::models::OnchainPaymentLimitsResponse { min_sat: var_minSat, max_sat: var_maxSat, + max_payable_sat: var_maxPayableSat, }; } } @@ -3736,7 +3786,7 @@ impl SseDecode for crate::binding::RouteHintHop { // 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_srcNodeId = ::sse_decode(deserializer); - let mut var_shortChannelId = ::sse_decode(deserializer); + let mut var_shortChannelId = ::sse_decode(deserializer); let mut var_feesBaseMsat = ::sse_decode(deserializer); let mut var_feesProportionalMillionths = ::sse_decode(deserializer); let mut var_cltvExpiryDelta = ::sse_decode(deserializer); @@ -3784,10 +3834,12 @@ impl SseDecode for crate::models::SendPaymentRequest { // 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_bolt11 = ::sse_decode(deserializer); + let mut var_useTrampoline = ::sse_decode(deserializer); let mut var_amountMsat = >::sse_decode(deserializer); let mut var_label = >::sse_decode(deserializer); return crate::models::SendPaymentRequest { bolt11: var_bolt11, + use_trampoline: var_useTrampoline, amount_msat: var_amountMsat, label: var_label, }; @@ -4061,9 +4113,11 @@ impl SseDecode for crate::binding::UrlSuccessActionData { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_description = ::sse_decode(deserializer); let mut var_url = ::sse_decode(deserializer); + let mut var_matchesCallbackDomain = ::sse_decode(deserializer); return crate::binding::UrlSuccessActionData { description: var_description, url: var_url, + matches_callback_domain: var_matchesCallbackDomain, }; } } @@ -4241,9 +4295,12 @@ impl flutter_rust_bridge::IntoDart for crate::breez_services::BreezEvent { crate::breez_services::BreezEvent::BackupFailed { details } => { [7.into_dart(), details.into_into_dart().into_dart()].into_dart() } - crate::breez_services::BreezEvent::SwapUpdated { details } => { + crate::breez_services::BreezEvent::ReverseSwapUpdated { details } => { [8.into_dart(), details.into_into_dart().into_dart()].into_dart() } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + [9.into_dart(), details.into_into_dart().into_dart()].into_dart() + } _ => { unimplemented!(""); } @@ -4287,6 +4344,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinRequest { [ self.provider.into_into_dart().into_dart(), self.opening_fee_params.into_into_dart().into_dart(), + self.redirect_url.into_into_dart().into_dart(), ] .into_dart() } @@ -4869,8 +4927,13 @@ impl flutter_rust_bridge::IntoDart for FrbWrapper { [0.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::Timeout { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + [2.into_dart(), data.into_into_dart().into_dart()].into_dart() + } _ => { unimplemented!(""); } @@ -5276,7 +5342,12 @@ impl flutter_rust_bridge::IntoDart for crate::models::NodeState { .into_dart(), self.max_chan_reserve_msats.into_into_dart().into_dart(), self.connected_peers.into_into_dart().into_dart(), - self.inbound_liquidity_msats.into_into_dart().into_dart(), + self.max_receivable_single_payment_amount_msat + .into_into_dart() + .into_dart(), + self.total_inbound_liquidity_msats + .into_into_dart() + .into_dart(), ] .into_dart() } @@ -5293,6 +5364,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::OnchainPaymentLimitsRespon [ self.min_sat.into_into_dart().into_dart(), self.max_sat.into_into_dart().into_dart(), + self.max_payable_sat.into_into_dart().into_dart(), ] .into_dart() } @@ -6100,6 +6172,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::SendPaymentRequest { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.bolt11.into_into_dart().into_dart(), + self.use_trampoline.into_into_dart().into_dart(), self.amount_msat.into_into_dart().into_dart(), self.label.into_into_dart().into_dart(), ] @@ -6417,6 +6490,7 @@ impl flutter_rust_bridge::IntoDart for FrbWrapper::sse_encode(7, serializer); ::sse_encode(details, serializer); } - crate::breez_services::BreezEvent::SwapUpdated { details } => { + crate::breez_services::BreezEvent::ReverseSwapUpdated { details } => { ::sse_encode(8, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + ::sse_encode(9, serializer); ::sse_encode(details, serializer); } _ => { @@ -6594,6 +6672,7 @@ impl SseEncode for crate::models::BuyBitcoinRequest { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.provider, serializer); >::sse_encode(self.opening_fee_params, serializer); + >::sse_encode(self.redirect_url, serializer); } } @@ -7109,8 +7188,10 @@ impl SseEncode for crate::binding::LnUrlPayRequest { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.data, serializer); ::sse_encode(self.amount_msat, serializer); + ::sse_encode(self.use_trampoline, serializer); >::sse_encode(self.comment, serializer); >::sse_encode(self.payment_label, serializer); + >::sse_encode(self.validate_success_action_url, serializer); } } @@ -7191,8 +7272,12 @@ impl SseEncode for crate::binding::LnUrlWithdrawResult { ::sse_encode(0, serializer); ::sse_encode(data, serializer); } - crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::Timeout { data } => { ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + ::sse_encode(2, serializer); ::sse_encode(data, serializer); } _ => { @@ -7335,7 +7420,8 @@ impl SseEncode for crate::models::NodeState { ::sse_encode(self.max_single_payment_amount_msat, serializer); ::sse_encode(self.max_chan_reserve_msats, serializer); >::sse_encode(self.connected_peers, serializer); - ::sse_encode(self.inbound_liquidity_msats, serializer); + ::sse_encode(self.max_receivable_single_payment_amount_msat, serializer); + ::sse_encode(self.total_inbound_liquidity_msats, serializer); } } @@ -7344,6 +7430,7 @@ impl SseEncode for crate::models::OnchainPaymentLimitsResponse { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.min_sat, serializer); ::sse_encode(self.max_sat, serializer); + ::sse_encode(self.max_payable_sat, serializer); } } @@ -7913,7 +8000,7 @@ impl SseEncode for crate::binding::RouteHintHop { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.src_node_id, serializer); - ::sse_encode(self.short_channel_id, serializer); + ::sse_encode(self.short_channel_id, serializer); ::sse_encode(self.fees_base_msat, serializer); ::sse_encode(self.fees_proportional_millionths, serializer); ::sse_encode(self.cltv_expiry_delta, serializer); @@ -7943,6 +8030,7 @@ impl SseEncode for crate::models::SendPaymentRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.bolt11, serializer); + ::sse_encode(self.use_trampoline, serializer); >::sse_encode(self.amount_msat, serializer); >::sse_encode(self.label, serializer); } @@ -8159,11 +8247,5483 @@ impl SseEncode for crate::binding::UrlSuccessActionData { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.description, serializer); ::sse_encode(self.url, serializer); + ::sse_encode(self.matches_callback_domain, serializer); } } #[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; +mod io { + // This file is automatically generated, so please do not edit it. + // @generated by `flutter_rust_bridge`@ 2.5.1. + + // Section: imports + + use super::*; + use crate::breez_services::EventListener; + 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< + StreamSink< + crate::breez_services::BreezEvent, + flutter_rust_bridge::for_generated::DcoCodec, + >, + > for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink< + crate::breez_services::BreezEvent, + flutter_rust_bridge::for_generated::DcoCodec, + > { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } + } + 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, + ) -> StreamSink + { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } + } + 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_aes_success_action_data_decrypted + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { + crate::binding::AesSuccessActionDataDecrypted { + description: self.description.cst_decode(), + plaintext: self.plaintext.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_aes_success_action_data_result + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Decrypted }; + crate::binding::AesSuccessActionDataResult::Decrypted { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::AesSuccessActionDataResult::ErrorStatus { + reason: ans.reason.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + crate::breez_services::BackupFailedData { + error: self.error.cst_decode(), + } + } + } + impl CstDecode for wire_cst_backup_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BackupStatus { + crate::models::BackupStatus { + backed_up: self.backed_up.cst_decode(), + last_backup_time: self.last_backup_time.cst_decode(), + } + } + } + impl CstDecode for wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + crate::binding::BindingEventListener {} + } + } + impl CstDecode for wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BitcoinAddressData { + crate::binding::BitcoinAddressData { + address: self.address.cst_decode(), + network: self.network.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + label: self.label.cst_decode(), + message: self.message.cst_decode(), + } + } + } + impl CstDecode + for *mut wire_cst_aes_success_action_data_decrypted + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_aes_success_action_data_result + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BitcoinAddressData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_closed_channel_payment_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_greenlight_device_credentials + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut i64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LNInvoice { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ln_url_withdraw_request_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ln_url_withdraw_success_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_message_success_action_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_prepare_onchain_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_prepare_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_report_payment_failure_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_send_spontaneous_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + 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_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_success_action_processed { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Symbol { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut u32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_url_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + match self.tag { + 0 => { + let ans = unsafe { self.kind.NewBlock }; + crate::breez_services::BreezEvent::NewBlock { + block: ans.block.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvoicePaid }; + crate::breez_services::BreezEvent::InvoicePaid { + details: ans.details.cst_decode(), + } + } + 2 => crate::breez_services::BreezEvent::Synced, + 3 => { + let ans = unsafe { self.kind.PaymentSucceed }; + crate::breez_services::BreezEvent::PaymentSucceed { + details: ans.details.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.PaymentFailed }; + crate::breez_services::BreezEvent::PaymentFailed { + details: ans.details.cst_decode(), + } + } + 5 => crate::breez_services::BreezEvent::BackupStarted, + 6 => crate::breez_services::BreezEvent::BackupSucceeded, + 7 => { + let ans = unsafe { self.kind.BackupFailed }; + crate::breez_services::BreezEvent::BackupFailed { + details: ans.details.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.ReverseSwapUpdated }; + crate::breez_services::BreezEvent::ReverseSwapUpdated { + details: ans.details.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.SwapUpdated }; + crate::breez_services::BreezEvent::SwapUpdated { + details: ans.details.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + crate::models::BuyBitcoinRequest { + provider: self.provider.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + redirect_url: self.redirect_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_buy_bitcoin_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinResponse { + crate::models::BuyBitcoinResponse { + url: self.url.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + crate::breez_services::CheckMessageRequest { + message: self.message.cst_decode(), + pubkey: self.pubkey.cst_decode(), + signature: self.signature.cst_decode(), + } + } + } + impl CstDecode for wire_cst_check_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageResponse { + crate::breez_services::CheckMessageResponse { + is_valid: self.is_valid.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_closed_channel_payment_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + crate::models::ClosedChannelPaymentDetails { + state: self.state.cst_decode(), + funding_txid: self.funding_txid.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + closing_txid: self.closing_txid.cst_decode(), + } + } + } + impl CstDecode for wire_cst_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Config { + crate::models::Config { + breezserver: self.breezserver.cst_decode(), + chainnotifier_url: self.chainnotifier_url.cst_decode(), + mempoolspace_url: self.mempoolspace_url.cst_decode(), + working_dir: self.working_dir.cst_decode(), + network: self.network.cst_decode(), + payment_timeout_sec: self.payment_timeout_sec.cst_decode(), + default_lsp_id: self.default_lsp_id.cst_decode(), + api_key: self.api_key.cst_decode(), + maxfee_percent: self.maxfee_percent.cst_decode(), + exemptfee_msat: self.exemptfee_msat.cst_decode(), + node_config: self.node_config.cst_decode(), + } + } + } + impl CstDecode for wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + crate::models::ConfigureNodeRequest { + close_to_address: self.close_to_address.cst_decode(), + } + } + } + impl CstDecode for wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + crate::models::ConnectRequest { + config: self.config.cst_decode(), + seed: self.seed.cst_decode(), + restore_only: self.restore_only.cst_decode(), + } + } + } + impl CstDecode for wire_cst_currency_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::CurrencyInfo { + crate::binding::CurrencyInfo { + name: self.name.cst_decode(), + fraction_size: self.fraction_size.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + uniq_symbol: self.uniq_symbol.cst_decode(), + localized_name: self.localized_name.cst_decode(), + locale_overrides: self.locale_overrides.cst_decode(), + } + } + } + impl CstDecode for wire_cst_fiat_currency { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::FiatCurrency { + crate::binding::FiatCurrency { + id: self.id.cst_decode(), + info: self.info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + crate::models::GreenlightCredentials { + developer_key: self.developer_key.cst_decode(), + developer_cert: self.developer_cert.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_greenlight_device_credentials + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + crate::models::GreenlightDeviceCredentials { + device: self.device.cst_decode(), + } + } + } + impl CstDecode for wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + crate::models::GreenlightNodeConfig { + partner_credentials: self.partner_credentials.cst_decode(), + invite_code: self.invite_code.cst_decode(), + } + } + } + impl CstDecode for wire_cst_input_type { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::InputType { + match self.tag { + 0 => { + let ans = unsafe { self.kind.BitcoinAddress }; + crate::binding::InputType::BitcoinAddress { + address: ans.address.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Bolt11 }; + crate::binding::InputType::Bolt11 { + invoice: ans.invoice.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.NodeId }; + crate::binding::InputType::NodeId { + node_id: ans.node_id.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Url }; + crate::binding::InputType::Url { + url: ans.url.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.LnUrlPay }; + crate::binding::InputType::LnUrlPay { + data: ans.data.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.LnUrlWithdraw }; + crate::binding::InputType::LnUrlWithdraw { + data: ans.data.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.LnUrlAuth }; + crate::binding::InputType::LnUrlAuth { + data: ans.data.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.LnUrlError }; + crate::binding::InputType::LnUrlError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + crate::breez_services::InvoicePaidDetails { + payment_hash: self.payment_hash.cst_decode(), + bolt11: self.bolt11.cst_decode(), + payment: self.payment.cst_decode(), + } + } + } + impl CstDecode> for *mut wire_cst_list_String { + // 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_fiat_currency { + // 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_locale_overrides { + // 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_localized_name { + // 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_lsp_information { + // 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_metadata_filter { + // 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_opening_fee_params { + // 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_payment { + // 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_payment_type_filter { + // 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_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + crate::models::ListPaymentsRequest { + filters: self.filters.cst_decode(), + metadata_filters: self.metadata_filters.cst_decode(), + from_timestamp: self.from_timestamp.cst_decode(), + to_timestamp: self.to_timestamp.cst_decode(), + include_failures: self.include_failures.cst_decode(), + offset: self.offset.cst_decode(), + limit: self.limit.cst_decode(), + } + } + } + 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_rate { + // 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_reverse_swap_info { + // 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_route_hint { + // 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_route_hint_hop { + // 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_swap_info { + // 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_tlv_entry { + // 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_unspent_transaction_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 wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LNInvoice { + crate::binding::LNInvoice { + bolt11: self.bolt11.cst_decode(), + network: self.network.cst_decode(), + payee_pubkey: self.payee_pubkey.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + description: self.description.cst_decode(), + description_hash: self.description_hash.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + timestamp: self.timestamp.cst_decode(), + expiry: self.expiry.cst_decode(), + routing_hints: self.routing_hints.cst_decode(), + payment_secret: self.payment_secret.cst_decode(), + min_final_cltv_expiry_delta: self.min_final_cltv_expiry_delta.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + crate::models::LnPaymentDetails { + payment_hash: self.payment_hash.cst_decode(), + label: self.label.cst_decode(), + destination_pubkey: self.destination_pubkey.cst_decode(), + payment_preimage: self.payment_preimage.cst_decode(), + keysend: self.keysend.cst_decode(), + bolt11: self.bolt11.cst_decode(), + open_channel_bolt11: self.open_channel_bolt11.cst_decode(), + lnurl_success_action: self.lnurl_success_action.cst_decode(), + lnurl_pay_domain: self.lnurl_pay_domain.cst_decode(), + lnurl_pay_comment: self.lnurl_pay_comment.cst_decode(), + ln_address: self.ln_address.cst_decode(), + lnurl_metadata: self.lnurl_metadata.cst_decode(), + lnurl_withdraw_endpoint: self.lnurl_withdraw_endpoint.cst_decode(), + swap_info: self.swap_info.cst_decode(), + reverse_swap_info: self.reverse_swap_info.cst_decode(), + pending_expiration_block: self.pending_expiration_block.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { + crate::binding::LnUrlAuthRequestData { + k1: self.k1.cst_decode(), + action: self.action.cst_decode(), + domain: self.domain.cst_decode(), + url: self.url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_callback_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlCallbackStatus { + match self.tag { + 0 => crate::binding::LnUrlCallbackStatus::Ok, + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::LnUrlCallbackStatus::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlErrorData { + crate::binding::LnUrlErrorData { + reason: self.reason.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + crate::binding::LnUrlPayErrorData { + payment_hash: self.payment_hash.cst_decode(), + reason: self.reason.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { + crate::binding::LnUrlPayRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + use_trampoline: self.use_trampoline.cst_decode(), + comment: self.comment.cst_decode(), + payment_label: self.payment_label.cst_decode(), + validate_success_action_url: self.validate_success_action_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { + crate::binding::LnUrlPayRequestData { + callback: self.callback.cst_decode(), + min_sendable: self.min_sendable.cst_decode(), + max_sendable: self.max_sendable.cst_decode(), + metadata_str: self.metadata_str.cst_decode(), + comment_allowed: self.comment_allowed.cst_decode(), + domain: self.domain.cst_decode(), + allows_nostr: self.allows_nostr.cst_decode(), + nostr_pubkey: self.nostr_pubkey.cst_decode(), + ln_address: self.ln_address.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPayResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EndpointSuccess }; + crate::lnurl::pay::LnUrlPayResult::EndpointSuccess { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.EndpointError }; + crate::lnurl::pay::LnUrlPayResult::EndpointError { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PayError }; + crate::lnurl::pay::LnUrlPayResult::PayError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + crate::lnurl::pay::LnUrlPaySuccessData { + payment: self.payment.cst_decode(), + success_action: self.success_action.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { + crate::binding::LnUrlWithdrawRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { + crate::binding::LnUrlWithdrawRequestData { + callback: self.callback.cst_decode(), + k1: self.k1.cst_decode(), + default_description: self.default_description.cst_decode(), + min_withdrawable: self.min_withdrawable.cst_decode(), + max_withdrawable: self.max_withdrawable.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ok }; + crate::binding::LnUrlWithdrawResult::Ok { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Timeout }; + crate::binding::LnUrlWithdrawResult::Timeout { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::LnUrlWithdrawResult::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { + crate::binding::LnUrlWithdrawSuccessData { + invoice: self.invoice.cst_decode(), + } + } + } + impl CstDecode for wire_cst_locale_overrides { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LocaleOverrides { + crate::binding::LocaleOverrides { + locale: self.locale.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + } + } + } + impl CstDecode for wire_cst_localized_name { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LocalizedName { + crate::binding::LocalizedName { + locale: self.locale.cst_decode(), + name: self.name.cst_decode(), + } + } + } + impl CstDecode for wire_cst_log_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LogEntry { + crate::models::LogEntry { + line: self.line.cst_decode(), + level: self.level.cst_decode(), + } + } + } + impl CstDecode for wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + crate::lsp::LspInformation { + id: self.id.cst_decode(), + name: self.name.cst_decode(), + widget_url: self.widget_url.cst_decode(), + pubkey: self.pubkey.cst_decode(), + host: self.host.cst_decode(), + base_fee_msat: self.base_fee_msat.cst_decode(), + fee_rate: self.fee_rate.cst_decode(), + time_lock_delta: self.time_lock_delta.cst_decode(), + min_htlc_msat: self.min_htlc_msat.cst_decode(), + lsp_pubkey: self.lsp_pubkey.cst_decode(), + opening_fee_params_list: self.opening_fee_params_list.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_max_reverse_swap_amount_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MaxReverseSwapAmountResponse { + crate::models::MaxReverseSwapAmountResponse { + total_sat: self.total_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_message_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { + crate::binding::MessageSuccessActionData { + message: self.message.cst_decode(), + } + } + } + impl CstDecode for wire_cst_metadata_filter { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MetadataFilter { + crate::models::MetadataFilter { + json_path: self.json_path.cst_decode(), + json_value: self.json_value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeConfig::Greenlight { + config: ans.config.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeCredentials::Greenlight { + credentials: ans.credentials.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_node_state { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeState { + crate::models::NodeState { + id: self.id.cst_decode(), + block_height: self.block_height.cst_decode(), + channels_balance_msat: self.channels_balance_msat.cst_decode(), + onchain_balance_msat: self.onchain_balance_msat.cst_decode(), + pending_onchain_balance_msat: self.pending_onchain_balance_msat.cst_decode(), + utxos: self.utxos.cst_decode(), + max_payable_msat: self.max_payable_msat.cst_decode(), + max_receivable_msat: self.max_receivable_msat.cst_decode(), + max_single_payment_amount_msat: self.max_single_payment_amount_msat.cst_decode(), + max_chan_reserve_msats: self.max_chan_reserve_msats.cst_decode(), + connected_peers: self.connected_peers.cst_decode(), + max_receivable_single_payment_amount_msat: self + .max_receivable_single_payment_amount_msat + .cst_decode(), + total_inbound_liquidity_msats: self.total_inbound_liquidity_msats.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_onchain_payment_limits_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OnchainPaymentLimitsResponse { + crate::models::OnchainPaymentLimitsResponse { + min_sat: self.min_sat.cst_decode(), + max_sat: self.max_sat.cst_decode(), + max_payable_sat: self.max_payable_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + crate::models::OpenChannelFeeRequest { + amount_msat: self.amount_msat.cst_decode(), + expiry: self.expiry.cst_decode(), + } + } + } + impl CstDecode for wire_cst_open_channel_fee_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeResponse { + crate::models::OpenChannelFeeResponse { + fee_msat: self.fee_msat.cst_decode(), + fee_params: self.fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + crate::models::OpeningFeeParams { + min_msat: self.min_msat.cst_decode(), + proportional: self.proportional.cst_decode(), + valid_until: self.valid_until.cst_decode(), + max_idle_time: self.max_idle_time.cst_decode(), + max_client_to_self_delay: self.max_client_to_self_delay.cst_decode(), + promise: self.promise.cst_decode(), + } + } + } + impl CstDecode for wire_cst_opening_fee_params_menu { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParamsMenu { + crate::models::OpeningFeeParamsMenu { + values: self.values.cst_decode(), + } + } + } + impl CstDecode for wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + crate::models::PayOnchainRequest { + recipient_address: self.recipient_address.cst_decode(), + prepare_res: self.prepare_res.cst_decode(), + } + } + } + impl CstDecode for wire_cst_pay_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainResponse { + crate::models::PayOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + crate::models::Payment { + id: self.id.cst_decode(), + payment_type: self.payment_type.cst_decode(), + payment_time: self.payment_time.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + fee_msat: self.fee_msat.cst_decode(), + status: self.status.cst_decode(), + error: self.error.cst_decode(), + description: self.description.cst_decode(), + details: self.details.cst_decode(), + metadata: self.metadata.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentDetails { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ln }; + crate::models::PaymentDetails::Ln { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ClosedChannel }; + crate::models::PaymentDetails::ClosedChannel { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + crate::breez_services::PaymentFailedData { + error: self.error.cst_decode(), + node_id: self.node_id.cst_decode(), + invoice: self.invoice.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_onchain_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + crate::models::PrepareOnchainPaymentRequest { + amount_sat: self.amount_sat.cst_decode(), + amount_type: self.amount_type.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_onchain_payment_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentResponse { + crate::models::PrepareOnchainPaymentResponse { + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + sender_amount_sat: self.sender_amount_sat.cst_decode(), + recipient_amount_sat: self.recipient_amount_sat.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + crate::models::PrepareRedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsResponse { + crate::models::PrepareRedeemOnchainFundsResponse { + tx_weight: self.tx_weight.cst_decode(), + tx_fee_sat: self.tx_fee_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + crate::models::PrepareRefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundResponse { + crate::models::PrepareRefundResponse { + refund_tx_weight: self.refund_tx_weight.cst_decode(), + refund_tx_fee_sat: self.refund_tx_fee_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Rate { + crate::binding::Rate { + coin: self.coin.cst_decode(), + value: self.value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + crate::models::ReceiveOnchainRequest { + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + crate::models::ReceivePaymentRequest { + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + preimage: self.preimage.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + use_description_hash: self.use_description_hash.cst_decode(), + expiry: self.expiry.cst_decode(), + cltv: self.cltv.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentResponse { + crate::models::ReceivePaymentResponse { + ln_invoice: self.ln_invoice.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + opening_fee_msat: self.opening_fee_msat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_recommended_fees { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::chain::RecommendedFees { + crate::chain::RecommendedFees { + fastest_fee: self.fastest_fee.cst_decode(), + half_hour_fee: self.half_hour_fee.cst_decode(), + hour_fee: self.hour_fee.cst_decode(), + economy_fee: self.economy_fee.cst_decode(), + minimum_fee: self.minimum_fee.cst_decode(), + } + } + } + impl CstDecode for wire_cst_redeem_onchain_funds_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + crate::models::RedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_redeem_onchain_funds_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsResponse { + crate::models::RedeemOnchainFundsResponse { + txid: self.txid.cst_decode(), + } + } + } + impl CstDecode for wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + crate::models::RefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundResponse { + crate::models::RefundResponse { + refund_tx_id: self.refund_tx_id.cst_decode(), + } + } + } + impl CstDecode for wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PaymentFailure }; + crate::models::ReportIssueRequest::PaymentFailure { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode + for wire_cst_report_payment_failure_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + crate::models::ReportPaymentFailureDetails { + payment_hash: self.payment_hash.cst_decode(), + comment: self.comment.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + crate::models::ReverseSwapFeesRequest { + send_amount_sat: self.send_amount_sat.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + crate::models::ReverseSwapInfo { + id: self.id.cst_decode(), + claim_pubkey: self.claim_pubkey.cst_decode(), + lockup_txid: self.lockup_txid.cst_decode(), + claim_txid: self.claim_txid.cst_decode(), + onchain_amount_sat: self.onchain_amount_sat.cst_decode(), + status: self.status.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_pair_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapPairInfo { + crate::models::ReverseSwapPairInfo { + min: self.min.cst_decode(), + max: self.max.cst_decode(), + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } + } + impl CstDecode for wire_cst_route_hint { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::RouteHint { + crate::binding::RouteHint { + hops: self.hops.cst_decode(), + } + } + } + impl CstDecode for wire_cst_route_hint_hop { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::RouteHintHop { + crate::binding::RouteHintHop { + src_node_id: self.src_node_id.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + fees_base_msat: self.fees_base_msat.cst_decode(), + fees_proportional_millionths: self.fees_proportional_millionths.cst_decode(), + cltv_expiry_delta: self.cltv_expiry_delta.cst_decode(), + htlc_minimum_msat: self.htlc_minimum_msat.cst_decode(), + htlc_maximum_msat: self.htlc_maximum_msat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + crate::models::SendOnchainRequest { + amount_sat: self.amount_sat.cst_decode(), + onchain_recipient_address: self.onchain_recipient_address.cst_decode(), + pair_hash: self.pair_hash.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainResponse { + crate::models::SendOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + crate::models::SendPaymentRequest { + bolt11: self.bolt11.cst_decode(), + use_trampoline: self.use_trampoline.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentResponse { + crate::models::SendPaymentResponse { + payment: self.payment.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_send_spontaneous_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + crate::models::SendSpontaneousPaymentRequest { + node_id: self.node_id.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + extra_tlvs: self.extra_tlvs.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_service_health_check_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ServiceHealthCheckResponse { + crate::models::ServiceHealthCheckResponse { + status: self.status.cst_decode(), + } + } + } + impl CstDecode for wire_cst_sign_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + crate::breez_services::SignMessageRequest { + message: self.message.cst_decode(), + } + } + } + impl CstDecode for wire_cst_sign_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageResponse { + crate::breez_services::SignMessageResponse { + signature: self.signature.cst_decode(), + } + } + } + impl CstDecode for wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + crate::models::StaticBackupRequest { + working_dir: self.working_dir.cst_decode(), + } + } + } + impl CstDecode for wire_cst_static_backup_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupResponse { + crate::models::StaticBackupResponse { + backup: self.backup.cst_decode(), + } + } + } + impl CstDecode for wire_cst_success_action_processed { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Aes }; + crate::binding::SuccessActionProcessed::Aes { + result: ans.result.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Message }; + crate::binding::SuccessActionProcessed::Message { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Url }; + crate::binding::SuccessActionProcessed::Url { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + crate::models::SwapInfo { + bitcoin_address: self.bitcoin_address.cst_decode(), + created_at: self.created_at.cst_decode(), + lock_height: self.lock_height.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + preimage: self.preimage.cst_decode(), + private_key: self.private_key.cst_decode(), + public_key: self.public_key.cst_decode(), + swapper_public_key: self.swapper_public_key.cst_decode(), + script: self.script.cst_decode(), + bolt11: self.bolt11.cst_decode(), + paid_msat: self.paid_msat.cst_decode(), + total_incoming_txs: self.total_incoming_txs.cst_decode(), + confirmed_sats: self.confirmed_sats.cst_decode(), + unconfirmed_sats: self.unconfirmed_sats.cst_decode(), + status: self.status.cst_decode(), + refund_tx_ids: self.refund_tx_ids.cst_decode(), + unconfirmed_tx_ids: self.unconfirmed_tx_ids.cst_decode(), + confirmed_tx_ids: self.confirmed_tx_ids.cst_decode(), + min_allowed_deposit: self.min_allowed_deposit.cst_decode(), + max_allowed_deposit: self.max_allowed_deposit.cst_decode(), + max_swapper_payable: self.max_swapper_payable.cst_decode(), + last_redeem_error: self.last_redeem_error.cst_decode(), + channel_opening_fees: self.channel_opening_fees.cst_decode(), + confirmed_at: self.confirmed_at.cst_decode(), + } + } + } + impl CstDecode for wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Symbol { + crate::binding::Symbol { + grapheme: self.grapheme.cst_decode(), + template: self.template.cst_decode(), + rtl: self.rtl.cst_decode(), + position: self.position.cst_decode(), + } + } + } + impl CstDecode for wire_cst_tlv_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::TlvEntry { + crate::models::TlvEntry { + field_number: self.field_number.cst_decode(), + value: self.value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_unspent_transaction_output { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::UnspentTransactionOutput { + crate::models::UnspentTransactionOutput { + txid: self.txid.cst_decode(), + outnum: self.outnum.cst_decode(), + amount_millisatoshi: self.amount_millisatoshi.cst_decode(), + address: self.address.cst_decode(), + reserved: self.reserved.cst_decode(), + } + } + } + impl CstDecode for wire_cst_url_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { + crate::binding::UrlSuccessActionData { + description: self.description.cst_decode(), + url: self.url.cst_decode(), + matches_callback_domain: self.matches_callback_domain.cst_decode(), + } + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_decrypted { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + plaintext: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_aes_success_action_data_decrypted { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AesSuccessActionDataResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_aes_success_action_data_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_backup_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_backup_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_backup_status { + fn new_with_null_ptr() -> Self { + Self { + backed_up: Default::default(), + last_backup_time: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_backup_status { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_binding_event_listener { + fn new_with_null_ptr() -> Self { + Self {} + } + } + impl Default for wire_cst_binding_event_listener { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_bitcoin_address_data { + fn new_with_null_ptr() -> Self { + Self { + address: core::ptr::null_mut(), + network: Default::default(), + amount_sat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_bitcoin_address_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_breez_event { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: BreezEventKind { nil__: () }, + } + } + } + impl Default for wire_cst_breez_event { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_buy_bitcoin_request { + fn new_with_null_ptr() -> Self { + Self { + provider: Default::default(), + opening_fee_params: core::ptr::null_mut(), + redirect_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_buy_bitcoin_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_buy_bitcoin_response { + fn new_with_null_ptr() -> Self { + Self { + url: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_buy_bitcoin_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_check_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + signature: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_check_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_check_message_response { + fn new_with_null_ptr() -> Self { + Self { + is_valid: Default::default(), + } + } + } + impl Default for wire_cst_check_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_closed_channel_payment_details { + fn new_with_null_ptr() -> Self { + Self { + state: Default::default(), + funding_txid: core::ptr::null_mut(), + short_channel_id: core::ptr::null_mut(), + closing_txid: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_closed_channel_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_config { + fn new_with_null_ptr() -> Self { + Self { + breezserver: core::ptr::null_mut(), + chainnotifier_url: core::ptr::null_mut(), + mempoolspace_url: core::ptr::null_mut(), + working_dir: core::ptr::null_mut(), + network: Default::default(), + payment_timeout_sec: Default::default(), + default_lsp_id: core::ptr::null_mut(), + api_key: core::ptr::null_mut(), + maxfee_percent: Default::default(), + exemptfee_msat: Default::default(), + node_config: Default::default(), + } + } + } + impl Default for wire_cst_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_configure_node_request { + fn new_with_null_ptr() -> Self { + Self { + close_to_address: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_configure_node_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_connect_request { + fn new_with_null_ptr() -> Self { + Self { + config: Default::default(), + seed: core::ptr::null_mut(), + restore_only: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_connect_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_currency_info { + fn new_with_null_ptr() -> Self { + Self { + name: core::ptr::null_mut(), + fraction_size: Default::default(), + spacing: core::ptr::null_mut(), + symbol: core::ptr::null_mut(), + uniq_symbol: core::ptr::null_mut(), + localized_name: core::ptr::null_mut(), + locale_overrides: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_currency_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_fiat_currency { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + info: Default::default(), + } + } + } + impl Default for wire_cst_fiat_currency { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_credentials { + fn new_with_null_ptr() -> Self { + Self { + developer_key: core::ptr::null_mut(), + developer_cert: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_device_credentials { + fn new_with_null_ptr() -> Self { + Self { + device: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_device_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_node_config { + fn new_with_null_ptr() -> Self { + Self { + partner_credentials: core::ptr::null_mut(), + invite_code: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_input_type { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: InputTypeKind { nil__: () }, + } + } + } + impl Default for wire_cst_input_type { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_invoice_paid_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + payment: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_invoice_paid_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_list_payments_request { + fn new_with_null_ptr() -> Self { + Self { + filters: core::ptr::null_mut(), + metadata_filters: core::ptr::null_mut(), + from_timestamp: core::ptr::null_mut(), + to_timestamp: core::ptr::null_mut(), + include_failures: core::ptr::null_mut(), + offset: core::ptr::null_mut(), + limit: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_list_payments_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_invoice { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + network: Default::default(), + payee_pubkey: core::ptr::null_mut(), + payment_hash: core::ptr::null_mut(), + description: core::ptr::null_mut(), + description_hash: core::ptr::null_mut(), + amount_msat: core::ptr::null_mut(), + timestamp: Default::default(), + expiry: Default::default(), + routing_hints: core::ptr::null_mut(), + payment_secret: core::ptr::null_mut(), + min_final_cltv_expiry_delta: Default::default(), + } + } + } + impl Default for wire_cst_ln_invoice { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_payment_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + label: core::ptr::null_mut(), + destination_pubkey: core::ptr::null_mut(), + payment_preimage: core::ptr::null_mut(), + keysend: Default::default(), + bolt11: core::ptr::null_mut(), + open_channel_bolt11: core::ptr::null_mut(), + lnurl_success_action: core::ptr::null_mut(), + lnurl_pay_domain: core::ptr::null_mut(), + lnurl_pay_comment: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + lnurl_metadata: core::ptr::null_mut(), + lnurl_withdraw_endpoint: core::ptr::null_mut(), + swap_info: core::ptr::null_mut(), + reverse_swap_info: core::ptr::null_mut(), + pending_expiration_block: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_auth_request_data { + fn new_with_null_ptr() -> Self { + Self { + k1: core::ptr::null_mut(), + action: core::ptr::null_mut(), + domain: core::ptr::null_mut(), + url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_auth_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_callback_status { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlCallbackStatusKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_callback_status { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_error_data { + fn new_with_null_ptr() -> Self { + Self { + reason: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_error_data { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + reason: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + use_trampoline: Default::default(), + comment: core::ptr::null_mut(), + payment_label: core::ptr::null_mut(), + validate_success_action_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + min_sendable: Default::default(), + max_sendable: Default::default(), + metadata_str: core::ptr::null_mut(), + comment_allowed: Default::default(), + domain: core::ptr::null_mut(), + allows_nostr: Default::default(), + nostr_pubkey: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_pay_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + success_action: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + description: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + k1: core::ptr::null_mut(), + default_description: core::ptr::null_mut(), + min_withdrawable: Default::default(), + max_withdrawable: Default::default(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlWithdrawResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_withdraw_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_success_data { + fn new_with_null_ptr() -> Self { + Self { + invoice: Default::default(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_locale_overrides { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + spacing: core::ptr::null_mut(), + symbol: Default::default(), + } + } + } + impl Default for wire_cst_locale_overrides { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_localized_name { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + name: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_localized_name { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_log_entry { + fn new_with_null_ptr() -> Self { + Self { + line: core::ptr::null_mut(), + level: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_log_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_lsp_information { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + name: core::ptr::null_mut(), + widget_url: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + host: core::ptr::null_mut(), + base_fee_msat: Default::default(), + fee_rate: Default::default(), + time_lock_delta: Default::default(), + min_htlc_msat: Default::default(), + lsp_pubkey: core::ptr::null_mut(), + opening_fee_params_list: Default::default(), + } + } + } + impl Default for wire_cst_lsp_information { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_max_reverse_swap_amount_response { + fn new_with_null_ptr() -> Self { + Self { + total_sat: Default::default(), + } + } + } + impl Default for wire_cst_max_reverse_swap_amount_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_message_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_message_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_metadata_filter { + fn new_with_null_ptr() -> Self { + Self { + json_path: core::ptr::null_mut(), + json_value: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_metadata_filter { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_config { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeConfigKind { nil__: () }, + } + } + } + impl Default for wire_cst_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_credentials { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeCredentialsKind { nil__: () }, + } + } + } + impl Default for wire_cst_node_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_state { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + block_height: Default::default(), + channels_balance_msat: Default::default(), + onchain_balance_msat: Default::default(), + pending_onchain_balance_msat: Default::default(), + utxos: core::ptr::null_mut(), + max_payable_msat: Default::default(), + max_receivable_msat: Default::default(), + max_single_payment_amount_msat: Default::default(), + max_chan_reserve_msats: Default::default(), + connected_peers: core::ptr::null_mut(), + max_receivable_single_payment_amount_msat: Default::default(), + total_inbound_liquidity_msats: Default::default(), + } + } + } + impl Default for wire_cst_node_state { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_onchain_payment_limits_response { + fn new_with_null_ptr() -> Self { + Self { + min_sat: Default::default(), + max_sat: Default::default(), + max_payable_sat: Default::default(), + } + } + } + impl Default for wire_cst_onchain_payment_limits_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_open_channel_fee_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_open_channel_fee_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_open_channel_fee_response { + fn new_with_null_ptr() -> Self { + Self { + fee_msat: core::ptr::null_mut(), + fee_params: Default::default(), + } + } + } + impl Default for wire_cst_open_channel_fee_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_opening_fee_params { + fn new_with_null_ptr() -> Self { + Self { + min_msat: Default::default(), + proportional: Default::default(), + valid_until: core::ptr::null_mut(), + max_idle_time: Default::default(), + max_client_to_self_delay: Default::default(), + promise: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_opening_fee_params { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_opening_fee_params_menu { + fn new_with_null_ptr() -> Self { + Self { + values: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_opening_fee_params_menu { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_pay_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + recipient_address: core::ptr::null_mut(), + prepare_res: Default::default(), + } + } + } + impl Default for wire_cst_pay_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_pay_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } + } + impl Default for wire_cst_pay_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + payment_type: Default::default(), + payment_time: Default::default(), + amount_msat: Default::default(), + fee_msat: Default::default(), + status: Default::default(), + error: core::ptr::null_mut(), + description: core::ptr::null_mut(), + details: Default::default(), + metadata: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_payment { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment_details { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PaymentDetailsKind { nil__: () }, + } + } + } + impl Default for wire_cst_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + node_id: core::ptr::null_mut(), + invoice: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_payment_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_onchain_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + amount_type: Default::default(), + claim_tx_feerate: Default::default(), + } + } + } + impl Default for wire_cst_prepare_onchain_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_onchain_payment_response { + fn new_with_null_ptr() -> Self { + Self { + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + sender_amount_sat: Default::default(), + recipient_amount_sat: Default::default(), + total_fees: Default::default(), + } + } + } + impl Default for wire_cst_prepare_onchain_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_prepare_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + tx_weight: Default::default(), + tx_fee_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_prepare_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_weight: Default::default(), + refund_tx_fee_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_rate { + fn new_with_null_ptr() -> Self { + Self { + coin: core::ptr::null_mut(), + value: Default::default(), + } + } + } + impl Default for wire_cst_rate { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + opening_fee_params: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: Default::default(), + description: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + use_description_hash: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + cltv: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_payment_response { + fn new_with_null_ptr() -> Self { + Self { + ln_invoice: Default::default(), + opening_fee_params: core::ptr::null_mut(), + opening_fee_msat: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_recommended_fees { + fn new_with_null_ptr() -> Self { + Self { + fastest_fee: Default::default(), + half_hour_fee: Default::default(), + hour_fee: Default::default(), + economy_fee: Default::default(), + minimum_fee: Default::default(), + } + } + } + impl Default for wire_cst_recommended_fees { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_id: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_report_issue_request { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ReportIssueRequestKind { nil__: () }, + } + } + } + impl Default for wire_cst_report_issue_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_report_payment_failure_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + comment: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_report_payment_failure_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_fees_request { + fn new_with_null_ptr() -> Self { + Self { + send_amount_sat: core::ptr::null_mut(), + claim_tx_feerate: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_reverse_swap_fees_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_info { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + claim_pubkey: core::ptr::null_mut(), + lockup_txid: core::ptr::null_mut(), + claim_txid: core::ptr::null_mut(), + onchain_amount_sat: Default::default(), + status: Default::default(), + } + } + } + impl Default for wire_cst_reverse_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_pair_info { + fn new_with_null_ptr() -> Self { + Self { + min: Default::default(), + max: Default::default(), + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + total_fees: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_reverse_swap_pair_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_route_hint { + fn new_with_null_ptr() -> Self { + Self { + hops: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_route_hint { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_route_hint_hop { + fn new_with_null_ptr() -> Self { + Self { + src_node_id: core::ptr::null_mut(), + short_channel_id: core::ptr::null_mut(), + fees_base_msat: Default::default(), + fees_proportional_millionths: Default::default(), + cltv_expiry_delta: Default::default(), + htlc_minimum_msat: core::ptr::null_mut(), + htlc_maximum_msat: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_route_hint_hop { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + onchain_recipient_address: core::ptr::null_mut(), + pair_hash: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_send_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } + } + impl Default for wire_cst_send_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_payment_request { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + use_trampoline: Default::default(), + amount_msat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_send_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_payment_response { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + } + } + } + impl Default for wire_cst_send_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_spontaneous_payment_request { + fn new_with_null_ptr() -> Self { + Self { + node_id: core::ptr::null_mut(), + amount_msat: Default::default(), + extra_tlvs: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_send_spontaneous_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_service_health_check_response { + fn new_with_null_ptr() -> Self { + Self { + status: Default::default(), + } + } + } + impl Default for wire_cst_service_health_check_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sign_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_sign_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sign_message_response { + fn new_with_null_ptr() -> Self { + Self { + signature: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_sign_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_static_backup_request { + fn new_with_null_ptr() -> Self { + Self { + working_dir: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_static_backup_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_static_backup_response { + fn new_with_null_ptr() -> Self { + Self { + backup: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_static_backup_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_success_action_processed { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SuccessActionProcessedKind { nil__: () }, + } + } + } + impl Default for wire_cst_success_action_processed { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_swap_info { + fn new_with_null_ptr() -> Self { + Self { + bitcoin_address: core::ptr::null_mut(), + created_at: Default::default(), + lock_height: Default::default(), + payment_hash: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + private_key: core::ptr::null_mut(), + public_key: core::ptr::null_mut(), + swapper_public_key: core::ptr::null_mut(), + script: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + paid_msat: Default::default(), + total_incoming_txs: Default::default(), + confirmed_sats: Default::default(), + unconfirmed_sats: Default::default(), + status: Default::default(), + refund_tx_ids: core::ptr::null_mut(), + unconfirmed_tx_ids: core::ptr::null_mut(), + confirmed_tx_ids: core::ptr::null_mut(), + min_allowed_deposit: Default::default(), + max_allowed_deposit: Default::default(), + max_swapper_payable: Default::default(), + last_redeem_error: core::ptr::null_mut(), + channel_opening_fees: core::ptr::null_mut(), + confirmed_at: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_symbol { + fn new_with_null_ptr() -> Self { + Self { + grapheme: core::ptr::null_mut(), + template: core::ptr::null_mut(), + rtl: core::ptr::null_mut(), + position: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_symbol { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_tlv_entry { + fn new_with_null_ptr() -> Self { + Self { + field_number: Default::default(), + value: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_tlv_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_unspent_transaction_output { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + outnum: Default::default(), + amount_millisatoshi: Default::default(), + address: core::ptr::null_mut(), + reserved: Default::default(), + } + } + } + impl Default for wire_cst_unspent_transaction_output { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_url_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + url: core::ptr::null_mut(), + matches_callback_domain: Default::default(), + } + } + } + impl Default for wire_cst_url_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup(port_: i64) { + wire__crate__binding__backup_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup_status(port_: i64) { + wire__crate__binding__backup_status_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event( + port_: i64, + that: *mut wire_cst_binding_event_listener, + e: *mut wire_cst_breez_event, + ) { + wire__crate__binding__binding_event_listener_on_event_impl(port_, that, e) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_events_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__breez_events_stream_impl(port_, s) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_log_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__breez_log_stream_impl(port_, s) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__buy_bitcoin( + port_: i64, + req: *mut wire_cst_buy_bitcoin_request, + ) { + wire__crate__binding__buy_bitcoin_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__check_message( + port_: i64, + req: *mut wire_cst_check_message_request, + ) { + wire__crate__binding__check_message_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap( + port_: i64, + lockup_address: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__claim_reverse_swap_impl(port_, lockup_address) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(port_: i64) { + wire__crate__binding__close_lsp_channels_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__configure_node( + port_: i64, + req: *mut wire_cst_configure_node_request, + ) { + wire__crate__binding__configure_node_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect( + port_: i64, + req: *mut wire_cst_connect_request, + ) { + wire__crate__binding__connect_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect_lsp( + port_: i64, + lsp_id: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__connect_lsp_impl(port_, lsp_id) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__default_config( + port_: i64, + env_type: i32, + api_key: *mut wire_cst_list_prim_u_8_strict, + node_config: *mut wire_cst_node_config, + ) { + wire__crate__binding__default_config_impl(port_, env_type, api_key, node_config) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__disconnect(port_: i64) { + wire__crate__binding__disconnect_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__execute_command( + port_: i64, + command: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__execute_command_impl(port_, command) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates(port_: i64) { + wire__crate__binding__fetch_fiat_rates_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info( + port_: i64, + id: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__fetch_lsp_info_impl(port_, id) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees( + port_: i64, + req: *mut wire_cst_reverse_swap_fees_request, + ) { + wire__crate__binding__fetch_reverse_swap_fees_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data(port_: i64) { + wire__crate__binding__generate_diagnostic_data_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments( + port_: i64, + ) { + wire__crate__binding__in_progress_onchain_payments_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(port_: i64) { + wire__crate__binding__in_progress_reverse_swaps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_swap(port_: i64) { + wire__crate__binding__in_progress_swap_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__is_initialized(port_: i64) { + wire__crate__binding__is_initialized_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(port_: i64) { + wire__crate__binding__list_fiat_currencies_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_lsps(port_: i64) { + wire__crate__binding__list_lsps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_payments( + port_: i64, + req: *mut wire_cst_list_payments_request, + ) { + wire__crate__binding__list_payments_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_refundables(port_: i64) { + wire__crate__binding__list_refundables_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_auth( + port_: i64, + req_data: *mut wire_cst_ln_url_auth_request_data, + ) { + wire__crate__binding__lnurl_auth_impl(port_, req_data) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_pay( + port_: i64, + req: *mut wire_cst_ln_url_pay_request, + ) { + wire__crate__binding__lnurl_pay_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw( + port_: i64, + req: *mut wire_cst_ln_url_withdraw_request, + ) { + wire__crate__binding__lnurl_withdraw_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_id(port_: i64) { + wire__crate__binding__lsp_id_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_info(port_: i64) { + wire__crate__binding__lsp_info_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount(port_: i64) { + wire__crate__binding__max_reverse_swap_amount_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed( + port_: i64, + phrase: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__mnemonic_to_seed_impl(port_, phrase) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_credentials(port_: i64) { + wire__crate__binding__node_credentials_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_info(port_: i64) { + wire__crate__binding__node_info_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(port_: i64) { + wire__crate__binding__onchain_payment_limits_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__open_channel_fee( + port_: i64, + req: *mut wire_cst_open_channel_fee_request, + ) { + wire__crate__binding__open_channel_fee_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_input( + port_: i64, + input: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__parse_input_impl(port_, input) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_invoice( + port_: i64, + invoice: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__parse_invoice_impl(port_, invoice) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__pay_onchain( + port_: i64, + req: *mut wire_cst_pay_onchain_request, + ) { + wire__crate__binding__pay_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__payment_by_hash( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__payment_by_hash_impl(port_, hash) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment( + port_: i64, + req: *mut wire_cst_prepare_onchain_payment_request, + ) { + wire__crate__binding__prepare_onchain_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_prepare_redeem_onchain_funds_request, + ) { + wire__crate__binding__prepare_redeem_onchain_funds_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_refund( + port_: i64, + req: *mut wire_cst_prepare_refund_request, + ) { + wire__crate__binding__prepare_refund_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_onchain( + port_: i64, + req: *mut wire_cst_receive_onchain_request, + ) { + wire__crate__binding__receive_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_payment( + port_: i64, + req: *mut wire_cst_receive_payment_request, + ) { + wire__crate__binding__receive_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__recommended_fees(port_: i64) { + wire__crate__binding__recommended_fees_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_redeem_onchain_funds_request, + ) { + wire__crate__binding__redeem_onchain_funds_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_swap( + port_: i64, + swap_address: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__redeem_swap_impl(port_, swap_address) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__refund( + port_: i64, + req: *mut wire_cst_refund_request, + ) { + wire__crate__binding__refund_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__register_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__register_webhook_impl(port_, webhook_url) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__report_issue( + port_: i64, + req: *mut wire_cst_report_issue_request, + ) { + wire__crate__binding__report_issue_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__rescan_swaps(port_: i64) { + wire__crate__binding__rescan_swaps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_onchain( + port_: i64, + req: *mut wire_cst_send_onchain_request, + ) { + wire__crate__binding__send_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_payment( + port_: i64, + req: *mut wire_cst_send_payment_request, + ) { + wire__crate__binding__send_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment( + port_: i64, + req: *mut wire_cst_send_spontaneous_payment_request, + ) { + wire__crate__binding__send_spontaneous_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__service_health_check( + port_: i64, + api_key: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__service_health_check_impl(port_, api_key) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__set_payment_metadata( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, + metadata: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__set_payment_metadata_impl(port_, hash, metadata) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sign_message( + port_: i64, + req: *mut wire_cst_sign_message_request, + ) { + wire__crate__binding__sign_message_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__static_backup( + port_: i64, + req: *mut wire_cst_static_backup_request, + ) { + wire__crate__binding__static_backup_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sync(port_: i64) { + wire__crate__binding__sync_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__unregister_webhook_impl(port_, webhook_url) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( + ) -> *mut wire_cst_aes_success_action_data_decrypted { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_decrypted::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result( + ) -> *mut wire_cst_aes_success_action_data_result { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_result::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data( + ) -> *mut wire_cst_backup_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_backup_failed_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener( + ) -> *mut wire_cst_binding_event_listener { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_binding_event_listener::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data( + ) -> *mut wire_cst_bitcoin_address_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bitcoin_address_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bool(value: bool) -> *mut bool { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_breez_event() -> *mut wire_cst_breez_event + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_breez_event::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request( + ) -> *mut wire_cst_buy_bitcoin_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_buy_bitcoin_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_check_message_request( + ) -> *mut wire_cst_check_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_check_message_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details( + ) -> *mut wire_cst_closed_channel_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_closed_channel_payment_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request( + ) -> *mut wire_cst_configure_node_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_configure_node_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_connect_request( + ) -> *mut wire_cst_connect_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_connect_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials( + ) -> *mut wire_cst_greenlight_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials( + ) -> *mut wire_cst_greenlight_device_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_device_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config( + ) -> *mut wire_cst_greenlight_node_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_node_config::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_i_64(value: i64) -> *mut i64 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details( + ) -> *mut wire_cst_invoice_paid_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_invoice_paid_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request( + ) -> *mut wire_cst_list_payments_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_list_payments_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice() -> *mut wire_cst_ln_invoice + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_invoice::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details( + ) -> *mut wire_cst_ln_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_payment_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data( + ) -> *mut wire_cst_ln_url_auth_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_auth_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data( + ) -> *mut wire_cst_ln_url_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_error_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data( + ) -> *mut wire_cst_ln_url_pay_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_error_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request( + ) -> *mut wire_cst_ln_url_pay_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data( + ) -> *mut wire_cst_ln_url_pay_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data( + ) -> *mut wire_cst_ln_url_pay_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_success_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request( + ) -> *mut wire_cst_ln_url_withdraw_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data( + ) -> *mut wire_cst_ln_url_withdraw_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data( + ) -> *mut wire_cst_ln_url_withdraw_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_success_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_lsp_information( + ) -> *mut wire_cst_lsp_information { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_lsp_information::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data( + ) -> *mut wire_cst_message_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_message_success_action_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_config() -> *mut wire_cst_node_config + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_node_config::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_credentials( + ) -> *mut wire_cst_node_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_node_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request( + ) -> *mut wire_cst_open_channel_fee_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_open_channel_fee_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params( + ) -> *mut wire_cst_opening_fee_params { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_opening_fee_params::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request( + ) -> *mut wire_cst_pay_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_pay_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment() -> *mut wire_cst_payment { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_payment::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data( + ) -> *mut wire_cst_payment_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_payment_failed_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request( + ) -> *mut wire_cst_prepare_onchain_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_onchain_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request( + ) -> *mut wire_cst_prepare_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_redeem_onchain_funds_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request( + ) -> *mut wire_cst_prepare_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_refund_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request( + ) -> *mut wire_cst_receive_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request( + ) -> *mut wire_cst_receive_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request( + ) -> *mut wire_cst_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_redeem_onchain_funds_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_refund_request( + ) -> *mut wire_cst_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_refund_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request( + ) -> *mut wire_cst_report_issue_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_issue_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details( + ) -> *mut wire_cst_report_payment_failure_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_payment_failure_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request( + ) -> *mut wire_cst_reverse_swap_fees_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_fees_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info( + ) -> *mut wire_cst_reverse_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_info::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request( + ) -> *mut wire_cst_send_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request( + ) -> *mut wire_cst_send_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request( + ) -> *mut wire_cst_send_spontaneous_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_spontaneous_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request( + ) -> *mut wire_cst_sign_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_sign_message_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request( + ) -> *mut wire_cst_static_backup_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_static_backup_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed( + ) -> *mut wire_cst_success_action_processed { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_success_action_processed::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_swap_info() -> *mut wire_cst_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_swap_info::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_symbol() -> *mut wire_cst_symbol { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_symbol::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_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_breez_sdk_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_breez_sdk_cst_new_box_autoadd_url_success_action_data( + ) -> *mut wire_cst_url_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_url_success_action_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_String(len: i32) -> *mut wire_cst_list_String { + let wrap = wire_cst_list_String { + 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_breez_sdk_cst_new_list_fiat_currency( + len: i32, + ) -> *mut wire_cst_list_fiat_currency { + let wrap = wire_cst_list_fiat_currency { + 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_breez_sdk_cst_new_list_locale_overrides( + len: i32, + ) -> *mut wire_cst_list_locale_overrides { + let wrap = wire_cst_list_locale_overrides { + 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_breez_sdk_cst_new_list_localized_name( + len: i32, + ) -> *mut wire_cst_list_localized_name { + let wrap = wire_cst_list_localized_name { + 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_breez_sdk_cst_new_list_lsp_information( + len: i32, + ) -> *mut wire_cst_list_lsp_information { + let wrap = wire_cst_list_lsp_information { + 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_breez_sdk_cst_new_list_metadata_filter( + len: i32, + ) -> *mut wire_cst_list_metadata_filter { + let wrap = wire_cst_list_metadata_filter { + 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_breez_sdk_cst_new_list_opening_fee_params( + len: i32, + ) -> *mut wire_cst_list_opening_fee_params { + let wrap = wire_cst_list_opening_fee_params { + 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_breez_sdk_cst_new_list_payment( + len: i32, + ) -> *mut wire_cst_list_payment { + let wrap = wire_cst_list_payment { + 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_breez_sdk_cst_new_list_payment_type_filter( + len: i32, + ) -> *mut wire_cst_list_payment_type_filter { + let wrap = wire_cst_list_payment_type_filter { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_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_breez_sdk_cst_new_list_rate(len: i32) -> *mut wire_cst_list_rate { + let wrap = wire_cst_list_rate { + 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_breez_sdk_cst_new_list_reverse_swap_info( + len: i32, + ) -> *mut wire_cst_list_reverse_swap_info { + let wrap = wire_cst_list_reverse_swap_info { + 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_breez_sdk_cst_new_list_route_hint( + len: i32, + ) -> *mut wire_cst_list_route_hint { + let wrap = wire_cst_list_route_hint { + 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_breez_sdk_cst_new_list_route_hint_hop( + len: i32, + ) -> *mut wire_cst_list_route_hint_hop { + let wrap = wire_cst_list_route_hint_hop { + 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_breez_sdk_cst_new_list_swap_info( + len: i32, + ) -> *mut wire_cst_list_swap_info { + let wrap = wire_cst_list_swap_info { + 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_breez_sdk_cst_new_list_tlv_entry( + len: i32, + ) -> *mut wire_cst_list_tlv_entry { + let wrap = wire_cst_list_tlv_entry { + 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_breez_sdk_cst_new_list_unspent_transaction_output( + len: i32, + ) -> *mut wire_cst_list_unspent_transaction_output { + let wrap = wire_cst_list_unspent_transaction_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) + } + + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_aes_success_action_data_decrypted { + description: *mut wire_cst_list_prim_u_8_strict, + plaintext: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_aes_success_action_data_result { + tag: i32, + kind: AesSuccessActionDataResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union AesSuccessActionDataResultKind { + Decrypted: wire_cst_AesSuccessActionDataResult_Decrypted, + ErrorStatus: wire_cst_AesSuccessActionDataResult_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AesSuccessActionDataResult_Decrypted { + data: *mut wire_cst_aes_success_action_data_decrypted, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AesSuccessActionDataResult_ErrorStatus { + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_backup_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_backup_status { + backed_up: bool, + last_backup_time: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_binding_event_listener {} + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_bitcoin_address_data { + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, + amount_sat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_breez_event { + tag: i32, + kind: BreezEventKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union BreezEventKind { + NewBlock: wire_cst_BreezEvent_NewBlock, + InvoicePaid: wire_cst_BreezEvent_InvoicePaid, + PaymentSucceed: wire_cst_BreezEvent_PaymentSucceed, + PaymentFailed: wire_cst_BreezEvent_PaymentFailed, + BackupFailed: wire_cst_BreezEvent_BackupFailed, + ReverseSwapUpdated: wire_cst_BreezEvent_ReverseSwapUpdated, + SwapUpdated: wire_cst_BreezEvent_SwapUpdated, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_NewBlock { + block: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_InvoicePaid { + details: *mut wire_cst_invoice_paid_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_PaymentSucceed { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_PaymentFailed { + details: *mut wire_cst_payment_failed_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_BackupFailed { + details: *mut wire_cst_backup_failed_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_ReverseSwapUpdated { + details: *mut wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_SwapUpdated { + details: *mut wire_cst_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_buy_bitcoin_request { + provider: i32, + opening_fee_params: *mut wire_cst_opening_fee_params, + redirect_url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_buy_bitcoin_response { + url: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_check_message_request { + message: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + signature: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_check_message_response { + is_valid: bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_closed_channel_payment_details { + state: i32, + funding_txid: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: *mut wire_cst_list_prim_u_8_strict, + closing_txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_config { + breezserver: *mut wire_cst_list_prim_u_8_strict, + chainnotifier_url: *mut wire_cst_list_prim_u_8_strict, + mempoolspace_url: *mut wire_cst_list_prim_u_8_strict, + working_dir: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payment_timeout_sec: u32, + default_lsp_id: *mut wire_cst_list_prim_u_8_strict, + api_key: *mut wire_cst_list_prim_u_8_strict, + maxfee_percent: f64, + exemptfee_msat: u64, + node_config: wire_cst_node_config, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_configure_node_request { + close_to_address: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_connect_request { + config: wire_cst_config, + seed: *mut wire_cst_list_prim_u_8_strict, + restore_only: *mut bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_currency_info { + name: *mut wire_cst_list_prim_u_8_strict, + fraction_size: u32, + spacing: *mut u32, + symbol: *mut wire_cst_symbol, + uniq_symbol: *mut wire_cst_symbol, + localized_name: *mut wire_cst_list_localized_name, + locale_overrides: *mut wire_cst_list_locale_overrides, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_fiat_currency { + id: *mut wire_cst_list_prim_u_8_strict, + info: wire_cst_currency_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_credentials { + developer_key: *mut wire_cst_list_prim_u_8_strict, + developer_cert: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_device_credentials { + device: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_node_config { + partner_credentials: *mut wire_cst_greenlight_credentials, + invite_code: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_input_type { + tag: i32, + kind: InputTypeKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union InputTypeKind { + BitcoinAddress: wire_cst_InputType_BitcoinAddress, + Bolt11: wire_cst_InputType_Bolt11, + NodeId: wire_cst_InputType_NodeId, + Url: wire_cst_InputType_Url, + LnUrlPay: wire_cst_InputType_LnUrlPay, + LnUrlWithdraw: wire_cst_InputType_LnUrlWithdraw, + LnUrlAuth: wire_cst_InputType_LnUrlAuth, + LnUrlError: wire_cst_InputType_LnUrlError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_BitcoinAddress { + address: *mut wire_cst_bitcoin_address_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_Bolt11 { + invoice: *mut wire_cst_ln_invoice, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_NodeId { + node_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_Url { + url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlPay { + data: *mut wire_cst_ln_url_pay_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlWithdraw { + data: *mut wire_cst_ln_url_withdraw_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlAuth { + data: *mut wire_cst_ln_url_auth_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlError { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_invoice_paid_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + payment: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_String { + ptr: *mut *mut wire_cst_list_prim_u_8_strict, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_fiat_currency { + ptr: *mut wire_cst_fiat_currency, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_locale_overrides { + ptr: *mut wire_cst_locale_overrides, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_localized_name { + ptr: *mut wire_cst_localized_name, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_lsp_information { + ptr: *mut wire_cst_lsp_information, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_metadata_filter { + ptr: *mut wire_cst_metadata_filter, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_opening_fee_params { + ptr: *mut wire_cst_opening_fee_params, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payment { + ptr: *mut wire_cst_payment, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payment_type_filter { + ptr: *mut i32, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payments_request { + filters: *mut wire_cst_list_payment_type_filter, + metadata_filters: *mut wire_cst_list_metadata_filter, + from_timestamp: *mut i64, + to_timestamp: *mut i64, + include_failures: *mut bool, + offset: *mut u32, + limit: *mut u32, + } + #[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_rate { + ptr: *mut wire_cst_rate, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_reverse_swap_info { + ptr: *mut wire_cst_reverse_swap_info, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_route_hint { + ptr: *mut wire_cst_route_hint, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_route_hint_hop { + ptr: *mut wire_cst_route_hint_hop, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_swap_info { + ptr: *mut wire_cst_swap_info, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_tlv_entry { + ptr: *mut wire_cst_tlv_entry, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_unspent_transaction_output { + ptr: *mut wire_cst_unspent_transaction_output, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_invoice { + bolt11: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payee_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + description_hash: *mut wire_cst_list_prim_u_8_strict, + amount_msat: *mut u64, + timestamp: u64, + expiry: u64, + routing_hints: *mut wire_cst_list_route_hint, + payment_secret: *mut wire_cst_list_prim_u_8_strict, + min_final_cltv_expiry_delta: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_payment_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + label: *mut wire_cst_list_prim_u_8_strict, + destination_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_preimage: *mut wire_cst_list_prim_u_8_strict, + keysend: bool, + bolt11: *mut wire_cst_list_prim_u_8_strict, + open_channel_bolt11: *mut wire_cst_list_prim_u_8_strict, + lnurl_success_action: *mut wire_cst_success_action_processed, + lnurl_pay_domain: *mut wire_cst_list_prim_u_8_strict, + lnurl_pay_comment: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + lnurl_metadata: *mut wire_cst_list_prim_u_8_strict, + lnurl_withdraw_endpoint: *mut wire_cst_list_prim_u_8_strict, + swap_info: *mut wire_cst_swap_info, + reverse_swap_info: *mut wire_cst_reverse_swap_info, + pending_expiration_block: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_auth_request_data { + k1: *mut wire_cst_list_prim_u_8_strict, + action: *mut wire_cst_list_prim_u_8_strict, + domain: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_callback_status { + tag: i32, + kind: LnUrlCallbackStatusKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlCallbackStatusKind { + ErrorStatus: wire_cst_LnUrlCallbackStatus_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlCallbackStatus_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_error_data { + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_error_data { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_request { + data: wire_cst_ln_url_pay_request_data, + amount_msat: u64, + use_trampoline: bool, + comment: *mut wire_cst_list_prim_u_8_strict, + payment_label: *mut wire_cst_list_prim_u_8_strict, + validate_success_action_url: *mut bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + min_sendable: u64, + max_sendable: u64, + metadata_str: *mut wire_cst_list_prim_u_8_strict, + comment_allowed: u16, + domain: *mut wire_cst_list_prim_u_8_strict, + allows_nostr: bool, + nostr_pubkey: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_result { + tag: i32, + kind: LnUrlPayResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlPayResultKind { + EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, + EndpointError: wire_cst_LnUrlPayResult_EndpointError, + PayError: wire_cst_LnUrlPayResult_PayError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointSuccess { + data: *mut wire_cst_ln_url_pay_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointError { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_PayError { + data: *mut wire_cst_ln_url_pay_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_success_data { + payment: wire_cst_payment, + success_action: *mut wire_cst_success_action_processed, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request { + data: wire_cst_ln_url_withdraw_request_data, + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + k1: *mut wire_cst_list_prim_u_8_strict, + default_description: *mut wire_cst_list_prim_u_8_strict, + min_withdrawable: u64, + max_withdrawable: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_result { + tag: i32, + kind: LnUrlWithdrawResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlWithdrawResultKind { + Ok: wire_cst_LnUrlWithdrawResult_Ok, + Timeout: wire_cst_LnUrlWithdrawResult_Timeout, + ErrorStatus: wire_cst_LnUrlWithdrawResult_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Ok { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Timeout { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_success_data { + invoice: wire_cst_ln_invoice, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_locale_overrides { + locale: *mut wire_cst_list_prim_u_8_strict, + spacing: *mut u32, + symbol: wire_cst_symbol, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_localized_name { + locale: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_log_entry { + line: *mut wire_cst_list_prim_u_8_strict, + level: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_lsp_information { + id: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + widget_url: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + host: *mut wire_cst_list_prim_u_8_strict, + base_fee_msat: i64, + fee_rate: f64, + time_lock_delta: u32, + min_htlc_msat: i64, + lsp_pubkey: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params_list: wire_cst_opening_fee_params_menu, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_max_reverse_swap_amount_response { + total_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_message_success_action_data { + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_metadata_filter { + json_path: *mut wire_cst_list_prim_u_8_strict, + json_value: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_config { + tag: i32, + kind: NodeConfigKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union NodeConfigKind { + Greenlight: wire_cst_NodeConfig_Greenlight, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_NodeConfig_Greenlight { + config: *mut wire_cst_greenlight_node_config, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_credentials { + tag: i32, + kind: NodeCredentialsKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union NodeCredentialsKind { + Greenlight: wire_cst_NodeCredentials_Greenlight, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_NodeCredentials_Greenlight { + credentials: *mut wire_cst_greenlight_device_credentials, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_state { + id: *mut wire_cst_list_prim_u_8_strict, + block_height: u32, + channels_balance_msat: u64, + onchain_balance_msat: u64, + pending_onchain_balance_msat: u64, + utxos: *mut wire_cst_list_unspent_transaction_output, + max_payable_msat: u64, + max_receivable_msat: u64, + max_single_payment_amount_msat: u64, + max_chan_reserve_msats: u64, + connected_peers: *mut wire_cst_list_String, + max_receivable_single_payment_amount_msat: u64, + total_inbound_liquidity_msats: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_onchain_payment_limits_response { + min_sat: u64, + max_sat: u64, + max_payable_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_open_channel_fee_request { + amount_msat: *mut u64, + expiry: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_open_channel_fee_response { + fee_msat: *mut u64, + fee_params: wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_opening_fee_params { + min_msat: u64, + proportional: u32, + valid_until: *mut wire_cst_list_prim_u_8_strict, + max_idle_time: u32, + max_client_to_self_delay: u32, + promise: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_opening_fee_params_menu { + values: *mut wire_cst_list_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_pay_onchain_request { + recipient_address: *mut wire_cst_list_prim_u_8_strict, + prepare_res: wire_cst_prepare_onchain_payment_response, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_pay_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment { + id: *mut wire_cst_list_prim_u_8_strict, + payment_type: i32, + payment_time: i64, + amount_msat: u64, + fee_msat: u64, + status: i32, + error: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + details: wire_cst_payment_details, + metadata: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment_details { + tag: i32, + kind: PaymentDetailsKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union PaymentDetailsKind { + Ln: wire_cst_PaymentDetails_Ln, + ClosedChannel: wire_cst_PaymentDetails_ClosedChannel, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentDetails_Ln { + data: *mut wire_cst_ln_payment_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentDetails_ClosedChannel { + data: *mut wire_cst_closed_channel_payment_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, + node_id: *mut wire_cst_list_prim_u_8_strict, + invoice: *mut wire_cst_ln_invoice, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_onchain_payment_request { + amount_sat: u64, + amount_type: i32, + claim_tx_feerate: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_onchain_payment_response { + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + sender_amount_sat: u64, + recipient_amount_sat: u64, + total_fees: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_redeem_onchain_funds_response { + tx_weight: u64, + tx_fee_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_refund_response { + refund_tx_weight: u32, + refund_tx_fee_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_rate { + coin: *mut wire_cst_list_prim_u_8_strict, + value: f64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_onchain_request { + opening_fee_params: *mut wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_request { + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, + use_description_hash: *mut bool, + expiry: *mut u32, + cltv: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_response { + ln_invoice: wire_cst_ln_invoice, + opening_fee_params: *mut wire_cst_opening_fee_params, + opening_fee_msat: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_recommended_fees { + fastest_fee: u64, + half_hour_fee: u64, + hour_fee: u64, + economy_fee: u64, + minimum_fee: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_redeem_onchain_funds_response { + txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_refund_response { + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_report_issue_request { + tag: i32, + kind: ReportIssueRequestKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union ReportIssueRequestKind { + PaymentFailure: wire_cst_ReportIssueRequest_PaymentFailure, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ReportIssueRequest_PaymentFailure { + data: *mut wire_cst_report_payment_failure_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_report_payment_failure_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + comment: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_fees_request { + send_amount_sat: *mut u64, + claim_tx_feerate: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_info { + id: *mut wire_cst_list_prim_u_8_strict, + claim_pubkey: *mut wire_cst_list_prim_u_8_strict, + lockup_txid: *mut wire_cst_list_prim_u_8_strict, + claim_txid: *mut wire_cst_list_prim_u_8_strict, + onchain_amount_sat: u64, + status: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_pair_info { + min: u64, + max: u64, + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + total_fees: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_route_hint { + hops: *mut wire_cst_list_route_hint_hop, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_route_hint_hop { + src_node_id: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: *mut wire_cst_list_prim_u_8_strict, + fees_base_msat: u32, + fees_proportional_millionths: u32, + cltv_expiry_delta: u64, + htlc_minimum_msat: *mut u64, + htlc_maximum_msat: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_onchain_request { + amount_sat: u64, + onchain_recipient_address: *mut wire_cst_list_prim_u_8_strict, + pair_hash: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_payment_request { + bolt11: *mut wire_cst_list_prim_u_8_strict, + use_trampoline: bool, + amount_msat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_payment_response { + payment: wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_spontaneous_payment_request { + node_id: *mut wire_cst_list_prim_u_8_strict, + amount_msat: u64, + extra_tlvs: *mut wire_cst_list_tlv_entry, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_service_health_check_response { + status: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sign_message_request { + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sign_message_response { + signature: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_static_backup_request { + working_dir: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_static_backup_response { + backup: *mut wire_cst_list_String, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_success_action_processed { + tag: i32, + kind: SuccessActionProcessedKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SuccessActionProcessedKind { + Aes: wire_cst_SuccessActionProcessed_Aes, + Message: wire_cst_SuccessActionProcessed_Message, + Url: wire_cst_SuccessActionProcessed_Url, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Aes { + result: *mut wire_cst_aes_success_action_data_result, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Message { + data: *mut wire_cst_message_success_action_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Url { + data: *mut wire_cst_url_success_action_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_swap_info { + bitcoin_address: *mut wire_cst_list_prim_u_8_strict, + created_at: i64, + lock_height: i64, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + private_key: *mut wire_cst_list_prim_u_8_strict, + public_key: *mut wire_cst_list_prim_u_8_strict, + swapper_public_key: *mut wire_cst_list_prim_u_8_strict, + script: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + paid_msat: u64, + total_incoming_txs: u64, + confirmed_sats: u64, + unconfirmed_sats: u64, + status: i32, + refund_tx_ids: *mut wire_cst_list_String, + unconfirmed_tx_ids: *mut wire_cst_list_String, + confirmed_tx_ids: *mut wire_cst_list_String, + min_allowed_deposit: i64, + max_allowed_deposit: i64, + max_swapper_payable: i64, + last_redeem_error: *mut wire_cst_list_prim_u_8_strict, + channel_opening_fees: *mut wire_cst_opening_fee_params, + confirmed_at: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_symbol { + grapheme: *mut wire_cst_list_prim_u_8_strict, + template: *mut wire_cst_list_prim_u_8_strict, + rtl: *mut bool, + position: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_tlv_entry { + field_number: u64, + value: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_unspent_transaction_output { + txid: *mut wire_cst_list_prim_u_8_strict, + outnum: u32, + amount_millisatoshi: u64, + address: *mut wire_cst_list_prim_u_8_strict, + reserved: bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_url_success_action_data { + description: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, + matches_callback_domain: bool, + } +} #[cfg(not(target_family = "wasm"))] pub use io::*; diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index 7d656c553..2c557b1bc 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -178,7 +178,6 @@ mod lsps0; /// flutter_rust_bridge:ignore mod lsps2; mod models; -mod moonpay; mod persist; mod serializer; mod support; diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index a3765a58e..47e48cd62 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -77,6 +77,7 @@ typedef struct wire_cst_SuccessActionProcessed_Message { typedef struct wire_cst_url_success_action_data { struct wire_cst_list_prim_u_8_strict *description; struct wire_cst_list_prim_u_8_strict *url; + bool matches_callback_domain; } wire_cst_url_success_action_data; typedef struct wire_cst_SuccessActionProcessed_Url { @@ -217,7 +218,7 @@ typedef struct wire_cst_BreezEvent_PaymentSucceed { typedef struct wire_cst_route_hint_hop { struct wire_cst_list_prim_u_8_strict *src_node_id; - uint64_t short_channel_id; + struct wire_cst_list_prim_u_8_strict *short_channel_id; uint32_t fees_base_msat; uint32_t fees_proportional_millionths; uint64_t cltv_expiry_delta; @@ -273,6 +274,10 @@ typedef struct wire_cst_BreezEvent_BackupFailed { struct wire_cst_backup_failed_data *details; } wire_cst_BreezEvent_BackupFailed; +typedef struct wire_cst_BreezEvent_ReverseSwapUpdated { + struct wire_cst_reverse_swap_info *details; +} wire_cst_BreezEvent_ReverseSwapUpdated; + typedef struct wire_cst_BreezEvent_SwapUpdated { struct wire_cst_swap_info *details; } wire_cst_BreezEvent_SwapUpdated; @@ -283,6 +288,7 @@ typedef union BreezEventKind { struct wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; struct wire_cst_BreezEvent_PaymentFailed PaymentFailed; struct wire_cst_BreezEvent_BackupFailed BackupFailed; + struct wire_cst_BreezEvent_ReverseSwapUpdated ReverseSwapUpdated; struct wire_cst_BreezEvent_SwapUpdated SwapUpdated; } BreezEventKind; @@ -294,6 +300,7 @@ typedef struct wire_cst_breez_event { typedef struct wire_cst_buy_bitcoin_request { int32_t provider; struct wire_cst_opening_fee_params *opening_fee_params; + struct wire_cst_list_prim_u_8_strict *redirect_url; } wire_cst_buy_bitcoin_request; typedef struct wire_cst_check_message_request { @@ -401,8 +408,10 @@ typedef struct wire_cst_ln_url_pay_request_data { typedef struct wire_cst_ln_url_pay_request { struct wire_cst_ln_url_pay_request_data data; uint64_t amount_msat; + bool use_trampoline; struct wire_cst_list_prim_u_8_strict *comment; struct wire_cst_list_prim_u_8_strict *payment_label; + bool *validate_success_action_url; } wire_cst_ln_url_pay_request; typedef struct wire_cst_ln_url_withdraw_request_data { @@ -508,6 +517,7 @@ typedef struct wire_cst_send_onchain_request { typedef struct wire_cst_send_payment_request { struct wire_cst_list_prim_u_8_strict *bolt11; + bool use_trampoline; uint64_t *amount_msat; struct wire_cst_list_prim_u_8_strict *label; } wire_cst_send_payment_request; @@ -796,12 +806,17 @@ typedef struct wire_cst_LnUrlWithdrawResult_Ok { struct wire_cst_ln_url_withdraw_success_data *data; } wire_cst_LnUrlWithdrawResult_Ok; +typedef struct wire_cst_LnUrlWithdrawResult_Timeout { + struct wire_cst_ln_url_withdraw_success_data *data; +} wire_cst_LnUrlWithdrawResult_Timeout; + typedef struct wire_cst_LnUrlWithdrawResult_ErrorStatus { struct wire_cst_ln_url_error_data *data; } wire_cst_LnUrlWithdrawResult_ErrorStatus; typedef union LnUrlWithdrawResultKind { struct wire_cst_LnUrlWithdrawResult_Ok Ok; + struct wire_cst_LnUrlWithdrawResult_Timeout Timeout; struct wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; } LnUrlWithdrawResultKind; @@ -831,12 +846,14 @@ typedef struct wire_cst_node_state { uint64_t max_single_payment_amount_msat; uint64_t max_chan_reserve_msats; struct wire_cst_list_String *connected_peers; - uint64_t inbound_liquidity_msats; + uint64_t max_receivable_single_payment_amount_msat; + uint64_t total_inbound_liquidity_msats; } wire_cst_node_state; typedef struct wire_cst_onchain_payment_limits_response { uint64_t min_sat; uint64_t max_sat; + uint64_t max_payable_sat; } wire_cst_onchain_payment_limits_response; typedef struct wire_cst_open_channel_fee_response { @@ -930,6 +947,9 @@ void frbgen_breez_sdk_wire__crate__binding__buy_bitcoin(int64_t port_, void frbgen_breez_sdk_wire__crate__binding__check_message(int64_t port_, struct wire_cst_check_message_request *req); +void frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap(int64_t port_, + struct wire_cst_list_prim_u_8_strict *lockup_address); + void frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(int64_t port_); void frbgen_breez_sdk_wire__crate__binding__configure_node(int64_t port_, @@ -1317,6 +1337,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_log_stream); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__buy_bitcoin); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__close_lsp_channels); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__configure_node); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect); diff --git a/libs/sdk-flutter/lib/bridge_generated.dart b/libs/sdk-flutter/lib/bridge_generated.dart deleted file mode 100644 index 7ac7d374a..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.dart +++ /dev/null @@ -1,6873 +0,0 @@ -// AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.6. -// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const - -import 'dart:convert'; -import 'dart:async'; -import 'package:meta/meta.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; -import 'package:uuid/uuid.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; - -import 'dart:ffi' as ffi; - -part 'bridge_generated.freezed.dart'; - -abstract class BreezSdkCore { - /// Wrapper around [BreezServices::connect] which also initializes SDK logging - Future connect({required ConnectRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta; - - /// Check whether node service is initialized or not - Future isInitialized({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta; - - /// See [BreezServices::sync] - Future sync({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta; - - /// See [BreezServices::node_credentials] - Future nodeCredentials({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta; - - /// See [BreezServices::node_info] - Future nodeInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta; - - /// See [BreezServices::configure_node] - Future configureNode({required ConfigureNodeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta; - - /// Cleanup node resources and stop the signer. - Future disconnect({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta; - - /// See [BreezServices::sign_message] - Future signMessage({required SignMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta; - - /// See [BreezServices::check_message] - Future checkMessage({required CheckMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta; - - /// See [breez_services::mnemonic_to_seed] - Future mnemonicToSeed({required String phrase, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta; - - /// See [BreezServices::default_config] - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta; - - /// See [BreezServices::static_backup] - Future staticBackup({required StaticBackupRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta; - - /// See [BreezServices::service_health_check] - Future serviceHealthCheck({required String apiKey, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezEventsStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezLogStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta; - - /// See [BreezServices::list_lsps] - Future> listLsps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta; - - /// See [BreezServices::connect_lsp] - Future connectLsp({required String lspId, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta; - - /// See [BreezServices::lsp_id] - Future lspId({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta; - - /// See [BreezServices::fetch_lsp_info] - Future fetchLspInfo({required String id, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta; - - /// See [BreezServices::lsp_info] - Future lspInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta; - - /// See [BreezServices::close_lsp_channels] - Future closeLspChannels({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta; - - Future registerWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta; - - Future unregisterWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta; - - /// See [BreezServices::backup] - Future backup({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta; - - /// See [BreezServices::backup_status] - Future backupStatus({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta; - - Future parseInvoice({required String invoice, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta; - - Future parseInput({required String input, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta; - - /// See [BreezServices::list_payments] - Future> listPayments({required ListPaymentsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta; - - /// See [BreezServices::list_payments] - Future paymentByHash({required String hash, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta; - - /// See [BreezServices::set_payment_metadata] - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta; - - /// See [BreezServices::send_payment] - Future sendPayment({required SendPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta; - - /// See [BreezServices::send_spontaneous_payment] - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta; - - /// See [BreezServices::receive_payment] - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta; - - /// See [BreezServices::lnurl_pay] - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta; - - /// See [BreezServices::lnurl_withdraw] - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta; - - /// See [BreezServices::lnurl_auth] - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta; - - /// See [BreezServices::report_issue] - Future reportIssue({required ReportIssueRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta; - - /// See [BreezServices::fetch_fiat_rates] - Future> fetchFiatRates({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta; - - /// See [BreezServices::list_fiat_currencies] - Future> listFiatCurrencies({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta; - - /// See [BreezServices::max_reverse_swap_amount] - Future maxReverseSwapAmount({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta; - - /// See [BreezServices::send_onchain] - Future sendOnchain({required SendOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta; - - /// See [BreezServices::pay_onchain] - Future payOnchain({required PayOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta; - - /// See [BreezServices::receive_onchain] - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta; - - /// See [BreezServices::buy_bitcoin] - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta; - - /// See [BreezServices::redeem_onchain_funds] - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta; - - /// See [BreezServices::prepare_redeem_onchain_funds] - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta; - - /// See [BreezServices::list_refundables] - Future> listRefundables({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta; - - /// See [BreezServices::prepare_refund] - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta; - - /// See [BreezServices::refund] - Future refund({required RefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta; - - /// See [BreezServices::rescan_swaps] - Future rescanSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta; - - /// See [BreezServices::redeem_swap] - Future redeemSwap({required String swapAddress, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta; - - /// See [BreezServices::in_progress_swap] - Future inProgressSwap({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta; - - /// See [BreezServices::in_progress_reverse_swaps] - Future> inProgressReverseSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta; - - /// See [BreezServices::claim_reverse_swap] - Future claimReverseSwap({required String lockupAddress, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kClaimReverseSwapConstMeta; - - /// See [BreezServices::open_channel_fee] - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta; - - /// See [BreezServices::fetch_reverse_swap_fees] - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta; - - /// See [BreezServices::onchain_payment_limits] - Future onchainPaymentLimits({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta; - - /// See [BreezServices::prepare_onchain_payment] - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta; - - /// See [BreezServices::in_progress_onchain_payments] - Future> inProgressOnchainPayments({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta; - - /// See [BreezServices::recommended_fees] - Future recommendedFees({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta; - - /// See [BreezServices::execute_dev_command] - Future executeCommand({required String command, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta; - - /// See [BreezServices::generate_diagnostic_data] - Future generateDiagnosticData({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta; -} - -class AesSuccessActionDataDecrypted { - final String description; - final String plaintext; - - const AesSuccessActionDataDecrypted({ - required this.description, - required this.plaintext, - }); -} - -@freezed -sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { - const factory AesSuccessActionDataResult.decrypted({ - required AesSuccessActionDataDecrypted data, - }) = AesSuccessActionDataResult_Decrypted; - const factory AesSuccessActionDataResult.errorStatus({ - required String reason, - }) = AesSuccessActionDataResult_ErrorStatus; -} - -class BackupFailedData { - final String error; - - const BackupFailedData({ - required this.error, - }); -} - -class BackupStatus { - final bool backedUp; - - /// Epoch time, in seconds - final int? lastBackupTime; - - const BackupStatus({ - required this.backedUp, - this.lastBackupTime, - }); -} - -class BitcoinAddressData { - final String address; - final Network network; - final int? amountSat; - final String? label; - final String? message; - - const BitcoinAddressData({ - required this.address, - required this.network, - this.amountSat, - this.label, - this.message, - }); -} - -@freezed -sealed class BreezEvent with _$BreezEvent { - /// Indicates that a new block has just been found - const factory BreezEvent.newBlock({ - required int block, - }) = BreezEvent_NewBlock; - - /// Indicates that a new invoice has just been paid - const factory BreezEvent.invoicePaid({ - required InvoicePaidDetails details, - }) = BreezEvent_InvoicePaid; - - /// Indicates that the local SDK state has just been sync-ed with the remote components - const factory BreezEvent.synced() = BreezEvent_Synced; - - /// Indicates that an outgoing payment has been completed successfully - const factory BreezEvent.paymentSucceed({ - required Payment details, - }) = BreezEvent_PaymentSucceed; - - /// Indicates that an outgoing payment has been failed to complete - const factory BreezEvent.paymentFailed({ - required PaymentFailedData details, - }) = BreezEvent_PaymentFailed; - - /// Indicates that the backup process has just started - const factory BreezEvent.backupStarted() = BreezEvent_BackupStarted; - - /// Indicates that the backup process has just finished successfully - const factory BreezEvent.backupSucceeded() = BreezEvent_BackupSucceeded; - - /// Indicates that the backup process has just failed - const factory BreezEvent.backupFailed({ - required BackupFailedData details, - }) = BreezEvent_BackupFailed; - - /// Indicates that a reverse swap has been updated which may also - /// include a status change - const factory BreezEvent.reverseSwapUpdated({ - required ReverseSwapInfo details, - }) = BreezEvent_ReverseSwapUpdated; - - /// Indicates that a swap has been updated which may also - /// include a status change - const factory BreezEvent.swapUpdated({ - required SwapInfo details, - }) = BreezEvent_SwapUpdated; -} - -/// Different providers will demand different behaviours when the user is trying to buy bitcoin. -enum BuyBitcoinProvider { - Moonpay, -} - -class BuyBitcoinRequest { - final BuyBitcoinProvider provider; - final OpeningFeeParams? openingFeeParams; - - /// The optional URL to redirect to after completing the buy. - /// - /// For Moonpay, see - final String? redirectUrl; - - const BuyBitcoinRequest({ - required this.provider, - this.openingFeeParams, - this.redirectUrl, - }); -} - -class BuyBitcoinResponse { - final String url; - final OpeningFeeParams? openingFeeParams; - - const BuyBitcoinResponse({ - required this.url, - this.openingFeeParams, - }); -} - -/// State of a Lightning channel -enum ChannelState { - PendingOpen, - Opened, - PendingClose, - Closed, -} - -/// Request to check a message was signed by a specific node id. -class CheckMessageRequest { - /// The message that was signed. - final String message; - - /// The public key of the node that signed the message. - final String pubkey; - - /// The zbase encoded signature to verify. - final String signature; - - const CheckMessageRequest({ - required this.message, - required this.pubkey, - required this.signature, - }); -} - -/// Response to a [CheckMessageRequest] -class CheckMessageResponse { - /// Boolean value indicating whether the signature covers the message and - /// was signed by the given pubkey. - final bool isValid; - - const CheckMessageResponse({ - required this.isValid, - }); -} - -/// Represents the funds that were on the user side of the channel at the time it was closed. -class ClosedChannelPaymentDetails { - final ChannelState state; - final String fundingTxid; - final String? shortChannelId; - - /// Can be empty for older closed channels. - final String? closingTxid; - - const ClosedChannelPaymentDetails({ - required this.state, - required this.fundingTxid, - this.shortChannelId, - this.closingTxid, - }); -} - -/// Configuration for the Breez Services -/// -/// Use [Config::production] or [Config::staging] for default configs of the different supported -/// environments. -class Config { - final String breezserver; - final String chainnotifierUrl; - - /// If set, this is the mempool.space URL that will be used. - /// - /// If not set, a list of mempool.space URLs will be used to provide fault-tolerance. If calls - /// to the first URL fail, then the call will be repeated to the next URL, and so on. - /// - /// Note that, if specified, the URL has to be in the format: `https://mempool.space/api` - final String? mempoolspaceUrl; - - /// Directory in which all SDK files (DB, log) are stored. Defaults to ".", otherwise if it's customized, - /// the folder should exist before starting the SDK. - final String workingDir; - final Network network; - final int paymentTimeoutSec; - final String? defaultLspId; - final String? apiKey; - - /// Maps to the CLN `maxfeepercent` config when paying invoices (`lightning-pay`) - final double maxfeePercent; - - /// Maps to the CLN `exemptfee` config when paying invoices (`lightning-pay`) - final int exemptfeeMsat; - final NodeConfig nodeConfig; - - const Config({ - required this.breezserver, - required this.chainnotifierUrl, - this.mempoolspaceUrl, - required this.workingDir, - required this.network, - required this.paymentTimeoutSec, - this.defaultLspId, - this.apiKey, - required this.maxfeePercent, - required this.exemptfeeMsat, - required this.nodeConfig, - }); -} - -/// Represents a configure node request. -class ConfigureNodeRequest { - final String? closeToAddress; - - const ConfigureNodeRequest({ - this.closeToAddress, - }); -} - -/// Represents a connect request. -class ConnectRequest { - final Config config; - final Uint8List seed; - - /// If true, only restores an existing node and otherwise result in an error - final bool? restoreOnly; - - const ConnectRequest({ - required this.config, - required this.seed, - this.restoreOnly, - }); -} - -class CurrencyInfo { - final String name; - final int fractionSize; - final int? spacing; - final Symbol? symbol; - final Symbol? uniqSymbol; - final List localizedName; - final List localeOverrides; - - const CurrencyInfo({ - required this.name, - required this.fractionSize, - this.spacing, - this.symbol, - this.uniqSymbol, - required this.localizedName, - required this.localeOverrides, - }); -} - -/// Indicates the different kinds of supported environments for [crate::BreezServices]. -enum EnvironmentType { - Production, - Staging, -} - -class FiatCurrency { - final String id; - final CurrencyInfo info; - - const FiatCurrency({ - required this.id, - required this.info, - }); -} - -/// Client-specific credentials to connect to and manage a Greenlight node in the cloud -class GreenlightCredentials { - final Uint8List developerKey; - final Uint8List developerCert; - - const GreenlightCredentials({ - required this.developerKey, - required this.developerCert, - }); -} - -/// Device credentials used to authenticate to Greenlight with the current device. -class GreenlightDeviceCredentials { - final Uint8List device; - - const GreenlightDeviceCredentials({ - required this.device, - }); -} - -class GreenlightNodeConfig { - final GreenlightCredentials? partnerCredentials; - final String? inviteCode; - - const GreenlightNodeConfig({ - this.partnerCredentials, - this.inviteCode, - }); -} - -/// Indicates the different service health check statuses. -enum HealthCheckStatus { - Operational, - Maintenance, - ServiceDisruption, -} - -@freezed -sealed class InputType with _$InputType { - const factory InputType.bitcoinAddress({ - required BitcoinAddressData address, - }) = InputType_BitcoinAddress; - const factory InputType.bolt11({ - required LNInvoice invoice, - }) = InputType_Bolt11; - const factory InputType.nodeId({ - required String nodeId, - }) = InputType_NodeId; - const factory InputType.url({ - required String url, - }) = InputType_Url; - const factory InputType.lnUrlPay({ - required LnUrlPayRequestData data, - }) = InputType_LnUrlPay; - const factory InputType.lnUrlWithdraw({ - required LnUrlWithdrawRequestData data, - }) = InputType_LnUrlWithdraw; - const factory InputType.lnUrlAuth({ - required LnUrlAuthRequestData data, - }) = InputType_LnUrlAuth; - const factory InputType.lnUrlError({ - required LnUrlErrorData data, - }) = InputType_LnUrlError; -} - -/// Details of an invoice that has been paid, included as payload in an emitted [BreezEvent] -class InvoicePaidDetails { - final String paymentHash; - final String bolt11; - final Payment? payment; - - const InvoicePaidDetails({ - required this.paymentHash, - required this.bolt11, - this.payment, - }); -} - -/// Represents a list payments request. -class ListPaymentsRequest { - final List? filters; - final List? metadataFilters; - - /// Epoch time, in seconds - final int? fromTimestamp; - - /// Epoch time, in seconds - final int? toTimestamp; - final bool? includeFailures; - final int? offset; - final int? limit; - - const ListPaymentsRequest({ - this.filters, - this.metadataFilters, - this.fromTimestamp, - this.toTimestamp, - this.includeFailures, - this.offset, - this.limit, - }); -} - -class LNInvoice { - final String bolt11; - final Network network; - final String payeePubkey; - final String paymentHash; - final String? description; - final String? descriptionHash; - final int? amountMsat; - final int timestamp; - final int expiry; - final List routingHints; - final Uint8List paymentSecret; - final int minFinalCltvExpiryDelta; - - const LNInvoice({ - required this.bolt11, - required this.network, - required this.payeePubkey, - required this.paymentHash, - this.description, - this.descriptionHash, - this.amountMsat, - required this.timestamp, - required this.expiry, - required this.routingHints, - required this.paymentSecret, - required this.minFinalCltvExpiryDelta, - }); -} - -/// Details of a LN payment, as included in a [Payment] -class LnPaymentDetails { - final String paymentHash; - final String label; - final String destinationPubkey; - final String paymentPreimage; - final bool keysend; - final String bolt11; - - /// Only set for [PaymentType::Received], payments which require to open a channel. - /// Represents the actual invoice paid by the sender - final String? openChannelBolt11; - - /// Only set for [PaymentType::Sent] payments that are part of a LNURL-pay workflow where - /// the endpoint returns a success action - final SuccessActionProcessed? lnurlSuccessAction; - - /// Only set for [PaymentType::Sent] payments if it is not a payment to a Lightning Address - final String? lnurlPayDomain; - - /// Only set for [PaymentType::Sent] payments if the user sent the comment using LNURL-pay - final String? lnurlPayComment; - - /// Only set for [PaymentType::Sent] payments that are sent to a Lightning Address - final String? lnAddress; - - /// Only set for [PaymentType::Sent] payments where the receiver endpoint returned LNURL metadata - final String? lnurlMetadata; - - /// Only set for [PaymentType::Received] payments that were received as part of LNURL-withdraw - final String? lnurlWithdrawEndpoint; - - /// Only set for [PaymentType::Received] payments that were received in the context of a swap - final SwapInfo? swapInfo; - - /// Only set for [PaymentType::Sent] payments that were sent in the context of a reverse swap - final ReverseSwapInfo? reverseSwapInfo; - - /// Only set for [PaymentStatus::Pending] payments that are inflight. - final int? pendingExpirationBlock; - - const LnPaymentDetails({ - required this.paymentHash, - required this.label, - required this.destinationPubkey, - required this.paymentPreimage, - required this.keysend, - required this.bolt11, - this.openChannelBolt11, - this.lnurlSuccessAction, - this.lnurlPayDomain, - this.lnurlPayComment, - this.lnAddress, - this.lnurlMetadata, - this.lnurlWithdrawEndpoint, - this.swapInfo, - this.reverseSwapInfo, - this.pendingExpirationBlock, - }); -} - -class LnUrlAuthRequestData { - final String k1; - final String? action; - final String domain; - final String url; - - const LnUrlAuthRequestData({ - required this.k1, - this.action, - required this.domain, - required this.url, - }); -} - -@freezed -sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { - const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; - const factory LnUrlCallbackStatus.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlCallbackStatus_ErrorStatus; -} - -class LnUrlErrorData { - final String reason; - - const LnUrlErrorData({ - required this.reason, - }); -} - -class LnUrlPayErrorData { - final String paymentHash; - final String reason; - - const LnUrlPayErrorData({ - required this.paymentHash, - required this.reason, - }); -} - -class LnUrlPayRequest { - final LnUrlPayRequestData data; - final int amountMsat; - final bool useTrampoline; - final String? comment; - final String? paymentLabel; - final bool? validateSuccessActionUrl; - - const LnUrlPayRequest({ - required this.data, - required this.amountMsat, - required this.useTrampoline, - this.comment, - this.paymentLabel, - this.validateSuccessActionUrl, - }); -} - -class LnUrlPayRequestData { - final String callback; - final int minSendable; - final int maxSendable; - final String metadataStr; - final int commentAllowed; - final String domain; - final bool allowsNostr; - final String? nostrPubkey; - final String? lnAddress; - - const LnUrlPayRequestData({ - required this.callback, - required this.minSendable, - required this.maxSendable, - required this.metadataStr, - required this.commentAllowed, - required this.domain, - required this.allowsNostr, - this.nostrPubkey, - this.lnAddress, - }); -} - -@freezed -sealed class LnUrlPayResult with _$LnUrlPayResult { - const factory LnUrlPayResult.endpointSuccess({ - required LnUrlPaySuccessData data, - }) = LnUrlPayResult_EndpointSuccess; - const factory LnUrlPayResult.endpointError({ - required LnUrlErrorData data, - }) = LnUrlPayResult_EndpointError; - const factory LnUrlPayResult.payError({ - required LnUrlPayErrorData data, - }) = LnUrlPayResult_PayError; -} - -class LnUrlPaySuccessData { - final Payment payment; - final SuccessActionProcessed? successAction; - - const LnUrlPaySuccessData({ - required this.payment, - this.successAction, - }); -} - -class LnUrlWithdrawRequest { - final LnUrlWithdrawRequestData data; - final int amountMsat; - final String? description; - - const LnUrlWithdrawRequest({ - required this.data, - required this.amountMsat, - this.description, - }); -} - -class LnUrlWithdrawRequestData { - final String callback; - final String k1; - final String defaultDescription; - final int minWithdrawable; - final int maxWithdrawable; - - const LnUrlWithdrawRequestData({ - required this.callback, - required this.k1, - required this.defaultDescription, - required this.minWithdrawable, - required this.maxWithdrawable, - }); -} - -@freezed -sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { - const factory LnUrlWithdrawResult.ok({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Ok; - const factory LnUrlWithdrawResult.timeout({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Timeout; - const factory LnUrlWithdrawResult.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlWithdrawResult_ErrorStatus; -} - -class LnUrlWithdrawSuccessData { - final LNInvoice invoice; - - const LnUrlWithdrawSuccessData({ - required this.invoice, - }); -} - -class LocaleOverrides { - final String locale; - final int? spacing; - final Symbol symbol; - - const LocaleOverrides({ - required this.locale, - this.spacing, - required this.symbol, - }); -} - -class LocalizedName { - final String locale; - final String name; - - const LocalizedName({ - required this.locale, - required this.name, - }); -} - -/// Internal SDK log entry -class LogEntry { - final String line; - final String level; - - const LogEntry({ - required this.line, - required this.level, - }); -} - -/// Details of supported LSP -class LspInformation { - final String id; - - /// The name of of LSP - final String name; - - /// The URL of the LSP - final String widgetUrl; - - /// The identity pubkey of the Lightning node - final String pubkey; - - /// The network location of the lightning node, e.g. `12.34.56.78:9012` or `localhost:10011` - final String host; - - /// The base fee charged regardless of the number of milli-satoshis sent - final int baseFeeMsat; - - /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. - final double feeRate; - - /// The required timelock delta for HTLCs forwarded over the channel - final int timeLockDelta; - - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minHtlcMsat; - final Uint8List lspPubkey; - final OpeningFeeParamsMenu openingFeeParamsList; - - const LspInformation({ - required this.id, - required this.name, - required this.widgetUrl, - required this.pubkey, - required this.host, - required this.baseFeeMsat, - required this.feeRate, - required this.timeLockDelta, - required this.minHtlcMsat, - required this.lspPubkey, - required this.openingFeeParamsList, - }); -} - -class MaxReverseSwapAmountResponse { - /// The total sats that can be sent onchain. - final int totalSat; - - const MaxReverseSwapAmountResponse({ - required this.totalSat, - }); -} - -class MessageSuccessActionData { - final String message; - - const MessageSuccessActionData({ - required this.message, - }); -} - -/// A metadata filter which can be applied when retrieving the transaction list -class MetadataFilter { - /// Specifies which field to apply the filter on, using the JSON path format - final String jsonPath; - - /// Specifies which JSON value to filter for. - /// As such, strings must be wrapped with quotes ("") in order to be properly filtered - final String jsonValue; - - const MetadataFilter({ - required this.jsonPath, - required this.jsonValue, - }); -} - -enum Network { - Bitcoin, - Testnet, - Signet, - Regtest, -} - -@freezed -sealed class NodeConfig with _$NodeConfig { - const factory NodeConfig.greenlight({ - required GreenlightNodeConfig config, - }) = NodeConfig_Greenlight; -} - -@freezed -sealed class NodeCredentials with _$NodeCredentials { - const factory NodeCredentials.greenlight({ - required GreenlightDeviceCredentials credentials, - }) = NodeCredentials_Greenlight; -} - -/// The node state of a Greenlight LN node running in the cloud. -/// -/// Note: The implementation attempts to provide the most up-to-date values, -/// which may result in some short-lived inconsistencies -/// (e.g., `channels_balance_msat` may be updated before `inbound_liquidity_msats`). -class NodeState { - final String id; - final int blockHeight; - final int channelsBalanceMsat; - final int onchainBalanceMsat; - final int pendingOnchainBalanceMsat; - final List utxos; - final int maxPayableMsat; - final int maxReceivableMsat; - final int maxSinglePaymentAmountMsat; - final int maxChanReserveMsats; - final List connectedPeers; - - /// Maximum receivable in a single payment without requiring a new channel open. - final int maxReceivableSinglePaymentAmountMsat; - - /// Total receivable on all available channels - final int totalInboundLiquidityMsats; - - const NodeState({ - required this.id, - required this.blockHeight, - required this.channelsBalanceMsat, - required this.onchainBalanceMsat, - required this.pendingOnchainBalanceMsat, - required this.utxos, - required this.maxPayableMsat, - required this.maxReceivableMsat, - required this.maxSinglePaymentAmountMsat, - required this.maxChanReserveMsats, - required this.connectedPeers, - required this.maxReceivableSinglePaymentAmountMsat, - required this.totalInboundLiquidityMsats, - }); -} - -class OnchainPaymentLimitsResponse { - /// Minimum amount the reverse swap service accepts as a send amount - final int minSat; - - /// Maximum amount the reverse swap service accepts as a send amount - final int maxSat; - - /// Maximum amount this node can send with the current channels and the current local balance - final int maxPayableSat; - - const OnchainPaymentLimitsResponse({ - required this.minSat, - required this.maxSat, - required this.maxPayableSat, - }); -} - -class OpenChannelFeeRequest { - final int? amountMsat; - final int? expiry; - - const OpenChannelFeeRequest({ - this.amountMsat, - this.expiry, - }); -} - -class OpenChannelFeeResponse { - /// Opening fee for receiving the amount set in the [OpenChannelFeeRequest], in case it was set. - /// It may be zero if no new channel needs to be opened. - final int? feeMsat; - - /// The fee params for receiving more than the current inbound liquidity. - final OpeningFeeParams feeParams; - - const OpenChannelFeeResponse({ - this.feeMsat, - required this.feeParams, - }); -} - -/// Dynamic fee parameters offered by the LSP for opening a new channel. -/// -/// After they are received, the client shouldn't change them when calling LSP methods, -/// otherwise the LSP may reject the call. -class OpeningFeeParams { - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minMsat; - - /// The fee in ppm charged over liquidity when buying a channel - final int proportional; - - /// The date and time this opening fee params promise expires, in RFC 3339 / ISO 8601 format - final String validUntil; - - /// The channel can be closed if not used within this duration in blocks - final int maxIdleTime; - final int maxClientToSelfDelay; - final String promise; - - const OpeningFeeParams({ - required this.minMsat, - required this.proportional, - required this.validUntil, - required this.maxIdleTime, - required this.maxClientToSelfDelay, - required this.promise, - }); -} - -/// See [OpeningFeeParamsMenu::try_from] -class OpeningFeeParamsMenu { - final List values; - - const OpeningFeeParamsMenu({ - required this.values, - }); -} - -class PayOnchainRequest { - final String recipientAddress; - final PrepareOnchainPaymentResponse prepareRes; - - const PayOnchainRequest({ - required this.recipientAddress, - required this.prepareRes, - }); -} - -class PayOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const PayOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a payment, including its [PaymentType] and [PaymentDetails] -class Payment { - final String id; - final PaymentType paymentType; - - /// Epoch time, in seconds - final int paymentTime; - final int amountMsat; - final int feeMsat; - final PaymentStatus status; - final String? error; - final String? description; - final PaymentDetails details; - final String? metadata; - - const Payment({ - required this.id, - required this.paymentType, - required this.paymentTime, - required this.amountMsat, - required this.feeMsat, - required this.status, - this.error, - this.description, - required this.details, - this.metadata, - }); -} - -@freezed -sealed class PaymentDetails with _$PaymentDetails { - const factory PaymentDetails.ln({ - required LnPaymentDetails data, - }) = PaymentDetails_Ln; - const factory PaymentDetails.closedChannel({ - required ClosedChannelPaymentDetails data, - }) = PaymentDetails_ClosedChannel; -} - -class PaymentFailedData { - final String error; - final String nodeId; - final LNInvoice? invoice; - final String? label; - - const PaymentFailedData({ - required this.error, - required this.nodeId, - this.invoice, - this.label, - }); -} - -/// The status of a payment -enum PaymentStatus { - Pending, - Complete, - Failed, -} - -/// Different types of supported payments -enum PaymentType { - Sent, - Received, - ClosedChannel, -} - -/// Different types of supported filters which can be applied when retrieving the transaction list -enum PaymentTypeFilter { - Sent, - Received, - ClosedChannel, -} - -/// See [ReverseSwapFeesRequest] -class PrepareOnchainPaymentRequest { - /// Depending on `amount_type`, this may be the desired send amount or the desired receive amount. - final int amountSat; - final SwapAmountType amountType; - - /// Feerate (sat / vByte) for the claim transaction - final int claimTxFeerate; - - const PrepareOnchainPaymentRequest({ - required this.amountSat, - required this.amountType, - required this.claimTxFeerate, - }); -} - -/// Contains fields describing the reverse swap parameters (see [ReverseSwapPairInfo]), as well as -/// the resulting send and receive amounts. -class PrepareOnchainPaymentResponse { - final String feesHash; - final double feesPercentage; - final int feesLockup; - final int feesClaim; - final int senderAmountSat; - final int recipientAmountSat; - final int totalFees; - - const PrepareOnchainPaymentResponse({ - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - required this.senderAmountSat, - required this.recipientAmountSat, - required this.totalFees, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what fee will be charged in satoshis. -/// This model holds the request data which consists of the address to redeem on-chain funds to and the fee rate in. -/// satoshis per vbyte which will be converted to absolute satoshis. -class PrepareRedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const PrepareRedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what a fee it will be charged in satoshis -/// this model holds the response data, which consists of the weight and the absolute fee in sats -class PrepareRedeemOnchainFundsResponse { - final int txWeight; - final int txFeeSat; - - const PrepareRedeemOnchainFundsResponse({ - required this.txWeight, - required this.txFeeSat, - }); -} - -class PrepareRefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const PrepareRefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class PrepareRefundResponse { - final int refundTxWeight; - final int refundTxFeeSat; - - const PrepareRefundResponse({ - required this.refundTxWeight, - required this.refundTxFeeSat, - }); -} - -class Rate { - final String coin; - final double value; - - const Rate({ - required this.coin, - required this.value, - }); -} - -class ReceiveOnchainRequest { - final OpeningFeeParams? openingFeeParams; - - const ReceiveOnchainRequest({ - this.openingFeeParams, - }); -} - -/// Represents a receive payment request. -class ReceivePaymentRequest { - /// The amount in satoshis for this payment request - final int amountMsat; - - /// The description for this payment request. - final String description; - - /// Optional preimage for this payment request. - /// If specified, it will be used instead of generating a new one. - final Uint8List? preimage; - - /// If set and valid, these fess options are used when a new channels is needed. - /// Otherwise the default fee options will be used. - final OpeningFeeParams? openingFeeParams; - - /// If set to true, then the bolt11 invoice returned includes the description hash. - final bool? useDescriptionHash; - - /// if specified, set the time the invoice is valid for, in seconds. - final int? expiry; - - /// if specified, sets the min_final_cltv_expiry for the invoice - final int? cltv; - - const ReceivePaymentRequest({ - required this.amountMsat, - required this.description, - this.preimage, - this.openingFeeParams, - this.useDescriptionHash, - this.expiry, - this.cltv, - }); -} - -/// Represents a receive payment response. -/// -/// Breez SDK may have to open a new channel to receive this payment. In that case, the channel will -/// be opened automatically when the invoice is paid, and the fees will be described in the -/// `opening_fee_params` and `opening_fee_msat` fields. -class ReceivePaymentResponse { - /// The generated invoice, including any necessary routing hints - final LNInvoice lnInvoice; - - /// If set, these are the [OpeningFeeParams] used to calculate the channel opening fees. - final OpeningFeeParams? openingFeeParams; - - /// If set, this is the channel opening fee that will be deduced from the invoice amount. - final int? openingFeeMsat; - - const ReceivePaymentResponse({ - required this.lnInvoice, - this.openingFeeParams, - this.openingFeeMsat, - }); -} - -/// Wrapper containing the result of the recommended fees query, in sat/vByte, based on mempool.space data -class RecommendedFees { - final int fastestFee; - final int halfHourFee; - final int hourFee; - final int economyFee; - final int minimumFee; - - const RecommendedFees({ - required this.fastestFee, - required this.halfHourFee, - required this.hourFee, - required this.economyFee, - required this.minimumFee, - }); -} - -class RedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const RedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RedeemOnchainFundsResponse { - final Uint8List txid; - - const RedeemOnchainFundsResponse({ - required this.txid, - }); -} - -class RefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const RefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RefundResponse { - final String refundTxId; - - const RefundResponse({ - required this.refundTxId, - }); -} - -@freezed -sealed class ReportIssueRequest with _$ReportIssueRequest { - const factory ReportIssueRequest.paymentFailure({ - required ReportPaymentFailureDetails data, - }) = ReportIssueRequest_PaymentFailure; -} - -class ReportPaymentFailureDetails { - /// The payment hash of the payment failure - final String paymentHash; - - /// The comment or error text - final String? comment; - - const ReportPaymentFailureDetails({ - required this.paymentHash, - this.comment, - }); -} - -class ReverseSwapFeesRequest { - /// Amount to be sent - final int? sendAmountSat; - - /// Feerate (sat / vByte) for the claim transaction - final int? claimTxFeerate; - - const ReverseSwapFeesRequest({ - this.sendAmountSat, - this.claimTxFeerate, - }); -} - -/// Simplified version of [FullReverseSwapInfo], containing only the user-relevant fields -class ReverseSwapInfo { - final String id; - final String claimPubkey; - - /// The lockup tx id, available from the moment the lockup tx is seen in the mempool by the SDK - final String? lockupTxid; - - /// The claim tx id, available from the moment the claim tx is broadcast by the SDK - final String? claimTxid; - final int onchainAmountSat; - final ReverseSwapStatus status; - - const ReverseSwapInfo({ - required this.id, - required this.claimPubkey, - this.lockupTxid, - this.claimTxid, - required this.onchainAmountSat, - required this.status, - }); -} - -/// Details about the reverse swap fees and parameters, at this point in time -class ReverseSwapPairInfo { - /// Minimum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int min; - - /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int max; - - /// Hash of the pair info JSON - final String feesHash; - - /// Percentage fee for the reverse swap service - final double feesPercentage; - - /// Miner fees in sats for locking up funds - final int feesLockup; - - /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. - final int feesClaim; - - /// Total fees for the reverse swap, in sats, based on the given send amount. - /// - /// The field is set only when the [ReverseSwapFeesRequest] `send_amount_sat` is known. - /// - /// If the [ReverseSwapFeesRequest] has the `claim_tx_feerate` empty, this is an estimate. If - /// the `claim_tx_feerate` is set, this is the exact value of the total reverse swap fees. - final int? totalFees; - - const ReverseSwapPairInfo({ - required this.min, - required this.max, - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - this.totalFees, - }); -} - -/// The possible statuses of a reverse swap, from the Breez SDK perspective. -/// -/// See [BoltzApiReverseSwapStatus] for the reverse swap status from the Breez endpoint point of view. -enum ReverseSwapStatus { - /// HODL invoice payment is not completed yet - /// - /// This is also the temporary status of a reverse swap when restoring a node, until `sync` finishes. - Initial, - - /// HODL invoice payment was successfully triggered and confirmed by Boltz, but the reverse swap - /// is not yet complete - InProgress, - - /// An explicit error occurs (validation error, failure reported by Boltz, expiration, etc) and - /// the initial invoice funds are returned to the sender (invoice is cancelled or payment failed) - Cancelled, - - /// Successfully completed (claim tx has been seen in the mempool) - CompletedSeen, - - /// Successfully completed (claim tx has at least one confirmation) - CompletedConfirmed, -} - -class RouteHint { - final List hops; - - const RouteHint({ - required this.hops, - }); -} - -class RouteHintHop { - final String srcNodeId; - final String shortChannelId; - final int feesBaseMsat; - final int feesProportionalMillionths; - final int cltvExpiryDelta; - final int? htlcMinimumMsat; - final int? htlcMaximumMsat; - - const RouteHintHop({ - required this.srcNodeId, - required this.shortChannelId, - required this.feesBaseMsat, - required this.feesProportionalMillionths, - required this.cltvExpiryDelta, - this.htlcMinimumMsat, - this.htlcMaximumMsat, - }); -} - -class SendOnchainRequest { - final int amountSat; - final String onchainRecipientAddress; - final String pairHash; - final int satPerVbyte; - - const SendOnchainRequest({ - required this.amountSat, - required this.onchainRecipientAddress, - required this.pairHash, - required this.satPerVbyte, - }); -} - -class SendOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const SendOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a send payment request. -class SendPaymentRequest { - /// The bolt11 invoice - final String bolt11; - - /// Trampoline payments outsource pathfinding to the LSP. Trampoline payments can improve - /// payment performance, but are generally more expensive in terms of fees and they - /// compromise on privacy. - final bool useTrampoline; - - /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. - final int? amountMsat; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendPaymentRequest({ - required this.bolt11, - required this.useTrampoline, - this.amountMsat, - this.label, - }); -} - -/// Represents a send payment response. -class SendPaymentResponse { - final Payment payment; - - const SendPaymentResponse({ - required this.payment, - }); -} - -/// Represents a send spontaneous payment request. -class SendSpontaneousPaymentRequest { - /// The node id to send this payment is - final String nodeId; - - /// The amount in millisatoshis for this payment - final int amountMsat; - final List? extraTlvs; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendSpontaneousPaymentRequest({ - required this.nodeId, - required this.amountMsat, - this.extraTlvs, - this.label, - }); -} - -/// Represents a service health check response. -class ServiceHealthCheckResponse { - final HealthCheckStatus status; - - const ServiceHealthCheckResponse({ - required this.status, - }); -} - -/// Request to sign a message with the node's private key. -class SignMessageRequest { - /// The message to be signed by the node's private key. - final String message; - - const SignMessageRequest({ - required this.message, - }); -} - -/// Response to a [SignMessageRequest]. -class SignMessageResponse { - /// The signature that covers the message of SignMessageRequest. Zbase - /// encoded. - final String signature; - - const SignMessageResponse({ - required this.signature, - }); -} - -class StaticBackupRequest { - final String workingDir; - - const StaticBackupRequest({ - required this.workingDir, - }); -} - -class StaticBackupResponse { - final List? backup; - - const StaticBackupResponse({ - this.backup, - }); -} - -@freezed -sealed class SuccessActionProcessed with _$SuccessActionProcessed { - const factory SuccessActionProcessed.aes({ - required AesSuccessActionDataResult result, - }) = SuccessActionProcessed_Aes; - const factory SuccessActionProcessed.message({ - required MessageSuccessActionData data, - }) = SuccessActionProcessed_Message; - const factory SuccessActionProcessed.url({ - required UrlSuccessActionData data, - }) = SuccessActionProcessed_Url; -} - -enum SwapAmountType { - Send, - Receive, -} - -/// Represents the details of an on-going swap. -/// -/// Once this SwapInfo is created it will be monitored on-chain and its state is -/// saved to the persistent storage. -/// -/// The SwapInfo has a status which changes accordingly, documented in [SwapStatus]. -/// -class SwapInfo { - /// Bitcoin address for this swap. Sats sent to this address will be swapped. - final String bitcoinAddress; - - /// Relative time lock start, received from [SwapperAPI::create_swap]. - final int createdAt; - - /// Relative time lock for the timeout for the script to be redeemed before swap fails. - final int lockHeight; - - /// sha256 hash of preimage to used in the claim sript. - final Uint8List paymentHash; - - /// Secret to claim the swap. - final Uint8List preimage; - - /// Secret claim key for the bitcoin address. - final Uint8List privateKey; - - /// Public key in binary format of the private claim private key. - final Uint8List publicKey; - - /// The public key in binary format from the swapping service. Received from [SwapperAPI::create_swap]. - final Uint8List swapperPublicKey; - - /// The locking script for the generated bitcoin address. Received from [SwapperAPI::create_swap]. - final Uint8List script; - - /// bolt11 invoice to claim the sent funds. - final String? bolt11; - - /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. - final int paidMsat; - - /// Total count of transactions sent to the swap address. - final int totalIncomingTxs; - - /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. - final int confirmedSats; - - /// Unconfirmed sats waiting to be confirmed onchain. - final int unconfirmedSats; - - /// Shows the current status of the swap, either `Initial` or `Expired`. - final SwapStatus status; - - /// Transaction IDs for failed swap attempts. - final List refundTxIds; - - /// Refund transaction IDs for ongoing swap awaiting confirmation. - final List unconfirmedTxIds; - - /// Transaction IDs that have been confirmed on-chain. - final List confirmedTxIds; - - /// The minimum amount of sats one can send in order for the swap to succeed. Received from [SwapperAPI::create_swap]. - final int minAllowedDeposit; - - /// The maximum amount of sats one can send in order for the swap to succeed. This is determined based on `max_swapper_payable` and the node's local balance. - final int maxAllowedDeposit; - - /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. - final int maxSwapperPayable; - - /// Error reason for when swap fails. - final String? lastRedeemError; - - /// The dynamic fees which is set if a channel opening is needed. - /// - /// This is an optional field for backward compatibility with swaps created before dynamic fees. - /// - /// Swaps created after dynamic fees were introduced always have this field set. - final OpeningFeeParams? channelOpeningFees; - - /// The block height when the swap was confirmed. - final int? confirmedAt; - - const SwapInfo({ - required this.bitcoinAddress, - required this.createdAt, - required this.lockHeight, - required this.paymentHash, - required this.preimage, - required this.privateKey, - required this.publicKey, - required this.swapperPublicKey, - required this.script, - this.bolt11, - required this.paidMsat, - required this.totalIncomingTxs, - required this.confirmedSats, - required this.unconfirmedSats, - required this.status, - required this.refundTxIds, - required this.unconfirmedTxIds, - required this.confirmedTxIds, - required this.minAllowedDeposit, - required this.maxAllowedDeposit, - required this.maxSwapperPayable, - this.lastRedeemError, - this.channelOpeningFees, - this.confirmedAt, - }); -} - -/// The status of a swap -enum SwapStatus { - /// The swap address has been created and either there aren't any confirmed transactions associated with it - /// or there are confirmed transactions that are bellow the lock timeout which means the funds are still - /// eligible to be redeemed normally. - Initial, - WaitingConfirmation, - Redeemable, - Redeemed, - - /// The swap address has confirmed transactions associated with it and the lock timeout has passed since - /// the earliest confirmed transaction. This means the only way to spend the funds from this address is by - /// broadcasting a refund transaction. - Refundable, - Completed, -} - -class Symbol { - final String? grapheme; - final String? template; - final bool? rtl; - final int? position; - - const Symbol({ - this.grapheme, - this.template, - this.rtl, - this.position, - }); -} - -/// Represents a TLV entry for a keysend payment. -class TlvEntry { - /// The type field for the TLV - final int fieldNumber; - - /// The value bytes for the TLV - final Uint8List value; - - const TlvEntry({ - required this.fieldNumber, - required this.value, - }); -} - -/// UTXO known to the LN node -class UnspentTransactionOutput { - final Uint8List txid; - final int outnum; - final int amountMillisatoshi; - final String address; - final bool reserved; - - const UnspentTransactionOutput({ - required this.txid, - required this.outnum, - required this.amountMillisatoshi, - required this.address, - required this.reserved, - }); -} - -class UrlSuccessActionData { - final String description; - final String url; - - const UrlSuccessActionData({ - required this.description, - required this.url, - }); -} - -class BreezSdkCoreImpl implements BreezSdkCore { - final BreezSdkCorePlatform _platform; - factory BreezSdkCoreImpl(ExternalLibrary dylib) => BreezSdkCoreImpl.raw(BreezSdkCorePlatform(dylib)); - - /// Only valid on web/WASM platforms. - factory BreezSdkCoreImpl.wasm(FutureOr module) => BreezSdkCoreImpl(module as ExternalLibrary); - BreezSdkCoreImpl.raw(this._platform); - Future connect({required ConnectRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_connect_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect", - argNames: ["req"], - ); - - Future isInitialized({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_is_initialized(port_), - parseSuccessData: _wire2api_bool, - parseErrorData: null, - constMeta: kIsInitializedConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "is_initialized", - argNames: [], - ); - - Future sync({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sync(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSyncConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sync", - argNames: [], - ); - - Future nodeCredentials({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_credentials(port_), - parseSuccessData: _wire2api_opt_box_autoadd_node_credentials, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeCredentialsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_credentials", - argNames: [], - ); - - Future nodeInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_info(port_), - parseSuccessData: _wire2api_node_state, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_info", - argNames: [], - ); - - Future configureNode({required ConfigureNodeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_configure_node_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_configure_node(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConfigureNodeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "configure_node", - argNames: ["req"], - ); - - Future disconnect({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_disconnect(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kDisconnectConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "disconnect", - argNames: [], - ); - - Future signMessage({required SignMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_sign_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sign_message(port_, arg0), - parseSuccessData: _wire2api_sign_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSignMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sign_message", - argNames: ["req"], - ); - - Future checkMessage({required CheckMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_check_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_check_message(port_, arg0), - parseSuccessData: _wire2api_check_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCheckMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "check_message", - argNames: ["req"], - ); - - Future mnemonicToSeed({required String phrase, dynamic hint}) { - var arg0 = _platform.api2wire_String(phrase); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_mnemonic_to_seed(port_, arg0), - parseSuccessData: _wire2api_uint_8_list, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMnemonicToSeedConstMeta, - argValues: [phrase], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "mnemonic_to_seed", - argNames: ["phrase"], - ); - - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) { - var arg0 = api2wire_environment_type(envType); - var arg1 = _platform.api2wire_String(apiKey); - var arg2 = _platform.api2wire_box_autoadd_node_config(nodeConfig); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_default_config(port_, arg0, arg1, arg2), - parseSuccessData: _wire2api_config, - parseErrorData: null, - constMeta: kDefaultConfigConstMeta, - argValues: [envType, apiKey, nodeConfig], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "default_config", - argNames: ["envType", "apiKey", "nodeConfig"], - ); - - Future staticBackup({required StaticBackupRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_static_backup_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_static_backup(port_, arg0), - parseSuccessData: _wire2api_static_backup_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kStaticBackupConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "static_backup", - argNames: ["req"], - ); - - Future serviceHealthCheck({required String apiKey, dynamic hint}) { - var arg0 = _platform.api2wire_String(apiKey); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_service_health_check(port_, arg0), - parseSuccessData: _wire2api_service_health_check_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kServiceHealthCheckConstMeta, - argValues: [apiKey], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "service_health_check", - argNames: ["apiKey"], - ); - - Stream breezEventsStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_events_stream(port_), - parseSuccessData: _wire2api_breez_event, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezEventsStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_events_stream", - argNames: [], - ); - - Stream breezLogStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_log_stream(port_), - parseSuccessData: _wire2api_log_entry, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezLogStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_log_stream", - argNames: [], - ); - - Future> listLsps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_lsps(port_), - parseSuccessData: _wire2api_list_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListLspsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_lsps", - argNames: [], - ); - - Future connectLsp({required String lspId, dynamic hint}) { - var arg0 = _platform.api2wire_String(lspId); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect_lsp(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectLspConstMeta, - argValues: [lspId], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect_lsp", - argNames: ["lspId"], - ); - - Future lspId({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_id(port_), - parseSuccessData: _wire2api_opt_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspIdConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_id", - argNames: [], - ); - - Future fetchLspInfo({required String id, dynamic hint}) { - var arg0 = _platform.api2wire_String(id); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_lsp_info(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchLspInfoConstMeta, - argValues: [id], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_lsp_info", - argNames: ["id"], - ); - - Future lspInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_info(port_), - parseSuccessData: _wire2api_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_info", - argNames: [], - ); - - Future closeLspChannels({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_close_lsp_channels(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCloseLspChannelsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "close_lsp_channels", - argNames: [], - ); - - Future registerWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_register_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRegisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "register_webhook", - argNames: ["webhookUrl"], - ); - - Future unregisterWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_unregister_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kUnregisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "unregister_webhook", - argNames: ["webhookUrl"], - ); - - Future backup({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup", - argNames: [], - ); - - Future backupStatus({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup_status(port_), - parseSuccessData: _wire2api_backup_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupStatusConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup_status", - argNames: [], - ); - - Future parseInvoice({required String invoice, dynamic hint}) { - var arg0 = _platform.api2wire_String(invoice); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_invoice(port_, arg0), - parseSuccessData: _wire2api_ln_invoice, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInvoiceConstMeta, - argValues: [invoice], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_invoice", - argNames: ["invoice"], - ); - - Future parseInput({required String input, dynamic hint}) { - var arg0 = _platform.api2wire_String(input); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_input(port_, arg0), - parseSuccessData: _wire2api_input_type, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInputConstMeta, - argValues: [input], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_input", - argNames: ["input"], - ); - - Future> listPayments({required ListPaymentsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_list_payments_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_payments(port_, arg0), - parseSuccessData: _wire2api_list_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListPaymentsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_payments", - argNames: ["req"], - ); - - Future paymentByHash({required String hash, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_payment_by_hash(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPaymentByHashConstMeta, - argValues: [hash], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "payment_by_hash", - argNames: ["hash"], - ); - - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - var arg1 = _platform.api2wire_String(metadata); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_set_payment_metadata(port_, arg0, arg1), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSetPaymentMetadataConstMeta, - argValues: [hash, metadata], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "set_payment_metadata", - argNames: ["hash", "metadata"], - ); - - Future sendPayment({required SendPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_payment", - argNames: ["req"], - ); - - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_spontaneous_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_spontaneous_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendSpontaneousPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_spontaneous_payment", - argNames: ["req"], - ); - - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_payment(port_, arg0), - parseSuccessData: _wire2api_receive_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceivePaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_payment", - argNames: ["req"], - ); - - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_pay_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_pay(port_, arg0), - parseSuccessData: _wire2api_ln_url_pay_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlPayConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_pay", - argNames: ["req"], - ); - - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_withdraw_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_withdraw(port_, arg0), - parseSuccessData: _wire2api_ln_url_withdraw_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlWithdrawConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_withdraw", - argNames: ["req"], - ); - - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_auth_request_data(reqData); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_auth(port_, arg0), - parseSuccessData: _wire2api_ln_url_callback_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlAuthConstMeta, - argValues: [reqData], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_auth", - argNames: ["reqData"], - ); - - Future reportIssue({required ReportIssueRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_report_issue_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_report_issue(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReportIssueConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "report_issue", - argNames: ["req"], - ); - - Future> fetchFiatRates({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_fiat_rates(port_), - parseSuccessData: _wire2api_list_rate, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchFiatRatesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_fiat_rates", - argNames: [], - ); - - Future> listFiatCurrencies({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_fiat_currencies(port_), - parseSuccessData: _wire2api_list_fiat_currency, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListFiatCurrenciesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_fiat_currencies", - argNames: [], - ); - - Future maxReverseSwapAmount({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_max_reverse_swap_amount(port_), - parseSuccessData: _wire2api_max_reverse_swap_amount_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMaxReverseSwapAmountConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "max_reverse_swap_amount", - argNames: [], - ); - - Future sendOnchain({required SendOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_onchain(port_, arg0), - parseSuccessData: _wire2api_send_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_onchain", - argNames: ["req"], - ); - - Future payOnchain({required PayOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_pay_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_pay_onchain(port_, arg0), - parseSuccessData: _wire2api_pay_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPayOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "pay_onchain", - argNames: ["req"], - ); - - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_onchain(port_, arg0), - parseSuccessData: _wire2api_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceiveOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_onchain", - argNames: ["req"], - ); - - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_buy_bitcoin_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_buy_bitcoin(port_, arg0), - parseSuccessData: _wire2api_buy_bitcoin_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBuyBitcoinConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "buy_bitcoin", - argNames: ["req"], - ); - - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_onchain_funds", - argNames: ["req"], - ); - - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_prepare_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_redeem_onchain_funds", - argNames: ["req"], - ); - - Future> listRefundables({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_refundables(port_), - parseSuccessData: _wire2api_list_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListRefundablesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_refundables", - argNames: [], - ); - - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_refund(port_, arg0), - parseSuccessData: _wire2api_prepare_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_refund", - argNames: ["req"], - ); - - Future refund({required RefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_refund(port_, arg0), - parseSuccessData: _wire2api_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "refund", - argNames: ["req"], - ); - - Future rescanSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_rescan_swaps(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRescanSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "rescan_swaps", - argNames: [], - ); - - Future redeemSwap({required String swapAddress, dynamic hint}) { - var arg0 = _platform.api2wire_String(swapAddress); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_swap(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemSwapConstMeta, - argValues: [swapAddress], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_swap", - argNames: ["swapAddress"], - ); - - Future inProgressSwap({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_swap(port_), - parseSuccessData: _wire2api_opt_box_autoadd_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressSwapConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_swap", - argNames: [], - ); - - Future> inProgressReverseSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_reverse_swaps(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressReverseSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_reverse_swaps", - argNames: [], - ); - - Future claimReverseSwap({required String lockupAddress, dynamic hint}) { - var arg0 = _platform.api2wire_String(lockupAddress); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_claim_reverse_swap(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kClaimReverseSwapConstMeta, - argValues: [lockupAddress], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kClaimReverseSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "claim_reverse_swap", - argNames: ["lockupAddress"], - ); - - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_open_channel_fee_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_open_channel_fee(port_, arg0), - parseSuccessData: _wire2api_open_channel_fee_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOpenChannelFeeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "open_channel_fee", - argNames: ["req"], - ); - - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_reverse_swap_fees_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_reverse_swap_fees(port_, arg0), - parseSuccessData: _wire2api_reverse_swap_pair_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchReverseSwapFeesConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_reverse_swap_fees", - argNames: ["req"], - ); - - Future onchainPaymentLimits({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_onchain_payment_limits(port_), - parseSuccessData: _wire2api_onchain_payment_limits_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOnchainPaymentLimitsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "onchain_payment_limits", - argNames: [], - ); - - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_onchain_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_onchain_payment(port_, arg0), - parseSuccessData: _wire2api_prepare_onchain_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareOnchainPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_onchain_payment", - argNames: ["req"], - ); - - Future> inProgressOnchainPayments({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_onchain_payments(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressOnchainPaymentsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_onchain_payments", - argNames: [], - ); - - Future recommendedFees({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_recommended_fees(port_), - parseSuccessData: _wire2api_recommended_fees, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRecommendedFeesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "recommended_fees", - argNames: [], - ); - - Future executeCommand({required String command, dynamic hint}) { - var arg0 = _platform.api2wire_String(command); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_execute_command(port_, arg0), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kExecuteCommandConstMeta, - argValues: [command], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "execute_command", - argNames: ["command"], - ); - - Future generateDiagnosticData({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_generate_diagnostic_data(port_), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kGenerateDiagnosticDataConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "generate_diagnostic_data", - argNames: [], - ); - - void dispose() { - _platform.dispose(); - } -// Section: wire2api - - FrbAnyhowException _wire2api_FrbAnyhowException(dynamic raw) { - return FrbAnyhowException(raw as String); - } - - String _wire2api_String(dynamic raw) { - return raw as String; - } - - List _wire2api_StringList(dynamic raw) { - return (raw as List).cast(); - } - - AesSuccessActionDataDecrypted _wire2api_aes_success_action_data_decrypted(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return AesSuccessActionDataDecrypted( - description: _wire2api_String(arr[0]), - plaintext: _wire2api_String(arr[1]), - ); - } - - AesSuccessActionDataResult _wire2api_aes_success_action_data_result(dynamic raw) { - switch (raw[0]) { - case 0: - return AesSuccessActionDataResult_Decrypted( - data: _wire2api_box_autoadd_aes_success_action_data_decrypted(raw[1]), - ); - case 1: - return AesSuccessActionDataResult_ErrorStatus( - reason: _wire2api_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BackupFailedData _wire2api_backup_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BackupFailedData( - error: _wire2api_String(arr[0]), - ); - } - - BackupStatus _wire2api_backup_status(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BackupStatus( - backedUp: _wire2api_bool(arr[0]), - lastBackupTime: _wire2api_opt_box_autoadd_u64(arr[1]), - ); - } - - BitcoinAddressData _wire2api_bitcoin_address_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return BitcoinAddressData( - address: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - amountSat: _wire2api_opt_box_autoadd_u64(arr[2]), - label: _wire2api_opt_String(arr[3]), - message: _wire2api_opt_String(arr[4]), - ); - } - - bool _wire2api_bool(dynamic raw) { - return raw as bool; - } - - AesSuccessActionDataDecrypted _wire2api_box_autoadd_aes_success_action_data_decrypted(dynamic raw) { - return _wire2api_aes_success_action_data_decrypted(raw); - } - - AesSuccessActionDataResult _wire2api_box_autoadd_aes_success_action_data_result(dynamic raw) { - return _wire2api_aes_success_action_data_result(raw); - } - - BackupFailedData _wire2api_box_autoadd_backup_failed_data(dynamic raw) { - return _wire2api_backup_failed_data(raw); - } - - BitcoinAddressData _wire2api_box_autoadd_bitcoin_address_data(dynamic raw) { - return _wire2api_bitcoin_address_data(raw); - } - - bool _wire2api_box_autoadd_bool(dynamic raw) { - return raw as bool; - } - - ClosedChannelPaymentDetails _wire2api_box_autoadd_closed_channel_payment_details(dynamic raw) { - return _wire2api_closed_channel_payment_details(raw); - } - - GreenlightCredentials _wire2api_box_autoadd_greenlight_credentials(dynamic raw) { - return _wire2api_greenlight_credentials(raw); - } - - GreenlightDeviceCredentials _wire2api_box_autoadd_greenlight_device_credentials(dynamic raw) { - return _wire2api_greenlight_device_credentials(raw); - } - - GreenlightNodeConfig _wire2api_box_autoadd_greenlight_node_config(dynamic raw) { - return _wire2api_greenlight_node_config(raw); - } - - InvoicePaidDetails _wire2api_box_autoadd_invoice_paid_details(dynamic raw) { - return _wire2api_invoice_paid_details(raw); - } - - LNInvoice _wire2api_box_autoadd_ln_invoice(dynamic raw) { - return _wire2api_ln_invoice(raw); - } - - LnPaymentDetails _wire2api_box_autoadd_ln_payment_details(dynamic raw) { - return _wire2api_ln_payment_details(raw); - } - - LnUrlAuthRequestData _wire2api_box_autoadd_ln_url_auth_request_data(dynamic raw) { - return _wire2api_ln_url_auth_request_data(raw); - } - - LnUrlErrorData _wire2api_box_autoadd_ln_url_error_data(dynamic raw) { - return _wire2api_ln_url_error_data(raw); - } - - LnUrlPayErrorData _wire2api_box_autoadd_ln_url_pay_error_data(dynamic raw) { - return _wire2api_ln_url_pay_error_data(raw); - } - - LnUrlPayRequestData _wire2api_box_autoadd_ln_url_pay_request_data(dynamic raw) { - return _wire2api_ln_url_pay_request_data(raw); - } - - LnUrlPaySuccessData _wire2api_box_autoadd_ln_url_pay_success_data(dynamic raw) { - return _wire2api_ln_url_pay_success_data(raw); - } - - LnUrlWithdrawRequestData _wire2api_box_autoadd_ln_url_withdraw_request_data(dynamic raw) { - return _wire2api_ln_url_withdraw_request_data(raw); - } - - LnUrlWithdrawSuccessData _wire2api_box_autoadd_ln_url_withdraw_success_data(dynamic raw) { - return _wire2api_ln_url_withdraw_success_data(raw); - } - - LspInformation _wire2api_box_autoadd_lsp_information(dynamic raw) { - return _wire2api_lsp_information(raw); - } - - MessageSuccessActionData _wire2api_box_autoadd_message_success_action_data(dynamic raw) { - return _wire2api_message_success_action_data(raw); - } - - NodeCredentials _wire2api_box_autoadd_node_credentials(dynamic raw) { - return _wire2api_node_credentials(raw); - } - - OpeningFeeParams _wire2api_box_autoadd_opening_fee_params(dynamic raw) { - return _wire2api_opening_fee_params(raw); - } - - Payment _wire2api_box_autoadd_payment(dynamic raw) { - return _wire2api_payment(raw); - } - - PaymentFailedData _wire2api_box_autoadd_payment_failed_data(dynamic raw) { - return _wire2api_payment_failed_data(raw); - } - - ReverseSwapInfo _wire2api_box_autoadd_reverse_swap_info(dynamic raw) { - return _wire2api_reverse_swap_info(raw); - } - - SuccessActionProcessed _wire2api_box_autoadd_success_action_processed(dynamic raw) { - return _wire2api_success_action_processed(raw); - } - - SwapInfo _wire2api_box_autoadd_swap_info(dynamic raw) { - return _wire2api_swap_info(raw); - } - - Symbol _wire2api_box_autoadd_symbol(dynamic raw) { - return _wire2api_symbol(raw); - } - - int _wire2api_box_autoadd_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_box_autoadd_u64(dynamic raw) { - return _wire2api_u64(raw); - } - - UrlSuccessActionData _wire2api_box_autoadd_url_success_action_data(dynamic raw) { - return _wire2api_url_success_action_data(raw); - } - - BreezEvent _wire2api_breez_event(dynamic raw) { - switch (raw[0]) { - case 0: - return BreezEvent_NewBlock( - block: _wire2api_u32(raw[1]), - ); - case 1: - return BreezEvent_InvoicePaid( - details: _wire2api_box_autoadd_invoice_paid_details(raw[1]), - ); - case 2: - return BreezEvent_Synced(); - case 3: - return BreezEvent_PaymentSucceed( - details: _wire2api_box_autoadd_payment(raw[1]), - ); - case 4: - return BreezEvent_PaymentFailed( - details: _wire2api_box_autoadd_payment_failed_data(raw[1]), - ); - case 5: - return BreezEvent_BackupStarted(); - case 6: - return BreezEvent_BackupSucceeded(); - case 7: - return BreezEvent_BackupFailed( - details: _wire2api_box_autoadd_backup_failed_data(raw[1]), - ); - case 8: - return BreezEvent_ReverseSwapUpdated( - details: _wire2api_box_autoadd_reverse_swap_info(raw[1]), - ); - case 9: - return BreezEvent_SwapUpdated( - details: _wire2api_box_autoadd_swap_info(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BuyBitcoinResponse _wire2api_buy_bitcoin_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BuyBitcoinResponse( - url: _wire2api_String(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - ); - } - - ChannelState _wire2api_channel_state(dynamic raw) { - return ChannelState.values[raw as int]; - } - - CheckMessageResponse _wire2api_check_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return CheckMessageResponse( - isValid: _wire2api_bool(arr[0]), - ); - } - - ClosedChannelPaymentDetails _wire2api_closed_channel_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return ClosedChannelPaymentDetails( - state: _wire2api_channel_state(arr[0]), - fundingTxid: _wire2api_String(arr[1]), - shortChannelId: _wire2api_opt_String(arr[2]), - closingTxid: _wire2api_opt_String(arr[3]), - ); - } - - Config _wire2api_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return Config( - breezserver: _wire2api_String(arr[0]), - chainnotifierUrl: _wire2api_String(arr[1]), - mempoolspaceUrl: _wire2api_opt_String(arr[2]), - workingDir: _wire2api_String(arr[3]), - network: _wire2api_network(arr[4]), - paymentTimeoutSec: _wire2api_u32(arr[5]), - defaultLspId: _wire2api_opt_String(arr[6]), - apiKey: _wire2api_opt_String(arr[7]), - maxfeePercent: _wire2api_f64(arr[8]), - exemptfeeMsat: _wire2api_u64(arr[9]), - nodeConfig: _wire2api_node_config(arr[10]), - ); - } - - CurrencyInfo _wire2api_currency_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return CurrencyInfo( - name: _wire2api_String(arr[0]), - fractionSize: _wire2api_u32(arr[1]), - spacing: _wire2api_opt_box_autoadd_u32(arr[2]), - symbol: _wire2api_opt_box_autoadd_symbol(arr[3]), - uniqSymbol: _wire2api_opt_box_autoadd_symbol(arr[4]), - localizedName: _wire2api_list_localized_name(arr[5]), - localeOverrides: _wire2api_list_locale_overrides(arr[6]), - ); - } - - double _wire2api_f64(dynamic raw) { - return raw as double; - } - - FiatCurrency _wire2api_fiat_currency(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return FiatCurrency( - id: _wire2api_String(arr[0]), - info: _wire2api_currency_info(arr[1]), - ); - } - - GreenlightCredentials _wire2api_greenlight_credentials(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightCredentials( - developerKey: _wire2api_uint_8_list(arr[0]), - developerCert: _wire2api_uint_8_list(arr[1]), - ); - } - - GreenlightDeviceCredentials _wire2api_greenlight_device_credentials(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return GreenlightDeviceCredentials( - device: _wire2api_uint_8_list(arr[0]), - ); - } - - GreenlightNodeConfig _wire2api_greenlight_node_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightNodeConfig( - partnerCredentials: _wire2api_opt_box_autoadd_greenlight_credentials(arr[0]), - inviteCode: _wire2api_opt_String(arr[1]), - ); - } - - HealthCheckStatus _wire2api_health_check_status(dynamic raw) { - return HealthCheckStatus.values[raw as int]; - } - - int _wire2api_i32(dynamic raw) { - return raw as int; - } - - int _wire2api_i64(dynamic raw) { - return castInt(raw); - } - - InputType _wire2api_input_type(dynamic raw) { - switch (raw[0]) { - case 0: - return InputType_BitcoinAddress( - address: _wire2api_box_autoadd_bitcoin_address_data(raw[1]), - ); - case 1: - return InputType_Bolt11( - invoice: _wire2api_box_autoadd_ln_invoice(raw[1]), - ); - case 2: - return InputType_NodeId( - nodeId: _wire2api_String(raw[1]), - ); - case 3: - return InputType_Url( - url: _wire2api_String(raw[1]), - ); - case 4: - return InputType_LnUrlPay( - data: _wire2api_box_autoadd_ln_url_pay_request_data(raw[1]), - ); - case 5: - return InputType_LnUrlWithdraw( - data: _wire2api_box_autoadd_ln_url_withdraw_request_data(raw[1]), - ); - case 6: - return InputType_LnUrlAuth( - data: _wire2api_box_autoadd_ln_url_auth_request_data(raw[1]), - ); - case 7: - return InputType_LnUrlError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - InvoicePaidDetails _wire2api_invoice_paid_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return InvoicePaidDetails( - paymentHash: _wire2api_String(arr[0]), - bolt11: _wire2api_String(arr[1]), - payment: _wire2api_opt_box_autoadd_payment(arr[2]), - ); - } - - List _wire2api_list_fiat_currency(dynamic raw) { - return (raw as List).map(_wire2api_fiat_currency).toList(); - } - - List _wire2api_list_locale_overrides(dynamic raw) { - return (raw as List).map(_wire2api_locale_overrides).toList(); - } - - List _wire2api_list_localized_name(dynamic raw) { - return (raw as List).map(_wire2api_localized_name).toList(); - } - - List _wire2api_list_lsp_information(dynamic raw) { - return (raw as List).map(_wire2api_lsp_information).toList(); - } - - List _wire2api_list_opening_fee_params(dynamic raw) { - return (raw as List).map(_wire2api_opening_fee_params).toList(); - } - - List _wire2api_list_payment(dynamic raw) { - return (raw as List).map(_wire2api_payment).toList(); - } - - List _wire2api_list_rate(dynamic raw) { - return (raw as List).map(_wire2api_rate).toList(); - } - - List _wire2api_list_reverse_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_reverse_swap_info).toList(); - } - - List _wire2api_list_route_hint(dynamic raw) { - return (raw as List).map(_wire2api_route_hint).toList(); - } - - List _wire2api_list_route_hint_hop(dynamic raw) { - return (raw as List).map(_wire2api_route_hint_hop).toList(); - } - - List _wire2api_list_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_swap_info).toList(); - } - - List _wire2api_list_unspent_transaction_output(dynamic raw) { - return (raw as List).map(_wire2api_unspent_transaction_output).toList(); - } - - LNInvoice _wire2api_ln_invoice(dynamic raw) { - final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); - return LNInvoice( - bolt11: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - payeePubkey: _wire2api_String(arr[2]), - paymentHash: _wire2api_String(arr[3]), - description: _wire2api_opt_String(arr[4]), - descriptionHash: _wire2api_opt_String(arr[5]), - amountMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - timestamp: _wire2api_u64(arr[7]), - expiry: _wire2api_u64(arr[8]), - routingHints: _wire2api_list_route_hint(arr[9]), - paymentSecret: _wire2api_uint_8_list(arr[10]), - minFinalCltvExpiryDelta: _wire2api_u64(arr[11]), - ); - } - - LnPaymentDetails _wire2api_ln_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 16) throw Exception('unexpected arr length: expect 16 but see ${arr.length}'); - return LnPaymentDetails( - paymentHash: _wire2api_String(arr[0]), - label: _wire2api_String(arr[1]), - destinationPubkey: _wire2api_String(arr[2]), - paymentPreimage: _wire2api_String(arr[3]), - keysend: _wire2api_bool(arr[4]), - bolt11: _wire2api_String(arr[5]), - openChannelBolt11: _wire2api_opt_String(arr[6]), - lnurlSuccessAction: _wire2api_opt_box_autoadd_success_action_processed(arr[7]), - lnurlPayDomain: _wire2api_opt_String(arr[8]), - lnurlPayComment: _wire2api_opt_String(arr[9]), - lnAddress: _wire2api_opt_String(arr[10]), - lnurlMetadata: _wire2api_opt_String(arr[11]), - lnurlWithdrawEndpoint: _wire2api_opt_String(arr[12]), - swapInfo: _wire2api_opt_box_autoadd_swap_info(arr[13]), - reverseSwapInfo: _wire2api_opt_box_autoadd_reverse_swap_info(arr[14]), - pendingExpirationBlock: _wire2api_opt_box_autoadd_u32(arr[15]), - ); - } - - LnUrlAuthRequestData _wire2api_ln_url_auth_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return LnUrlAuthRequestData( - k1: _wire2api_String(arr[0]), - action: _wire2api_opt_String(arr[1]), - domain: _wire2api_String(arr[2]), - url: _wire2api_String(arr[3]), - ); - } - - LnUrlCallbackStatus _wire2api_ln_url_callback_status(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlCallbackStatus_Ok(); - case 1: - return LnUrlCallbackStatus_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlErrorData _wire2api_ln_url_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlErrorData( - reason: _wire2api_String(arr[0]), - ); - } - - LnUrlPayErrorData _wire2api_ln_url_pay_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPayErrorData( - paymentHash: _wire2api_String(arr[0]), - reason: _wire2api_String(arr[1]), - ); - } - - LnUrlPayRequestData _wire2api_ln_url_pay_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 9) throw Exception('unexpected arr length: expect 9 but see ${arr.length}'); - return LnUrlPayRequestData( - callback: _wire2api_String(arr[0]), - minSendable: _wire2api_u64(arr[1]), - maxSendable: _wire2api_u64(arr[2]), - metadataStr: _wire2api_String(arr[3]), - commentAllowed: _wire2api_u16(arr[4]), - domain: _wire2api_String(arr[5]), - allowsNostr: _wire2api_bool(arr[6]), - nostrPubkey: _wire2api_opt_String(arr[7]), - lnAddress: _wire2api_opt_String(arr[8]), - ); - } - - LnUrlPayResult _wire2api_ln_url_pay_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlPayResult_EndpointSuccess( - data: _wire2api_box_autoadd_ln_url_pay_success_data(raw[1]), - ); - case 1: - return LnUrlPayResult_EndpointError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - case 2: - return LnUrlPayResult_PayError( - data: _wire2api_box_autoadd_ln_url_pay_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlPaySuccessData _wire2api_ln_url_pay_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPaySuccessData( - payment: _wire2api_payment(arr[0]), - successAction: _wire2api_opt_box_autoadd_success_action_processed(arr[1]), - ); - } - - LnUrlWithdrawRequestData _wire2api_ln_url_withdraw_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return LnUrlWithdrawRequestData( - callback: _wire2api_String(arr[0]), - k1: _wire2api_String(arr[1]), - defaultDescription: _wire2api_String(arr[2]), - minWithdrawable: _wire2api_u64(arr[3]), - maxWithdrawable: _wire2api_u64(arr[4]), - ); - } - - LnUrlWithdrawResult _wire2api_ln_url_withdraw_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlWithdrawResult_Ok( - data: _wire2api_box_autoadd_ln_url_withdraw_success_data(raw[1]), - ); - case 1: - return LnUrlWithdrawResult_Timeout( - data: _wire2api_box_autoadd_ln_url_withdraw_success_data(raw[1]), - ); - case 2: - return LnUrlWithdrawResult_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlWithdrawSuccessData _wire2api_ln_url_withdraw_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlWithdrawSuccessData( - invoice: _wire2api_ln_invoice(arr[0]), - ); - } - - LocaleOverrides _wire2api_locale_overrides(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return LocaleOverrides( - locale: _wire2api_String(arr[0]), - spacing: _wire2api_opt_box_autoadd_u32(arr[1]), - symbol: _wire2api_symbol(arr[2]), - ); - } - - LocalizedName _wire2api_localized_name(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LocalizedName( - locale: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - ); - } - - LogEntry _wire2api_log_entry(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LogEntry( - line: _wire2api_String(arr[0]), - level: _wire2api_String(arr[1]), - ); - } - - LspInformation _wire2api_lsp_information(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return LspInformation( - id: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - widgetUrl: _wire2api_String(arr[2]), - pubkey: _wire2api_String(arr[3]), - host: _wire2api_String(arr[4]), - baseFeeMsat: _wire2api_i64(arr[5]), - feeRate: _wire2api_f64(arr[6]), - timeLockDelta: _wire2api_u32(arr[7]), - minHtlcMsat: _wire2api_i64(arr[8]), - lspPubkey: _wire2api_uint_8_list(arr[9]), - openingFeeParamsList: _wire2api_opening_fee_params_menu(arr[10]), - ); - } - - MaxReverseSwapAmountResponse _wire2api_max_reverse_swap_amount_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MaxReverseSwapAmountResponse( - totalSat: _wire2api_u64(arr[0]), - ); - } - - MessageSuccessActionData _wire2api_message_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MessageSuccessActionData( - message: _wire2api_String(arr[0]), - ); - } - - Network _wire2api_network(dynamic raw) { - return Network.values[raw as int]; - } - - NodeConfig _wire2api_node_config(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeConfig_Greenlight( - config: _wire2api_box_autoadd_greenlight_node_config(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeCredentials _wire2api_node_credentials(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeCredentials_Greenlight( - credentials: _wire2api_box_autoadd_greenlight_device_credentials(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeState _wire2api_node_state(dynamic raw) { - final arr = raw as List; - if (arr.length != 13) throw Exception('unexpected arr length: expect 13 but see ${arr.length}'); - return NodeState( - id: _wire2api_String(arr[0]), - blockHeight: _wire2api_u32(arr[1]), - channelsBalanceMsat: _wire2api_u64(arr[2]), - onchainBalanceMsat: _wire2api_u64(arr[3]), - pendingOnchainBalanceMsat: _wire2api_u64(arr[4]), - utxos: _wire2api_list_unspent_transaction_output(arr[5]), - maxPayableMsat: _wire2api_u64(arr[6]), - maxReceivableMsat: _wire2api_u64(arr[7]), - maxSinglePaymentAmountMsat: _wire2api_u64(arr[8]), - maxChanReserveMsats: _wire2api_u64(arr[9]), - connectedPeers: _wire2api_StringList(arr[10]), - maxReceivableSinglePaymentAmountMsat: _wire2api_u64(arr[11]), - totalInboundLiquidityMsats: _wire2api_u64(arr[12]), - ); - } - - OnchainPaymentLimitsResponse _wire2api_onchain_payment_limits_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return OnchainPaymentLimitsResponse( - minSat: _wire2api_u64(arr[0]), - maxSat: _wire2api_u64(arr[1]), - maxPayableSat: _wire2api_u64(arr[2]), - ); - } - - OpenChannelFeeResponse _wire2api_open_channel_fee_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OpenChannelFeeResponse( - feeMsat: _wire2api_opt_box_autoadd_u64(arr[0]), - feeParams: _wire2api_opening_fee_params(arr[1]), - ); - } - - OpeningFeeParams _wire2api_opening_fee_params(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return OpeningFeeParams( - minMsat: _wire2api_u64(arr[0]), - proportional: _wire2api_u32(arr[1]), - validUntil: _wire2api_String(arr[2]), - maxIdleTime: _wire2api_u32(arr[3]), - maxClientToSelfDelay: _wire2api_u32(arr[4]), - promise: _wire2api_String(arr[5]), - ); - } - - OpeningFeeParamsMenu _wire2api_opening_fee_params_menu(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return OpeningFeeParamsMenu( - values: _wire2api_list_opening_fee_params(arr[0]), - ); - } - - String? _wire2api_opt_String(dynamic raw) { - return raw == null ? null : _wire2api_String(raw); - } - - List? _wire2api_opt_StringList(dynamic raw) { - return raw == null ? null : _wire2api_StringList(raw); - } - - bool? _wire2api_opt_box_autoadd_bool(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_bool(raw); - } - - GreenlightCredentials? _wire2api_opt_box_autoadd_greenlight_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_greenlight_credentials(raw); - } - - LNInvoice? _wire2api_opt_box_autoadd_ln_invoice(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_ln_invoice(raw); - } - - LspInformation? _wire2api_opt_box_autoadd_lsp_information(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_lsp_information(raw); - } - - NodeCredentials? _wire2api_opt_box_autoadd_node_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_node_credentials(raw); - } - - OpeningFeeParams? _wire2api_opt_box_autoadd_opening_fee_params(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_opening_fee_params(raw); - } - - Payment? _wire2api_opt_box_autoadd_payment(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_payment(raw); - } - - ReverseSwapInfo? _wire2api_opt_box_autoadd_reverse_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_reverse_swap_info(raw); - } - - SuccessActionProcessed? _wire2api_opt_box_autoadd_success_action_processed(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_success_action_processed(raw); - } - - SwapInfo? _wire2api_opt_box_autoadd_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_swap_info(raw); - } - - Symbol? _wire2api_opt_box_autoadd_symbol(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_symbol(raw); - } - - int? _wire2api_opt_box_autoadd_u32(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u32(raw); - } - - int? _wire2api_opt_box_autoadd_u64(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u64(raw); - } - - PayOnchainResponse _wire2api_pay_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return PayOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - Payment _wire2api_payment(dynamic raw) { - final arr = raw as List; - if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); - return Payment( - id: _wire2api_String(arr[0]), - paymentType: _wire2api_payment_type(arr[1]), - paymentTime: _wire2api_i64(arr[2]), - amountMsat: _wire2api_u64(arr[3]), - feeMsat: _wire2api_u64(arr[4]), - status: _wire2api_payment_status(arr[5]), - error: _wire2api_opt_String(arr[6]), - description: _wire2api_opt_String(arr[7]), - details: _wire2api_payment_details(arr[8]), - metadata: _wire2api_opt_String(arr[9]), - ); - } - - PaymentDetails _wire2api_payment_details(dynamic raw) { - switch (raw[0]) { - case 0: - return PaymentDetails_Ln( - data: _wire2api_box_autoadd_ln_payment_details(raw[1]), - ); - case 1: - return PaymentDetails_ClosedChannel( - data: _wire2api_box_autoadd_closed_channel_payment_details(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - PaymentFailedData _wire2api_payment_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return PaymentFailedData( - error: _wire2api_String(arr[0]), - nodeId: _wire2api_String(arr[1]), - invoice: _wire2api_opt_box_autoadd_ln_invoice(arr[2]), - label: _wire2api_opt_String(arr[3]), - ); - } - - PaymentStatus _wire2api_payment_status(dynamic raw) { - return PaymentStatus.values[raw as int]; - } - - PaymentType _wire2api_payment_type(dynamic raw) { - return PaymentType.values[raw as int]; - } - - PrepareOnchainPaymentResponse _wire2api_prepare_onchain_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return PrepareOnchainPaymentResponse( - feesHash: _wire2api_String(arr[0]), - feesPercentage: _wire2api_f64(arr[1]), - feesLockup: _wire2api_u64(arr[2]), - feesClaim: _wire2api_u64(arr[3]), - senderAmountSat: _wire2api_u64(arr[4]), - recipientAmountSat: _wire2api_u64(arr[5]), - totalFees: _wire2api_u64(arr[6]), - ); - } - - PrepareRedeemOnchainFundsResponse _wire2api_prepare_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRedeemOnchainFundsResponse( - txWeight: _wire2api_u64(arr[0]), - txFeeSat: _wire2api_u64(arr[1]), - ); - } - - PrepareRefundResponse _wire2api_prepare_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRefundResponse( - refundTxWeight: _wire2api_u32(arr[0]), - refundTxFeeSat: _wire2api_u64(arr[1]), - ); - } - - Rate _wire2api_rate(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return Rate( - coin: _wire2api_String(arr[0]), - value: _wire2api_f64(arr[1]), - ); - } - - ReceivePaymentResponse _wire2api_receive_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return ReceivePaymentResponse( - lnInvoice: _wire2api_ln_invoice(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - openingFeeMsat: _wire2api_opt_box_autoadd_u64(arr[2]), - ); - } - - RecommendedFees _wire2api_recommended_fees(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return RecommendedFees( - fastestFee: _wire2api_u64(arr[0]), - halfHourFee: _wire2api_u64(arr[1]), - hourFee: _wire2api_u64(arr[2]), - economyFee: _wire2api_u64(arr[3]), - minimumFee: _wire2api_u64(arr[4]), - ); - } - - RedeemOnchainFundsResponse _wire2api_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RedeemOnchainFundsResponse( - txid: _wire2api_uint_8_list(arr[0]), - ); - } - - RefundResponse _wire2api_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RefundResponse( - refundTxId: _wire2api_String(arr[0]), - ); - } - - ReverseSwapInfo _wire2api_reverse_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return ReverseSwapInfo( - id: _wire2api_String(arr[0]), - claimPubkey: _wire2api_String(arr[1]), - lockupTxid: _wire2api_opt_String(arr[2]), - claimTxid: _wire2api_opt_String(arr[3]), - onchainAmountSat: _wire2api_u64(arr[4]), - status: _wire2api_reverse_swap_status(arr[5]), - ); - } - - ReverseSwapPairInfo _wire2api_reverse_swap_pair_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return ReverseSwapPairInfo( - min: _wire2api_u64(arr[0]), - max: _wire2api_u64(arr[1]), - feesHash: _wire2api_String(arr[2]), - feesPercentage: _wire2api_f64(arr[3]), - feesLockup: _wire2api_u64(arr[4]), - feesClaim: _wire2api_u64(arr[5]), - totalFees: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - ReverseSwapStatus _wire2api_reverse_swap_status(dynamic raw) { - return ReverseSwapStatus.values[raw as int]; - } - - RouteHint _wire2api_route_hint(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RouteHint( - hops: _wire2api_list_route_hint_hop(arr[0]), - ); - } - - RouteHintHop _wire2api_route_hint_hop(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return RouteHintHop( - srcNodeId: _wire2api_String(arr[0]), - shortChannelId: _wire2api_String(arr[1]), - feesBaseMsat: _wire2api_u32(arr[2]), - feesProportionalMillionths: _wire2api_u32(arr[3]), - cltvExpiryDelta: _wire2api_u64(arr[4]), - htlcMinimumMsat: _wire2api_opt_box_autoadd_u64(arr[5]), - htlcMaximumMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - SendOnchainResponse _wire2api_send_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - SendPaymentResponse _wire2api_send_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendPaymentResponse( - payment: _wire2api_payment(arr[0]), - ); - } - - ServiceHealthCheckResponse _wire2api_service_health_check_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return ServiceHealthCheckResponse( - status: _wire2api_health_check_status(arr[0]), - ); - } - - SignMessageResponse _wire2api_sign_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SignMessageResponse( - signature: _wire2api_String(arr[0]), - ); - } - - StaticBackupResponse _wire2api_static_backup_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return StaticBackupResponse( - backup: _wire2api_opt_StringList(arr[0]), - ); - } - - SuccessActionProcessed _wire2api_success_action_processed(dynamic raw) { - switch (raw[0]) { - case 0: - return SuccessActionProcessed_Aes( - result: _wire2api_box_autoadd_aes_success_action_data_result(raw[1]), - ); - case 1: - return SuccessActionProcessed_Message( - data: _wire2api_box_autoadd_message_success_action_data(raw[1]), - ); - case 2: - return SuccessActionProcessed_Url( - data: _wire2api_box_autoadd_url_success_action_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - SwapInfo _wire2api_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 24) throw Exception('unexpected arr length: expect 24 but see ${arr.length}'); - return SwapInfo( - bitcoinAddress: _wire2api_String(arr[0]), - createdAt: _wire2api_i64(arr[1]), - lockHeight: _wire2api_i64(arr[2]), - paymentHash: _wire2api_uint_8_list(arr[3]), - preimage: _wire2api_uint_8_list(arr[4]), - privateKey: _wire2api_uint_8_list(arr[5]), - publicKey: _wire2api_uint_8_list(arr[6]), - swapperPublicKey: _wire2api_uint_8_list(arr[7]), - script: _wire2api_uint_8_list(arr[8]), - bolt11: _wire2api_opt_String(arr[9]), - paidMsat: _wire2api_u64(arr[10]), - totalIncomingTxs: _wire2api_u64(arr[11]), - confirmedSats: _wire2api_u64(arr[12]), - unconfirmedSats: _wire2api_u64(arr[13]), - status: _wire2api_swap_status(arr[14]), - refundTxIds: _wire2api_StringList(arr[15]), - unconfirmedTxIds: _wire2api_StringList(arr[16]), - confirmedTxIds: _wire2api_StringList(arr[17]), - minAllowedDeposit: _wire2api_i64(arr[18]), - maxAllowedDeposit: _wire2api_i64(arr[19]), - maxSwapperPayable: _wire2api_i64(arr[20]), - lastRedeemError: _wire2api_opt_String(arr[21]), - channelOpeningFees: _wire2api_opt_box_autoadd_opening_fee_params(arr[22]), - confirmedAt: _wire2api_opt_box_autoadd_u32(arr[23]), - ); - } - - SwapStatus _wire2api_swap_status(dynamic raw) { - return SwapStatus.values[raw as int]; - } - - Symbol _wire2api_symbol(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return Symbol( - grapheme: _wire2api_opt_String(arr[0]), - template: _wire2api_opt_String(arr[1]), - rtl: _wire2api_opt_box_autoadd_bool(arr[2]), - position: _wire2api_opt_box_autoadd_u32(arr[3]), - ); - } - - int _wire2api_u16(dynamic raw) { - return raw as int; - } - - int _wire2api_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_u64(dynamic raw) { - return castInt(raw); - } - - int _wire2api_u8(dynamic raw) { - return raw as int; - } - - Uint8List _wire2api_uint_8_list(dynamic raw) { - return raw as Uint8List; - } - - void _wire2api_unit(dynamic raw) { - return; - } - - UnspentTransactionOutput _wire2api_unspent_transaction_output(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return UnspentTransactionOutput( - txid: _wire2api_uint_8_list(arr[0]), - outnum: _wire2api_u32(arr[1]), - amountMillisatoshi: _wire2api_u64(arr[2]), - address: _wire2api_String(arr[3]), - reserved: _wire2api_bool(arr[4]), - ); - } - - UrlSuccessActionData _wire2api_url_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return UrlSuccessActionData( - description: _wire2api_String(arr[0]), - url: _wire2api_String(arr[1]), - ); - } -} - -// Section: api2wire - -@protected -bool api2wire_bool(bool raw) { - return raw; -} - -@protected -int api2wire_buy_bitcoin_provider(BuyBitcoinProvider raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_environment_type(EnvironmentType raw) { - return api2wire_i32(raw.index); -} - -@protected -double api2wire_f64(double raw) { - return raw; -} - -@protected -int api2wire_i32(int raw) { - return raw; -} - -@protected -int api2wire_network(Network raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_payment_type_filter(PaymentTypeFilter raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_swap_amount_type(SwapAmountType raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_u16(int raw) { - return raw; -} - -@protected -int api2wire_u32(int raw) { - return raw; -} - -@protected -int api2wire_u8(int raw) { - return raw; -} - -// Section: finalizer - -class BreezSdkCorePlatform extends FlutterRustBridgeBase { - BreezSdkCorePlatform(ffi.DynamicLibrary dylib) : super(BreezSdkCoreWire(dylib)); - -// Section: api2wire - - @protected - ffi.Pointer api2wire_String(String raw) { - return api2wire_uint_8_list(utf8.encoder.convert(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_bool(bool raw) { - return inner.new_box_autoadd_bool_0(api2wire_bool(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest raw) { - final ptr = inner.new_box_autoadd_buy_bitcoin_request_0(); - _api_fill_to_wire_buy_bitcoin_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_check_message_request(CheckMessageRequest raw) { - final ptr = inner.new_box_autoadd_check_message_request_0(); - _api_fill_to_wire_check_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_configure_node_request( - ConfigureNodeRequest raw) { - final ptr = inner.new_box_autoadd_configure_node_request_0(); - _api_fill_to_wire_configure_node_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_connect_request(ConnectRequest raw) { - final ptr = inner.new_box_autoadd_connect_request_0(); - _api_fill_to_wire_connect_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_credentials( - GreenlightCredentials raw) { - final ptr = inner.new_box_autoadd_greenlight_credentials_0(); - _api_fill_to_wire_greenlight_credentials(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig raw) { - final ptr = inner.new_box_autoadd_greenlight_node_config_0(); - _api_fill_to_wire_greenlight_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_i64(int raw) { - return inner.new_box_autoadd_i64_0(api2wire_i64(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_list_payments_request(ListPaymentsRequest raw) { - final ptr = inner.new_box_autoadd_list_payments_request_0(); - _api_fill_to_wire_list_payments_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData raw) { - final ptr = inner.new_box_autoadd_ln_url_auth_request_data_0(); - _api_fill_to_wire_ln_url_auth_request_data(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_pay_request_0(); - _api_fill_to_wire_ln_url_pay_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_withdraw_request_0(); - _api_fill_to_wire_ln_url_withdraw_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_node_config(NodeConfig raw) { - final ptr = inner.new_box_autoadd_node_config_0(); - _api_fill_to_wire_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest raw) { - final ptr = inner.new_box_autoadd_open_channel_fee_request_0(); - _api_fill_to_wire_open_channel_fee_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_opening_fee_params(OpeningFeeParams raw) { - final ptr = inner.new_box_autoadd_opening_fee_params_0(); - _api_fill_to_wire_opening_fee_params(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_pay_onchain_request(PayOnchainRequest raw) { - final ptr = inner.new_box_autoadd_pay_onchain_request_0(); - _api_fill_to_wire_pay_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest raw) { - final ptr = inner.new_box_autoadd_prepare_onchain_payment_request_0(); - _api_fill_to_wire_prepare_onchain_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - api2wire_box_autoadd_prepare_redeem_onchain_funds_request(PrepareRedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - _api_fill_to_wire_prepare_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest raw) { - final ptr = inner.new_box_autoadd_prepare_refund_request_0(); - _api_fill_to_wire_prepare_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest raw) { - final ptr = inner.new_box_autoadd_receive_onchain_request_0(); - _api_fill_to_wire_receive_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest raw) { - final ptr = inner.new_box_autoadd_receive_payment_request_0(); - _api_fill_to_wire_receive_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_redeem_onchain_funds_request_0(); - _api_fill_to_wire_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_refund_request(RefundRequest raw) { - final ptr = inner.new_box_autoadd_refund_request_0(); - _api_fill_to_wire_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_issue_request(ReportIssueRequest raw) { - final ptr = inner.new_box_autoadd_report_issue_request_0(); - _api_fill_to_wire_report_issue_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails raw) { - final ptr = inner.new_box_autoadd_report_payment_failure_details_0(); - _api_fill_to_wire_report_payment_failure_details(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest raw) { - final ptr = inner.new_box_autoadd_reverse_swap_fees_request_0(); - _api_fill_to_wire_reverse_swap_fees_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_onchain_request(SendOnchainRequest raw) { - final ptr = inner.new_box_autoadd_send_onchain_request_0(); - _api_fill_to_wire_send_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_payment_request(SendPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_payment_request_0(); - _api_fill_to_wire_send_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_spontaneous_payment_request_0(); - _api_fill_to_wire_send_spontaneous_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_sign_message_request(SignMessageRequest raw) { - final ptr = inner.new_box_autoadd_sign_message_request_0(); - _api_fill_to_wire_sign_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_static_backup_request(StaticBackupRequest raw) { - final ptr = inner.new_box_autoadd_static_backup_request_0(); - _api_fill_to_wire_static_backup_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_u32(int raw) { - return inner.new_box_autoadd_u32_0(api2wire_u32(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_u64(int raw) { - return inner.new_box_autoadd_u64_0(api2wire_u64(raw)); - } - - @protected - int api2wire_i64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_list_metadata_filter(List raw) { - final ans = inner.new_list_metadata_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_metadata_filter(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_payment_type_filter(List raw) { - final ans = inner.new_list_payment_type_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - ans.ref.ptr[i] = api2wire_payment_type_filter(raw[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_tlv_entry(List raw) { - final ans = inner.new_list_tlv_entry_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_tlv_entry(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_opt_String(String? raw) { - return raw == null ? ffi.nullptr : api2wire_String(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_bool(bool? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_bool(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_greenlight_credentials( - GreenlightCredentials? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_greenlight_credentials(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_i64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_i64(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_opening_fee_params(OpeningFeeParams? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_opening_fee_params(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u32(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u32(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u64(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_metadata_filter(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_metadata_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_payment_type_filter( - List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_payment_type_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_tlv_entry(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_tlv_entry(raw); - } - - @protected - ffi.Pointer api2wire_opt_uint_8_list(Uint8List? raw) { - return raw == null ? ffi.nullptr : api2wire_uint_8_list(raw); - } - - @protected - int api2wire_u64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_uint_8_list(Uint8List raw) { - final ans = inner.new_uint_8_list_0(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } -// Section: finalizer - -// Section: api_fill_to_wire - - void _api_fill_to_wire_box_autoadd_buy_bitcoin_request( - BuyBitcoinRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_buy_bitcoin_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_check_message_request( - CheckMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_check_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_configure_node_request( - ConfigureNodeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_configure_node_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_connect_request( - ConnectRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_connect_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_credentials( - GreenlightCredentials apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_credentials(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_list_payments_request( - ListPaymentsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_list_payments_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_auth_request_data(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_pay_request( - LnUrlPayRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_pay_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_withdraw_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_node_config(NodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_open_channel_fee_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_opening_fee_params( - OpeningFeeParams apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_opening_fee_params(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_pay_onchain_request( - PayOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_pay_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_onchain_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_refund_request( - RefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_issue_request( - ReportIssueRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_issue_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_payment_failure_details(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_reverse_swap_fees_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_onchain_request( - SendOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_payment_request( - SendPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_spontaneous_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_sign_message_request( - SignMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_sign_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_static_backup_request( - StaticBackupRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_static_backup_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_buy_bitcoin_request(BuyBitcoinRequest apiObj, wire_BuyBitcoinRequest wireObj) { - wireObj.provider = api2wire_buy_bitcoin_provider(apiObj.provider); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - wireObj.redirect_url = api2wire_opt_String(apiObj.redirectUrl); - } - - void _api_fill_to_wire_check_message_request(CheckMessageRequest apiObj, wire_CheckMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - wireObj.pubkey = api2wire_String(apiObj.pubkey); - wireObj.signature = api2wire_String(apiObj.signature); - } - - void _api_fill_to_wire_config(Config apiObj, wire_Config wireObj) { - wireObj.breezserver = api2wire_String(apiObj.breezserver); - wireObj.chainnotifier_url = api2wire_String(apiObj.chainnotifierUrl); - wireObj.mempoolspace_url = api2wire_opt_String(apiObj.mempoolspaceUrl); - wireObj.working_dir = api2wire_String(apiObj.workingDir); - wireObj.network = api2wire_network(apiObj.network); - wireObj.payment_timeout_sec = api2wire_u32(apiObj.paymentTimeoutSec); - wireObj.default_lsp_id = api2wire_opt_String(apiObj.defaultLspId); - wireObj.api_key = api2wire_opt_String(apiObj.apiKey); - wireObj.maxfee_percent = api2wire_f64(apiObj.maxfeePercent); - wireObj.exemptfee_msat = api2wire_u64(apiObj.exemptfeeMsat); - _api_fill_to_wire_node_config(apiObj.nodeConfig, wireObj.node_config); - } - - void _api_fill_to_wire_configure_node_request( - ConfigureNodeRequest apiObj, wire_ConfigureNodeRequest wireObj) { - wireObj.close_to_address = api2wire_opt_String(apiObj.closeToAddress); - } - - void _api_fill_to_wire_connect_request(ConnectRequest apiObj, wire_ConnectRequest wireObj) { - _api_fill_to_wire_config(apiObj.config, wireObj.config); - wireObj.seed = api2wire_uint_8_list(apiObj.seed); - wireObj.restore_only = api2wire_opt_box_autoadd_bool(apiObj.restoreOnly); - } - - void _api_fill_to_wire_greenlight_credentials( - GreenlightCredentials apiObj, wire_GreenlightCredentials wireObj) { - wireObj.developer_key = api2wire_uint_8_list(apiObj.developerKey); - wireObj.developer_cert = api2wire_uint_8_list(apiObj.developerCert); - } - - void _api_fill_to_wire_greenlight_node_config( - GreenlightNodeConfig apiObj, wire_GreenlightNodeConfig wireObj) { - wireObj.partner_credentials = api2wire_opt_box_autoadd_greenlight_credentials(apiObj.partnerCredentials); - wireObj.invite_code = api2wire_opt_String(apiObj.inviteCode); - } - - void _api_fill_to_wire_list_payments_request(ListPaymentsRequest apiObj, wire_ListPaymentsRequest wireObj) { - wireObj.filters = api2wire_opt_list_payment_type_filter(apiObj.filters); - wireObj.metadata_filters = api2wire_opt_list_metadata_filter(apiObj.metadataFilters); - wireObj.from_timestamp = api2wire_opt_box_autoadd_i64(apiObj.fromTimestamp); - wireObj.to_timestamp = api2wire_opt_box_autoadd_i64(apiObj.toTimestamp); - wireObj.include_failures = api2wire_opt_box_autoadd_bool(apiObj.includeFailures); - wireObj.offset = api2wire_opt_box_autoadd_u32(apiObj.offset); - wireObj.limit = api2wire_opt_box_autoadd_u32(apiObj.limit); - } - - void _api_fill_to_wire_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, wire_LnUrlAuthRequestData wireObj) { - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.action = api2wire_opt_String(apiObj.action); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.url = api2wire_String(apiObj.url); - } - - void _api_fill_to_wire_ln_url_pay_request(LnUrlPayRequest apiObj, wire_LnUrlPayRequest wireObj) { - _api_fill_to_wire_ln_url_pay_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.use_trampoline = api2wire_bool(apiObj.useTrampoline); - wireObj.comment = api2wire_opt_String(apiObj.comment); - wireObj.payment_label = api2wire_opt_String(apiObj.paymentLabel); - wireObj.validate_success_action_url = api2wire_opt_box_autoadd_bool(apiObj.validateSuccessActionUrl); - } - - void _api_fill_to_wire_ln_url_pay_request_data( - LnUrlPayRequestData apiObj, wire_LnUrlPayRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.min_sendable = api2wire_u64(apiObj.minSendable); - wireObj.max_sendable = api2wire_u64(apiObj.maxSendable); - wireObj.metadata_str = api2wire_String(apiObj.metadataStr); - wireObj.comment_allowed = api2wire_u16(apiObj.commentAllowed); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.allows_nostr = api2wire_bool(apiObj.allowsNostr); - wireObj.nostr_pubkey = api2wire_opt_String(apiObj.nostrPubkey); - wireObj.ln_address = api2wire_opt_String(apiObj.lnAddress); - } - - void _api_fill_to_wire_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, wire_LnUrlWithdrawRequest wireObj) { - _api_fill_to_wire_ln_url_withdraw_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_opt_String(apiObj.description); - } - - void _api_fill_to_wire_ln_url_withdraw_request_data( - LnUrlWithdrawRequestData apiObj, wire_LnUrlWithdrawRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.default_description = api2wire_String(apiObj.defaultDescription); - wireObj.min_withdrawable = api2wire_u64(apiObj.minWithdrawable); - wireObj.max_withdrawable = api2wire_u64(apiObj.maxWithdrawable); - } - - void _api_fill_to_wire_metadata_filter(MetadataFilter apiObj, wire_MetadataFilter wireObj) { - wireObj.json_path = api2wire_String(apiObj.jsonPath); - wireObj.json_value = api2wire_String(apiObj.jsonValue); - } - - void _api_fill_to_wire_node_config(NodeConfig apiObj, wire_NodeConfig wireObj) { - if (apiObj is NodeConfig_Greenlight) { - var pre_config = api2wire_box_autoadd_greenlight_node_config(apiObj.config); - wireObj.tag = 0; - wireObj.kind = inner.inflate_NodeConfig_Greenlight(); - wireObj.kind.ref.Greenlight.ref.config = pre_config; - return; - } - } - - void _api_fill_to_wire_open_channel_fee_request( - OpenChannelFeeRequest apiObj, wire_OpenChannelFeeRequest wireObj) { - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - } - - void _api_fill_to_wire_opening_fee_params(OpeningFeeParams apiObj, wire_OpeningFeeParams wireObj) { - wireObj.min_msat = api2wire_u64(apiObj.minMsat); - wireObj.proportional = api2wire_u32(apiObj.proportional); - wireObj.valid_until = api2wire_String(apiObj.validUntil); - wireObj.max_idle_time = api2wire_u32(apiObj.maxIdleTime); - wireObj.max_client_to_self_delay = api2wire_u32(apiObj.maxClientToSelfDelay); - wireObj.promise = api2wire_String(apiObj.promise); - } - - void _api_fill_to_wire_pay_onchain_request(PayOnchainRequest apiObj, wire_PayOnchainRequest wireObj) { - wireObj.recipient_address = api2wire_String(apiObj.recipientAddress); - _api_fill_to_wire_prepare_onchain_payment_response(apiObj.prepareRes, wireObj.prepare_res); - } - - void _api_fill_to_wire_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, wire_PrepareOnchainPaymentRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.amount_type = api2wire_swap_amount_type(apiObj.amountType); - wireObj.claim_tx_feerate = api2wire_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_prepare_onchain_payment_response( - PrepareOnchainPaymentResponse apiObj, wire_PrepareOnchainPaymentResponse wireObj) { - wireObj.fees_hash = api2wire_String(apiObj.feesHash); - wireObj.fees_percentage = api2wire_f64(apiObj.feesPercentage); - wireObj.fees_lockup = api2wire_u64(apiObj.feesLockup); - wireObj.fees_claim = api2wire_u64(apiObj.feesClaim); - wireObj.sender_amount_sat = api2wire_u64(apiObj.senderAmountSat); - wireObj.recipient_amount_sat = api2wire_u64(apiObj.recipientAmountSat); - wireObj.total_fees = api2wire_u64(apiObj.totalFees); - } - - void _api_fill_to_wire_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, wire_PrepareRedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_prepare_refund_request( - PrepareRefundRequest apiObj, wire_PrepareRefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_receive_onchain_request( - ReceiveOnchainRequest apiObj, wire_ReceiveOnchainRequest wireObj) { - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - } - - void _api_fill_to_wire_receive_payment_request( - ReceivePaymentRequest apiObj, wire_ReceivePaymentRequest wireObj) { - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_String(apiObj.description); - wireObj.preimage = api2wire_opt_uint_8_list(apiObj.preimage); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - wireObj.use_description_hash = api2wire_opt_box_autoadd_bool(apiObj.useDescriptionHash); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - wireObj.cltv = api2wire_opt_box_autoadd_u32(apiObj.cltv); - } - - void _api_fill_to_wire_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, wire_RedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_refund_request(RefundRequest apiObj, wire_RefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_report_issue_request(ReportIssueRequest apiObj, wire_ReportIssueRequest wireObj) { - if (apiObj is ReportIssueRequest_PaymentFailure) { - var pre_data = api2wire_box_autoadd_report_payment_failure_details(apiObj.data); - wireObj.tag = 0; - wireObj.kind = inner.inflate_ReportIssueRequest_PaymentFailure(); - wireObj.kind.ref.PaymentFailure.ref.data = pre_data; - return; - } - } - - void _api_fill_to_wire_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, wire_ReportPaymentFailureDetails wireObj) { - wireObj.payment_hash = api2wire_String(apiObj.paymentHash); - wireObj.comment = api2wire_opt_String(apiObj.comment); - } - - void _api_fill_to_wire_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, wire_ReverseSwapFeesRequest wireObj) { - wireObj.send_amount_sat = api2wire_opt_box_autoadd_u64(apiObj.sendAmountSat); - wireObj.claim_tx_feerate = api2wire_opt_box_autoadd_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_send_onchain_request(SendOnchainRequest apiObj, wire_SendOnchainRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.onchain_recipient_address = api2wire_String(apiObj.onchainRecipientAddress); - wireObj.pair_hash = api2wire_String(apiObj.pairHash); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_send_payment_request(SendPaymentRequest apiObj, wire_SendPaymentRequest wireObj) { - wireObj.bolt11 = api2wire_String(apiObj.bolt11); - wireObj.use_trampoline = api2wire_bool(apiObj.useTrampoline); - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, wire_SendSpontaneousPaymentRequest wireObj) { - wireObj.node_id = api2wire_String(apiObj.nodeId); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.extra_tlvs = api2wire_opt_list_tlv_entry(apiObj.extraTlvs); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_sign_message_request(SignMessageRequest apiObj, wire_SignMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - } - - void _api_fill_to_wire_static_backup_request(StaticBackupRequest apiObj, wire_StaticBackupRequest wireObj) { - wireObj.working_dir = api2wire_String(apiObj.workingDir); - } - - void _api_fill_to_wire_tlv_entry(TlvEntry apiObj, wire_TlvEntry wireObj) { - wireObj.field_number = api2wire_u64(apiObj.fieldNumber); - wireObj.value = api2wire_uint_8_list(apiObj.value); - } -} - -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint - -/// generated by flutter_rust_bridge -class BreezSdkCoreWire implements FlutterRustBridgeWireBase { - @internal - late final dartApi = DartApiDl(init_frb_dart_api_dl); - - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - BreezSdkCoreWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - BreezSdkCoreWire.fromLookup(ffi.Pointer Function(String symbolName) lookup) - : _lookup = lookup; - - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); - } - - late final _store_dart_post_cobjectPtr = - _lookup>('store_dart_post_cobject'); - late final _store_dart_post_cobject = - _store_dart_post_cobjectPtr.asFunction(); - - Object get_dart_object( - int ptr, - ) { - return _get_dart_object( - ptr, - ); - } - - late final _get_dart_objectPtr = - _lookup>('get_dart_object'); - late final _get_dart_object = _get_dart_objectPtr.asFunction(); - - void drop_dart_object( - int ptr, - ) { - return _drop_dart_object( - ptr, - ); - } - - late final _drop_dart_objectPtr = - _lookup>('drop_dart_object'); - late final _drop_dart_object = _drop_dart_objectPtr.asFunction(); - - int new_dart_opaque( - Object handle, - ) { - return _new_dart_opaque( - handle, - ); - } - - late final _new_dart_opaquePtr = - _lookup>('new_dart_opaque'); - late final _new_dart_opaque = _new_dart_opaquePtr.asFunction(); - - int init_frb_dart_api_dl( - ffi.Pointer obj, - ) { - return _init_frb_dart_api_dl( - obj, - ); - } - - late final _init_frb_dart_api_dlPtr = - _lookup)>>('init_frb_dart_api_dl'); - late final _init_frb_dart_api_dl = - _init_frb_dart_api_dlPtr.asFunction)>(); - - void wire_connect( - int port_, - ffi.Pointer req, - ) { - return _wire_connect( - port_, - req, - ); - } - - late final _wire_connectPtr = - _lookup)>>( - 'wire_connect'); - late final _wire_connect = - _wire_connectPtr.asFunction)>(); - - void wire_is_initialized( - int port_, - ) { - return _wire_is_initialized( - port_, - ); - } - - late final _wire_is_initializedPtr = - _lookup>('wire_is_initialized'); - late final _wire_is_initialized = _wire_is_initializedPtr.asFunction(); - - void wire_sync( - int port_, - ) { - return _wire_sync( - port_, - ); - } - - late final _wire_syncPtr = _lookup>('wire_sync'); - late final _wire_sync = _wire_syncPtr.asFunction(); - - void wire_node_credentials( - int port_, - ) { - return _wire_node_credentials( - port_, - ); - } - - late final _wire_node_credentialsPtr = - _lookup>('wire_node_credentials'); - late final _wire_node_credentials = _wire_node_credentialsPtr.asFunction(); - - void wire_node_info( - int port_, - ) { - return _wire_node_info( - port_, - ); - } - - late final _wire_node_infoPtr = _lookup>('wire_node_info'); - late final _wire_node_info = _wire_node_infoPtr.asFunction(); - - void wire_configure_node( - int port_, - ffi.Pointer req, - ) { - return _wire_configure_node( - port_, - req, - ); - } - - late final _wire_configure_nodePtr = - _lookup)>>( - 'wire_configure_node'); - late final _wire_configure_node = - _wire_configure_nodePtr.asFunction)>(); - - void wire_disconnect( - int port_, - ) { - return _wire_disconnect( - port_, - ); - } - - late final _wire_disconnectPtr = - _lookup>('wire_disconnect'); - late final _wire_disconnect = _wire_disconnectPtr.asFunction(); - - void wire_sign_message( - int port_, - ffi.Pointer req, - ) { - return _wire_sign_message( - port_, - req, - ); - } - - late final _wire_sign_messagePtr = - _lookup)>>( - 'wire_sign_message'); - late final _wire_sign_message = - _wire_sign_messagePtr.asFunction)>(); - - void wire_check_message( - int port_, - ffi.Pointer req, - ) { - return _wire_check_message( - port_, - req, - ); - } - - late final _wire_check_messagePtr = - _lookup)>>( - 'wire_check_message'); - late final _wire_check_message = - _wire_check_messagePtr.asFunction)>(); - - void wire_mnemonic_to_seed( - int port_, - ffi.Pointer phrase, - ) { - return _wire_mnemonic_to_seed( - port_, - phrase, - ); - } - - late final _wire_mnemonic_to_seedPtr = - _lookup)>>( - 'wire_mnemonic_to_seed'); - late final _wire_mnemonic_to_seed = - _wire_mnemonic_to_seedPtr.asFunction)>(); - - void wire_default_config( - int port_, - int env_type, - ffi.Pointer api_key, - ffi.Pointer node_config, - ) { - return _wire_default_config( - port_, - env_type, - api_key, - node_config, - ); - } - - late final _wire_default_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('wire_default_config'); - late final _wire_default_config = _wire_default_configPtr - .asFunction, ffi.Pointer)>(); - - void wire_static_backup( - int port_, - ffi.Pointer req, - ) { - return _wire_static_backup( - port_, - req, - ); - } - - late final _wire_static_backupPtr = - _lookup)>>( - 'wire_static_backup'); - late final _wire_static_backup = - _wire_static_backupPtr.asFunction)>(); - - void wire_service_health_check( - int port_, - ffi.Pointer api_key, - ) { - return _wire_service_health_check( - port_, - api_key, - ); - } - - late final _wire_service_health_checkPtr = - _lookup)>>( - 'wire_service_health_check'); - late final _wire_service_health_check = - _wire_service_health_checkPtr.asFunction)>(); - - void wire_breez_events_stream( - int port_, - ) { - return _wire_breez_events_stream( - port_, - ); - } - - late final _wire_breez_events_streamPtr = - _lookup>('wire_breez_events_stream'); - late final _wire_breez_events_stream = _wire_breez_events_streamPtr.asFunction(); - - void wire_breez_log_stream( - int port_, - ) { - return _wire_breez_log_stream( - port_, - ); - } - - late final _wire_breez_log_streamPtr = - _lookup>('wire_breez_log_stream'); - late final _wire_breez_log_stream = _wire_breez_log_streamPtr.asFunction(); - - void wire_list_lsps( - int port_, - ) { - return _wire_list_lsps( - port_, - ); - } - - late final _wire_list_lspsPtr = _lookup>('wire_list_lsps'); - late final _wire_list_lsps = _wire_list_lspsPtr.asFunction(); - - void wire_connect_lsp( - int port_, - ffi.Pointer lsp_id, - ) { - return _wire_connect_lsp( - port_, - lsp_id, - ); - } - - late final _wire_connect_lspPtr = - _lookup)>>( - 'wire_connect_lsp'); - late final _wire_connect_lsp = - _wire_connect_lspPtr.asFunction)>(); - - void wire_lsp_id( - int port_, - ) { - return _wire_lsp_id( - port_, - ); - } - - late final _wire_lsp_idPtr = _lookup>('wire_lsp_id'); - late final _wire_lsp_id = _wire_lsp_idPtr.asFunction(); - - void wire_fetch_lsp_info( - int port_, - ffi.Pointer id, - ) { - return _wire_fetch_lsp_info( - port_, - id, - ); - } - - late final _wire_fetch_lsp_infoPtr = - _lookup)>>( - 'wire_fetch_lsp_info'); - late final _wire_fetch_lsp_info = - _wire_fetch_lsp_infoPtr.asFunction)>(); - - void wire_lsp_info( - int port_, - ) { - return _wire_lsp_info( - port_, - ); - } - - late final _wire_lsp_infoPtr = _lookup>('wire_lsp_info'); - late final _wire_lsp_info = _wire_lsp_infoPtr.asFunction(); - - void wire_close_lsp_channels( - int port_, - ) { - return _wire_close_lsp_channels( - port_, - ); - } - - late final _wire_close_lsp_channelsPtr = - _lookup>('wire_close_lsp_channels'); - late final _wire_close_lsp_channels = _wire_close_lsp_channelsPtr.asFunction(); - - void wire_register_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_register_webhook( - port_, - webhook_url, - ); - } - - late final _wire_register_webhookPtr = - _lookup)>>( - 'wire_register_webhook'); - late final _wire_register_webhook = - _wire_register_webhookPtr.asFunction)>(); - - void wire_unregister_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_unregister_webhook( - port_, - webhook_url, - ); - } - - late final _wire_unregister_webhookPtr = - _lookup)>>( - 'wire_unregister_webhook'); - late final _wire_unregister_webhook = - _wire_unregister_webhookPtr.asFunction)>(); - - void wire_backup( - int port_, - ) { - return _wire_backup( - port_, - ); - } - - late final _wire_backupPtr = _lookup>('wire_backup'); - late final _wire_backup = _wire_backupPtr.asFunction(); - - void wire_backup_status( - int port_, - ) { - return _wire_backup_status( - port_, - ); - } - - late final _wire_backup_statusPtr = - _lookup>('wire_backup_status'); - late final _wire_backup_status = _wire_backup_statusPtr.asFunction(); - - void wire_parse_invoice( - int port_, - ffi.Pointer invoice, - ) { - return _wire_parse_invoice( - port_, - invoice, - ); - } - - late final _wire_parse_invoicePtr = - _lookup)>>( - 'wire_parse_invoice'); - late final _wire_parse_invoice = - _wire_parse_invoicePtr.asFunction)>(); - - void wire_parse_input( - int port_, - ffi.Pointer input, - ) { - return _wire_parse_input( - port_, - input, - ); - } - - late final _wire_parse_inputPtr = - _lookup)>>( - 'wire_parse_input'); - late final _wire_parse_input = - _wire_parse_inputPtr.asFunction)>(); - - void wire_list_payments( - int port_, - ffi.Pointer req, - ) { - return _wire_list_payments( - port_, - req, - ); - } - - late final _wire_list_paymentsPtr = - _lookup)>>( - 'wire_list_payments'); - late final _wire_list_payments = - _wire_list_paymentsPtr.asFunction)>(); - - void wire_payment_by_hash( - int port_, - ffi.Pointer hash, - ) { - return _wire_payment_by_hash( - port_, - hash, - ); - } - - late final _wire_payment_by_hashPtr = - _lookup)>>( - 'wire_payment_by_hash'); - late final _wire_payment_by_hash = - _wire_payment_by_hashPtr.asFunction)>(); - - void wire_set_payment_metadata( - int port_, - ffi.Pointer hash, - ffi.Pointer metadata, - ) { - return _wire_set_payment_metadata( - port_, - hash, - metadata, - ); - } - - late final _wire_set_payment_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>('wire_set_payment_metadata'); - late final _wire_set_payment_metadata = _wire_set_payment_metadataPtr - .asFunction, ffi.Pointer)>(); - - void wire_send_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_payment( - port_, - req, - ); - } - - late final _wire_send_paymentPtr = - _lookup)>>( - 'wire_send_payment'); - late final _wire_send_payment = - _wire_send_paymentPtr.asFunction)>(); - - void wire_send_spontaneous_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_spontaneous_payment( - port_, - req, - ); - } - - late final _wire_send_spontaneous_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_send_spontaneous_payment'); - late final _wire_send_spontaneous_payment = _wire_send_spontaneous_paymentPtr - .asFunction)>(); - - void wire_receive_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_payment( - port_, - req, - ); - } - - late final _wire_receive_paymentPtr = - _lookup)>>( - 'wire_receive_payment'); - late final _wire_receive_payment = - _wire_receive_paymentPtr.asFunction)>(); - - void wire_lnurl_pay( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_pay( - port_, - req, - ); - } - - late final _wire_lnurl_payPtr = - _lookup)>>( - 'wire_lnurl_pay'); - late final _wire_lnurl_pay = - _wire_lnurl_payPtr.asFunction)>(); - - void wire_lnurl_withdraw( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_withdraw( - port_, - req, - ); - } - - late final _wire_lnurl_withdrawPtr = - _lookup)>>( - 'wire_lnurl_withdraw'); - late final _wire_lnurl_withdraw = - _wire_lnurl_withdrawPtr.asFunction)>(); - - void wire_lnurl_auth( - int port_, - ffi.Pointer req_data, - ) { - return _wire_lnurl_auth( - port_, - req_data, - ); - } - - late final _wire_lnurl_authPtr = - _lookup)>>( - 'wire_lnurl_auth'); - late final _wire_lnurl_auth = - _wire_lnurl_authPtr.asFunction)>(); - - void wire_report_issue( - int port_, - ffi.Pointer req, - ) { - return _wire_report_issue( - port_, - req, - ); - } - - late final _wire_report_issuePtr = - _lookup)>>( - 'wire_report_issue'); - late final _wire_report_issue = - _wire_report_issuePtr.asFunction)>(); - - void wire_fetch_fiat_rates( - int port_, - ) { - return _wire_fetch_fiat_rates( - port_, - ); - } - - late final _wire_fetch_fiat_ratesPtr = - _lookup>('wire_fetch_fiat_rates'); - late final _wire_fetch_fiat_rates = _wire_fetch_fiat_ratesPtr.asFunction(); - - void wire_list_fiat_currencies( - int port_, - ) { - return _wire_list_fiat_currencies( - port_, - ); - } - - late final _wire_list_fiat_currenciesPtr = - _lookup>('wire_list_fiat_currencies'); - late final _wire_list_fiat_currencies = _wire_list_fiat_currenciesPtr.asFunction(); - - void wire_max_reverse_swap_amount( - int port_, - ) { - return _wire_max_reverse_swap_amount( - port_, - ); - } - - late final _wire_max_reverse_swap_amountPtr = - _lookup>('wire_max_reverse_swap_amount'); - late final _wire_max_reverse_swap_amount = - _wire_max_reverse_swap_amountPtr.asFunction(); - - void wire_send_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_send_onchain( - port_, - req, - ); - } - - late final _wire_send_onchainPtr = - _lookup)>>( - 'wire_send_onchain'); - late final _wire_send_onchain = - _wire_send_onchainPtr.asFunction)>(); - - void wire_pay_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_pay_onchain( - port_, - req, - ); - } - - late final _wire_pay_onchainPtr = - _lookup)>>( - 'wire_pay_onchain'); - late final _wire_pay_onchain = - _wire_pay_onchainPtr.asFunction)>(); - - void wire_receive_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_onchain( - port_, - req, - ); - } - - late final _wire_receive_onchainPtr = - _lookup)>>( - 'wire_receive_onchain'); - late final _wire_receive_onchain = - _wire_receive_onchainPtr.asFunction)>(); - - void wire_buy_bitcoin( - int port_, - ffi.Pointer req, - ) { - return _wire_buy_bitcoin( - port_, - req, - ); - } - - late final _wire_buy_bitcoinPtr = - _lookup)>>( - 'wire_buy_bitcoin'); - late final _wire_buy_bitcoin = - _wire_buy_bitcoinPtr.asFunction)>(); - - void wire_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_redeem_onchain_fundsPtr = - _lookup)>>( - 'wire_redeem_onchain_funds'); - late final _wire_redeem_onchain_funds = _wire_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_prepare_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_prepare_redeem_onchain_fundsPtr = _lookup< - ffi - .NativeFunction)>>( - 'wire_prepare_redeem_onchain_funds'); - late final _wire_prepare_redeem_onchain_funds = _wire_prepare_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_list_refundables( - int port_, - ) { - return _wire_list_refundables( - port_, - ); - } - - late final _wire_list_refundablesPtr = - _lookup>('wire_list_refundables'); - late final _wire_list_refundables = _wire_list_refundablesPtr.asFunction(); - - void wire_prepare_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_refund( - port_, - req, - ); - } - - late final _wire_prepare_refundPtr = - _lookup)>>( - 'wire_prepare_refund'); - late final _wire_prepare_refund = - _wire_prepare_refundPtr.asFunction)>(); - - void wire_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_refund( - port_, - req, - ); - } - - late final _wire_refundPtr = - _lookup)>>( - 'wire_refund'); - late final _wire_refund = _wire_refundPtr.asFunction)>(); - - void wire_rescan_swaps( - int port_, - ) { - return _wire_rescan_swaps( - port_, - ); - } - - late final _wire_rescan_swapsPtr = - _lookup>('wire_rescan_swaps'); - late final _wire_rescan_swaps = _wire_rescan_swapsPtr.asFunction(); - - void wire_redeem_swap( - int port_, - ffi.Pointer swap_address, - ) { - return _wire_redeem_swap( - port_, - swap_address, - ); - } - - late final _wire_redeem_swapPtr = - _lookup)>>( - 'wire_redeem_swap'); - late final _wire_redeem_swap = - _wire_redeem_swapPtr.asFunction)>(); - - void wire_in_progress_swap( - int port_, - ) { - return _wire_in_progress_swap( - port_, - ); - } - - late final _wire_in_progress_swapPtr = - _lookup>('wire_in_progress_swap'); - late final _wire_in_progress_swap = _wire_in_progress_swapPtr.asFunction(); - - void wire_in_progress_reverse_swaps( - int port_, - ) { - return _wire_in_progress_reverse_swaps( - port_, - ); - } - - late final _wire_in_progress_reverse_swapsPtr = - _lookup>('wire_in_progress_reverse_swaps'); - late final _wire_in_progress_reverse_swaps = - _wire_in_progress_reverse_swapsPtr.asFunction(); - - void wire_claim_reverse_swap( - int port_, - ffi.Pointer lockup_address, - ) { - return _wire_claim_reverse_swap( - port_, - lockup_address, - ); - } - - late final _wire_claim_reverse_swapPtr = - _lookup)>>( - 'wire_claim_reverse_swap'); - late final _wire_claim_reverse_swap = - _wire_claim_reverse_swapPtr.asFunction)>(); - - void wire_open_channel_fee( - int port_, - ffi.Pointer req, - ) { - return _wire_open_channel_fee( - port_, - req, - ); - } - - late final _wire_open_channel_feePtr = - _lookup)>>( - 'wire_open_channel_fee'); - late final _wire_open_channel_fee = - _wire_open_channel_feePtr.asFunction)>(); - - void wire_fetch_reverse_swap_fees( - int port_, - ffi.Pointer req, - ) { - return _wire_fetch_reverse_swap_fees( - port_, - req, - ); - } - - late final _wire_fetch_reverse_swap_feesPtr = - _lookup)>>( - 'wire_fetch_reverse_swap_fees'); - late final _wire_fetch_reverse_swap_fees = _wire_fetch_reverse_swap_feesPtr - .asFunction)>(); - - void wire_onchain_payment_limits( - int port_, - ) { - return _wire_onchain_payment_limits( - port_, - ); - } - - late final _wire_onchain_payment_limitsPtr = - _lookup>('wire_onchain_payment_limits'); - late final _wire_onchain_payment_limits = _wire_onchain_payment_limitsPtr.asFunction(); - - void wire_prepare_onchain_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_onchain_payment( - port_, - req, - ); - } - - late final _wire_prepare_onchain_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_prepare_onchain_payment'); - late final _wire_prepare_onchain_payment = _wire_prepare_onchain_paymentPtr - .asFunction)>(); - - void wire_in_progress_onchain_payments( - int port_, - ) { - return _wire_in_progress_onchain_payments( - port_, - ); - } - - late final _wire_in_progress_onchain_paymentsPtr = - _lookup>('wire_in_progress_onchain_payments'); - late final _wire_in_progress_onchain_payments = - _wire_in_progress_onchain_paymentsPtr.asFunction(); - - void wire_recommended_fees( - int port_, - ) { - return _wire_recommended_fees( - port_, - ); - } - - late final _wire_recommended_feesPtr = - _lookup>('wire_recommended_fees'); - late final _wire_recommended_fees = _wire_recommended_feesPtr.asFunction(); - - void wire_execute_command( - int port_, - ffi.Pointer command, - ) { - return _wire_execute_command( - port_, - command, - ); - } - - late final _wire_execute_commandPtr = - _lookup)>>( - 'wire_execute_command'); - late final _wire_execute_command = - _wire_execute_commandPtr.asFunction)>(); - - void wire_generate_diagnostic_data( - int port_, - ) { - return _wire_generate_diagnostic_data( - port_, - ); - } - - late final _wire_generate_diagnostic_dataPtr = - _lookup>('wire_generate_diagnostic_data'); - late final _wire_generate_diagnostic_data = - _wire_generate_diagnostic_dataPtr.asFunction(); - - ffi.Pointer new_box_autoadd_bool_0( - bool value, - ) { - return _new_box_autoadd_bool_0( - value, - ); - } - - late final _new_box_autoadd_bool_0Ptr = - _lookup Function(ffi.Bool)>>('new_box_autoadd_bool_0'); - late final _new_box_autoadd_bool_0 = - _new_box_autoadd_bool_0Ptr.asFunction Function(bool)>(); - - ffi.Pointer new_box_autoadd_buy_bitcoin_request_0() { - return _new_box_autoadd_buy_bitcoin_request_0(); - } - - late final _new_box_autoadd_buy_bitcoin_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_buy_bitcoin_request_0'); - late final _new_box_autoadd_buy_bitcoin_request_0 = - _new_box_autoadd_buy_bitcoin_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_check_message_request_0() { - return _new_box_autoadd_check_message_request_0(); - } - - late final _new_box_autoadd_check_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_check_message_request_0'); - late final _new_box_autoadd_check_message_request_0 = _new_box_autoadd_check_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_configure_node_request_0() { - return _new_box_autoadd_configure_node_request_0(); - } - - late final _new_box_autoadd_configure_node_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_configure_node_request_0'); - late final _new_box_autoadd_configure_node_request_0 = _new_box_autoadd_configure_node_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_connect_request_0() { - return _new_box_autoadd_connect_request_0(); - } - - late final _new_box_autoadd_connect_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_connect_request_0'); - late final _new_box_autoadd_connect_request_0 = - _new_box_autoadd_connect_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_credentials_0() { - return _new_box_autoadd_greenlight_credentials_0(); - } - - late final _new_box_autoadd_greenlight_credentials_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_credentials_0'); - late final _new_box_autoadd_greenlight_credentials_0 = _new_box_autoadd_greenlight_credentials_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_node_config_0() { - return _new_box_autoadd_greenlight_node_config_0(); - } - - late final _new_box_autoadd_greenlight_node_config_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_node_config_0'); - late final _new_box_autoadd_greenlight_node_config_0 = _new_box_autoadd_greenlight_node_config_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_i64_0( - int value, - ) { - return _new_box_autoadd_i64_0( - value, - ); - } - - late final _new_box_autoadd_i64_0Ptr = - _lookup Function(ffi.Int64)>>('new_box_autoadd_i64_0'); - late final _new_box_autoadd_i64_0 = - _new_box_autoadd_i64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_list_payments_request_0() { - return _new_box_autoadd_list_payments_request_0(); - } - - late final _new_box_autoadd_list_payments_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_list_payments_request_0'); - late final _new_box_autoadd_list_payments_request_0 = _new_box_autoadd_list_payments_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_auth_request_data_0() { - return _new_box_autoadd_ln_url_auth_request_data_0(); - } - - late final _new_box_autoadd_ln_url_auth_request_data_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_auth_request_data_0'); - late final _new_box_autoadd_ln_url_auth_request_data_0 = _new_box_autoadd_ln_url_auth_request_data_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_pay_request_0() { - return _new_box_autoadd_ln_url_pay_request_0(); - } - - late final _new_box_autoadd_ln_url_pay_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_pay_request_0'); - late final _new_box_autoadd_ln_url_pay_request_0 = - _new_box_autoadd_ln_url_pay_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_withdraw_request_0() { - return _new_box_autoadd_ln_url_withdraw_request_0(); - } - - late final _new_box_autoadd_ln_url_withdraw_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_withdraw_request_0'); - late final _new_box_autoadd_ln_url_withdraw_request_0 = _new_box_autoadd_ln_url_withdraw_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_node_config_0() { - return _new_box_autoadd_node_config_0(); - } - - late final _new_box_autoadd_node_config_0Ptr = - _lookup Function()>>('new_box_autoadd_node_config_0'); - late final _new_box_autoadd_node_config_0 = - _new_box_autoadd_node_config_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_open_channel_fee_request_0() { - return _new_box_autoadd_open_channel_fee_request_0(); - } - - late final _new_box_autoadd_open_channel_fee_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_open_channel_fee_request_0'); - late final _new_box_autoadd_open_channel_fee_request_0 = _new_box_autoadd_open_channel_fee_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_opening_fee_params_0() { - return _new_box_autoadd_opening_fee_params_0(); - } - - late final _new_box_autoadd_opening_fee_params_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_opening_fee_params_0'); - late final _new_box_autoadd_opening_fee_params_0 = - _new_box_autoadd_opening_fee_params_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_pay_onchain_request_0() { - return _new_box_autoadd_pay_onchain_request_0(); - } - - late final _new_box_autoadd_pay_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_pay_onchain_request_0'); - late final _new_box_autoadd_pay_onchain_request_0 = - _new_box_autoadd_pay_onchain_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_onchain_payment_request_0() { - return _new_box_autoadd_prepare_onchain_payment_request_0(); - } - - late final _new_box_autoadd_prepare_onchain_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_onchain_payment_request_0'); - late final _new_box_autoadd_prepare_onchain_payment_request_0 = - _new_box_autoadd_prepare_onchain_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer - new_box_autoadd_prepare_redeem_onchain_funds_request_0() { - return _new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0 = - _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_refund_request_0() { - return _new_box_autoadd_prepare_refund_request_0(); - } - - late final _new_box_autoadd_prepare_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_refund_request_0'); - late final _new_box_autoadd_prepare_refund_request_0 = _new_box_autoadd_prepare_refund_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_onchain_request_0() { - return _new_box_autoadd_receive_onchain_request_0(); - } - - late final _new_box_autoadd_receive_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_onchain_request_0'); - late final _new_box_autoadd_receive_onchain_request_0 = _new_box_autoadd_receive_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_payment_request_0() { - return _new_box_autoadd_receive_payment_request_0(); - } - - late final _new_box_autoadd_receive_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_payment_request_0'); - late final _new_box_autoadd_receive_payment_request_0 = _new_box_autoadd_receive_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_redeem_onchain_funds_request_0() { - return _new_box_autoadd_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_redeem_onchain_funds_request_0 = - _new_box_autoadd_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_refund_request_0() { - return _new_box_autoadd_refund_request_0(); - } - - late final _new_box_autoadd_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_refund_request_0'); - late final _new_box_autoadd_refund_request_0 = - _new_box_autoadd_refund_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_issue_request_0() { - return _new_box_autoadd_report_issue_request_0(); - } - - late final _new_box_autoadd_report_issue_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_issue_request_0'); - late final _new_box_autoadd_report_issue_request_0 = _new_box_autoadd_report_issue_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_payment_failure_details_0() { - return _new_box_autoadd_report_payment_failure_details_0(); - } - - late final _new_box_autoadd_report_payment_failure_details_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_payment_failure_details_0'); - late final _new_box_autoadd_report_payment_failure_details_0 = - _new_box_autoadd_report_payment_failure_details_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_reverse_swap_fees_request_0() { - return _new_box_autoadd_reverse_swap_fees_request_0(); - } - - late final _new_box_autoadd_reverse_swap_fees_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_reverse_swap_fees_request_0'); - late final _new_box_autoadd_reverse_swap_fees_request_0 = _new_box_autoadd_reverse_swap_fees_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_onchain_request_0() { - return _new_box_autoadd_send_onchain_request_0(); - } - - late final _new_box_autoadd_send_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_onchain_request_0'); - late final _new_box_autoadd_send_onchain_request_0 = _new_box_autoadd_send_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_payment_request_0() { - return _new_box_autoadd_send_payment_request_0(); - } - - late final _new_box_autoadd_send_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_payment_request_0'); - late final _new_box_autoadd_send_payment_request_0 = _new_box_autoadd_send_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_spontaneous_payment_request_0() { - return _new_box_autoadd_send_spontaneous_payment_request_0(); - } - - late final _new_box_autoadd_send_spontaneous_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_spontaneous_payment_request_0'); - late final _new_box_autoadd_send_spontaneous_payment_request_0 = - _new_box_autoadd_send_spontaneous_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_sign_message_request_0() { - return _new_box_autoadd_sign_message_request_0(); - } - - late final _new_box_autoadd_sign_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_sign_message_request_0'); - late final _new_box_autoadd_sign_message_request_0 = _new_box_autoadd_sign_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_static_backup_request_0() { - return _new_box_autoadd_static_backup_request_0(); - } - - late final _new_box_autoadd_static_backup_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_static_backup_request_0'); - late final _new_box_autoadd_static_backup_request_0 = _new_box_autoadd_static_backup_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_u32_0( - int value, - ) { - return _new_box_autoadd_u32_0( - value, - ); - } - - late final _new_box_autoadd_u32_0Ptr = - _lookup Function(ffi.Uint32)>>('new_box_autoadd_u32_0'); - late final _new_box_autoadd_u32_0 = - _new_box_autoadd_u32_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_u64_0( - int value, - ) { - return _new_box_autoadd_u64_0( - value, - ); - } - - late final _new_box_autoadd_u64_0Ptr = - _lookup Function(ffi.Uint64)>>('new_box_autoadd_u64_0'); - late final _new_box_autoadd_u64_0 = - _new_box_autoadd_u64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_metadata_filter_0( - int len, - ) { - return _new_list_metadata_filter_0( - len, - ); - } - - late final _new_list_metadata_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_metadata_filter_0'); - late final _new_list_metadata_filter_0 = - _new_list_metadata_filter_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_payment_type_filter_0( - int len, - ) { - return _new_list_payment_type_filter_0( - len, - ); - } - - late final _new_list_payment_type_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_payment_type_filter_0'); - late final _new_list_payment_type_filter_0 = _new_list_payment_type_filter_0Ptr - .asFunction Function(int)>(); - - ffi.Pointer new_list_tlv_entry_0( - int len, - ) { - return _new_list_tlv_entry_0( - len, - ); - } - - late final _new_list_tlv_entry_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_tlv_entry_0'); - late final _new_list_tlv_entry_0 = - _new_list_tlv_entry_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_uint_8_list_0( - int len, - ) { - return _new_uint_8_list_0( - len, - ); - } - - late final _new_uint_8_list_0Ptr = - _lookup Function(ffi.Int32)>>('new_uint_8_list_0'); - late final _new_uint_8_list_0 = - _new_uint_8_list_0Ptr.asFunction Function(int)>(); - - ffi.Pointer inflate_NodeConfig_Greenlight() { - return _inflate_NodeConfig_Greenlight(); - } - - late final _inflate_NodeConfig_GreenlightPtr = - _lookup Function()>>('inflate_NodeConfig_Greenlight'); - late final _inflate_NodeConfig_Greenlight = - _inflate_NodeConfig_GreenlightPtr.asFunction Function()>(); - - ffi.Pointer inflate_ReportIssueRequest_PaymentFailure() { - return _inflate_ReportIssueRequest_PaymentFailure(); - } - - late final _inflate_ReportIssueRequest_PaymentFailurePtr = - _lookup Function()>>( - 'inflate_ReportIssueRequest_PaymentFailure'); - late final _inflate_ReportIssueRequest_PaymentFailure = _inflate_ReportIssueRequest_PaymentFailurePtr - .asFunction Function()>(); - - void free_WireSyncReturn( - WireSyncReturn ptr, - ) { - return _free_WireSyncReturn( - ptr, - ); - } - - late final _free_WireSyncReturnPtr = - _lookup>('free_WireSyncReturn'); - late final _free_WireSyncReturn = _free_WireSyncReturnPtr.asFunction(); -} - -final class _Dart_Handle extends ffi.Opaque {} - -final class wire_uint_8_list extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_GreenlightCredentials extends ffi.Struct { - external ffi.Pointer developer_key; - - external ffi.Pointer developer_cert; -} - -final class wire_GreenlightNodeConfig extends ffi.Struct { - external ffi.Pointer partner_credentials; - - external ffi.Pointer invite_code; -} - -final class wire_NodeConfig_Greenlight extends ffi.Struct { - external ffi.Pointer config; -} - -final class NodeConfigKind extends ffi.Union { - external ffi.Pointer Greenlight; -} - -final class wire_NodeConfig extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_Config extends ffi.Struct { - external ffi.Pointer breezserver; - - external ffi.Pointer chainnotifier_url; - - external ffi.Pointer mempoolspace_url; - - external ffi.Pointer working_dir; - - @ffi.Int32() - external int network; - - @ffi.Uint32() - external int payment_timeout_sec; - - external ffi.Pointer default_lsp_id; - - external ffi.Pointer api_key; - - @ffi.Double() - external double maxfee_percent; - - @ffi.Uint64() - external int exemptfee_msat; - - external wire_NodeConfig node_config; -} - -final class wire_ConnectRequest extends ffi.Struct { - external wire_Config config; - - external ffi.Pointer seed; - - external ffi.Pointer restore_only; -} - -final class wire_ConfigureNodeRequest extends ffi.Struct { - external ffi.Pointer close_to_address; -} - -final class wire_SignMessageRequest extends ffi.Struct { - external ffi.Pointer message; -} - -final class wire_CheckMessageRequest extends ffi.Struct { - external ffi.Pointer message; - - external ffi.Pointer pubkey; - - external ffi.Pointer signature; -} - -final class wire_StaticBackupRequest extends ffi.Struct { - external ffi.Pointer working_dir; -} - -final class wire_list_payment_type_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_MetadataFilter extends ffi.Struct { - external ffi.Pointer json_path; - - external ffi.Pointer json_value; -} - -final class wire_list_metadata_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_ListPaymentsRequest extends ffi.Struct { - external ffi.Pointer filters; - - external ffi.Pointer metadata_filters; - - external ffi.Pointer from_timestamp; - - external ffi.Pointer to_timestamp; - - external ffi.Pointer include_failures; - - external ffi.Pointer offset; - - external ffi.Pointer limit; -} - -final class wire_SendPaymentRequest extends ffi.Struct { - external ffi.Pointer bolt11; - - @ffi.Bool() - external bool use_trampoline; - - external ffi.Pointer amount_msat; - - external ffi.Pointer label; -} - -final class wire_TlvEntry extends ffi.Struct { - @ffi.Uint64() - external int field_number; - - external ffi.Pointer value; -} - -final class wire_list_tlv_entry extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_SendSpontaneousPaymentRequest extends ffi.Struct { - external ffi.Pointer node_id; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer extra_tlvs; - - external ffi.Pointer label; -} - -final class wire_OpeningFeeParams extends ffi.Struct { - @ffi.Uint64() - external int min_msat; - - @ffi.Uint32() - external int proportional; - - external ffi.Pointer valid_until; - - @ffi.Uint32() - external int max_idle_time; - - @ffi.Uint32() - external int max_client_to_self_delay; - - external ffi.Pointer promise; -} - -final class wire_ReceivePaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; - - external ffi.Pointer preimage; - - external ffi.Pointer opening_fee_params; - - external ffi.Pointer use_description_hash; - - external ffi.Pointer expiry; - - external ffi.Pointer cltv; -} - -final class wire_LnUrlPayRequestData extends ffi.Struct { - external ffi.Pointer callback; - - @ffi.Uint64() - external int min_sendable; - - @ffi.Uint64() - external int max_sendable; - - external ffi.Pointer metadata_str; - - @ffi.Uint16() - external int comment_allowed; - - external ffi.Pointer domain; - - @ffi.Bool() - external bool allows_nostr; - - external ffi.Pointer nostr_pubkey; - - external ffi.Pointer ln_address; -} - -final class wire_LnUrlPayRequest extends ffi.Struct { - external wire_LnUrlPayRequestData data; - - @ffi.Uint64() - external int amount_msat; - - @ffi.Bool() - external bool use_trampoline; - - external ffi.Pointer comment; - - external ffi.Pointer payment_label; - - external ffi.Pointer validate_success_action_url; -} - -final class wire_LnUrlWithdrawRequestData extends ffi.Struct { - external ffi.Pointer callback; - - external ffi.Pointer k1; - - external ffi.Pointer default_description; - - @ffi.Uint64() - external int min_withdrawable; - - @ffi.Uint64() - external int max_withdrawable; -} - -final class wire_LnUrlWithdrawRequest extends ffi.Struct { - external wire_LnUrlWithdrawRequestData data; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; -} - -final class wire_LnUrlAuthRequestData extends ffi.Struct { - external ffi.Pointer k1; - - external ffi.Pointer action; - - external ffi.Pointer domain; - - external ffi.Pointer url; -} - -final class wire_ReportPaymentFailureDetails extends ffi.Struct { - external ffi.Pointer payment_hash; - - external ffi.Pointer comment; -} - -final class wire_ReportIssueRequest_PaymentFailure extends ffi.Struct { - external ffi.Pointer data; -} - -final class ReportIssueRequestKind extends ffi.Union { - external ffi.Pointer PaymentFailure; -} - -final class wire_ReportIssueRequest extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_SendOnchainRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - external ffi.Pointer onchain_recipient_address; - - external ffi.Pointer pair_hash; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareOnchainPaymentResponse extends ffi.Struct { - external ffi.Pointer fees_hash; - - @ffi.Double() - external double fees_percentage; - - @ffi.Uint64() - external int fees_lockup; - - @ffi.Uint64() - external int fees_claim; - - @ffi.Uint64() - external int sender_amount_sat; - - @ffi.Uint64() - external int recipient_amount_sat; - - @ffi.Uint64() - external int total_fees; -} - -final class wire_PayOnchainRequest extends ffi.Struct { - external ffi.Pointer recipient_address; - - external wire_PrepareOnchainPaymentResponse prepare_res; -} - -final class wire_ReceiveOnchainRequest extends ffi.Struct { - external ffi.Pointer opening_fee_params; -} - -final class wire_BuyBitcoinRequest extends ffi.Struct { - @ffi.Int32() - external int provider; - - external ffi.Pointer opening_fee_params; - - external ffi.Pointer redirect_url; -} - -final class wire_RedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_RefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_OpenChannelFeeRequest extends ffi.Struct { - external ffi.Pointer amount_msat; - - external ffi.Pointer expiry; -} - -final class wire_ReverseSwapFeesRequest extends ffi.Struct { - external ffi.Pointer send_amount_sat; - - external ffi.Pointer claim_tx_feerate; -} - -final class wire_PrepareOnchainPaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - @ffi.Int32() - external int amount_type; - - @ffi.Uint32() - external int claim_tx_feerate; -} - -typedef DartPostCObjectFnType - = ffi.Pointer message)>>; -typedef DartPort = ffi.Int64; - -const int SWAP_PAYMENT_FEE_EXPIRY_SECONDS = 172800; - -const int INVOICE_PAYMENT_FEE_EXPIRY_SECONDS = 3600; - -const int ESTIMATED_CLAIM_TX_VSIZE = 138; - -const int ESTIMATED_LOCKUP_TX_VSIZE = 153; - -const int MOCK_REVERSE_SWAP_MIN = 50000; - -const int MOCK_REVERSE_SWAP_MAX = 1000000; diff --git a/libs/sdk-flutter/lib/bridge_generated.freezed.dart b/libs/sdk-flutter/lib/bridge_generated.freezed.dart deleted file mode 100644 index 15ddfc256..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.freezed.dart +++ /dev/null @@ -1,6327 +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 'bridge_generated.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 _$AesSuccessActionDataResult { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AesSuccessActionDataResultCopyWith<$Res> { - factory $AesSuccessActionDataResultCopyWith( - AesSuccessActionDataResult value, $Res Function(AesSuccessActionDataResult) then) = - _$AesSuccessActionDataResultCopyWithImpl<$Res, AesSuccessActionDataResult>; -} - -/// @nodoc -class _$AesSuccessActionDataResultCopyWithImpl<$Res, $Val extends AesSuccessActionDataResult> - implements $AesSuccessActionDataResultCopyWith<$Res> { - _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( - _$AesSuccessActionDataResult_DecryptedImpl value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataDecrypted data}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_DecryptedImpl> - implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl(_$AesSuccessActionDataResult_DecryptedImpl _value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$AesSuccessActionDataResult_DecryptedImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataDecrypted, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_DecryptedImpl implements AesSuccessActionDataResult_Decrypted { - const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}); - - @override - final AesSuccessActionDataDecrypted data; - - @override - String toString() { - return 'AesSuccessActionDataResult.decrypted(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_DecryptedImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< - _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return decrypted(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return decrypted?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return decrypted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return decrypted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_Decrypted implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_Decrypted({required final AesSuccessActionDataDecrypted data}) = - _$AesSuccessActionDataResult_DecryptedImpl; - - AesSuccessActionDataDecrypted get data; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( - _$AesSuccessActionDataResult_ErrorStatusImpl value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({String reason}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_ErrorStatusImpl> - implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( - _$AesSuccessActionDataResult_ErrorStatusImpl _value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? reason = null, - }) { - return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_ErrorStatusImpl implements AesSuccessActionDataResult_ErrorStatus { - const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}); - - @override - final String reason; - - @override - String toString() { - return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_ErrorStatusImpl && - (identical(other.reason, reason) || other.reason == reason)); - } - - @override - int get hashCode => Object.hash(runtimeType, reason); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< - _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return errorStatus(reason); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return errorStatus?.call(reason); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(reason); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_ErrorStatus implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_ErrorStatus({required final String reason}) = - _$AesSuccessActionDataResult_ErrorStatusImpl; - - String get reason; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BreezEvent { - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BreezEventCopyWith<$Res> { - factory $BreezEventCopyWith(BreezEvent value, $Res Function(BreezEvent) then) = - _$BreezEventCopyWithImpl<$Res, BreezEvent>; -} - -/// @nodoc -class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> implements $BreezEventCopyWith<$Res> { - _$BreezEventCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { - factory _$$BreezEvent_NewBlockImplCopyWith( - _$BreezEvent_NewBlockImpl value, $Res Function(_$BreezEvent_NewBlockImpl) then) = - __$$BreezEvent_NewBlockImplCopyWithImpl<$Res>; - @useResult - $Res call({int block}); -} - -/// @nodoc -class __$$BreezEvent_NewBlockImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_NewBlockImpl> - implements _$$BreezEvent_NewBlockImplCopyWith<$Res> { - __$$BreezEvent_NewBlockImplCopyWithImpl( - _$BreezEvent_NewBlockImpl _value, $Res Function(_$BreezEvent_NewBlockImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? block = null, - }) { - return _then(_$BreezEvent_NewBlockImpl( - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$BreezEvent_NewBlockImpl implements BreezEvent_NewBlock { - const _$BreezEvent_NewBlockImpl({required this.block}); - - @override - final int block; - - @override - String toString() { - return 'BreezEvent.newBlock(block: $block)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_NewBlockImpl && - (identical(other.block, block) || other.block == block)); - } - - @override - int get hashCode => Object.hash(runtimeType, block); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return newBlock(block); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return newBlock?.call(block); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(block); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return newBlock(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return newBlock?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(this); - } - return orElse(); - } -} - -abstract class BreezEvent_NewBlock implements BreezEvent { - const factory BreezEvent_NewBlock({required final int block}) = _$BreezEvent_NewBlockImpl; - - int get block; - @JsonKey(ignore: true) - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - factory _$$BreezEvent_InvoicePaidImplCopyWith( - _$BreezEvent_InvoicePaidImpl value, $Res Function(_$BreezEvent_InvoicePaidImpl) then) = - __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res>; - @useResult - $Res call({InvoicePaidDetails details}); -} - -/// @nodoc -class __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_InvoicePaidImpl> - implements _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - __$$BreezEvent_InvoicePaidImplCopyWithImpl( - _$BreezEvent_InvoicePaidImpl _value, $Res Function(_$BreezEvent_InvoicePaidImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_InvoicePaidImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as InvoicePaidDetails, - )); - } -} - -/// @nodoc - -class _$BreezEvent_InvoicePaidImpl implements BreezEvent_InvoicePaid { - const _$BreezEvent_InvoicePaidImpl({required this.details}); - - @override - final InvoicePaidDetails details; - - @override - String toString() { - return 'BreezEvent.invoicePaid(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_InvoicePaidImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => - __$$BreezEvent_InvoicePaidImplCopyWithImpl<_$BreezEvent_InvoicePaidImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return invoicePaid(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return invoicePaid?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return invoicePaid(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return invoicePaid?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(this); - } - return orElse(); - } -} - -abstract class BreezEvent_InvoicePaid implements BreezEvent { - const factory BreezEvent_InvoicePaid({required final InvoicePaidDetails details}) = - _$BreezEvent_InvoicePaidImpl; - - InvoicePaidDetails get details; - @JsonKey(ignore: true) - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { - factory _$$BreezEvent_SyncedImplCopyWith( - _$BreezEvent_SyncedImpl value, $Res Function(_$BreezEvent_SyncedImpl) then) = - __$$BreezEvent_SyncedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_SyncedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SyncedImpl> - implements _$$BreezEvent_SyncedImplCopyWith<$Res> { - __$$BreezEvent_SyncedImplCopyWithImpl( - _$BreezEvent_SyncedImpl _value, $Res Function(_$BreezEvent_SyncedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_SyncedImpl implements BreezEvent_Synced { - const _$BreezEvent_SyncedImpl(); - - @override - String toString() { - return 'BreezEvent.synced()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return synced(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return synced?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return synced(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return synced?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(this); - } - return orElse(); - } -} - -abstract class BreezEvent_Synced implements BreezEvent { - const factory BreezEvent_Synced() = _$BreezEvent_SyncedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentSucceedImplCopyWith( - _$BreezEvent_PaymentSucceedImpl value, $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = - __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res>; - @useResult - $Res call({Payment details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentSucceedImpl> - implements _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - __$$BreezEvent_PaymentSucceedImplCopyWithImpl( - _$BreezEvent_PaymentSucceedImpl _value, $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentSucceedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as Payment, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentSucceedImpl implements BreezEvent_PaymentSucceed { - const _$BreezEvent_PaymentSucceedImpl({required this.details}); - - @override - final Payment details; - - @override - String toString() { - return 'BreezEvent.paymentSucceed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentSucceedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => - __$$BreezEvent_PaymentSucceedImplCopyWithImpl<_$BreezEvent_PaymentSucceedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentSucceed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentSucceed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentSucceed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentSucceed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentSucceed implements BreezEvent { - const factory BreezEvent_PaymentSucceed({required final Payment details}) = _$BreezEvent_PaymentSucceedImpl; - - Payment get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentFailedImplCopyWith( - _$BreezEvent_PaymentFailedImpl value, $Res Function(_$BreezEvent_PaymentFailedImpl) then) = - __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({PaymentFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentFailedImpl> - implements _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - __$$BreezEvent_PaymentFailedImplCopyWithImpl( - _$BreezEvent_PaymentFailedImpl _value, $Res Function(_$BreezEvent_PaymentFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as PaymentFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentFailedImpl implements BreezEvent_PaymentFailed { - const _$BreezEvent_PaymentFailedImpl({required this.details}); - - @override - final PaymentFailedData details; - - @override - String toString() { - return 'BreezEvent.paymentFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => - __$$BreezEvent_PaymentFailedImplCopyWithImpl<_$BreezEvent_PaymentFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentFailed implements BreezEvent { - const factory BreezEvent_PaymentFailed({required final PaymentFailedData details}) = - _$BreezEvent_PaymentFailedImpl; - - PaymentFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupStartedImplCopyWith( - _$BreezEvent_BackupStartedImpl value, $Res Function(_$BreezEvent_BackupStartedImpl) then) = - __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupStartedImpl> - implements _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - __$$BreezEvent_BackupStartedImplCopyWithImpl( - _$BreezEvent_BackupStartedImpl _value, $Res Function(_$BreezEvent_BackupStartedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupStartedImpl implements BreezEvent_BackupStarted { - const _$BreezEvent_BackupStartedImpl(); - - @override - String toString() { - return 'BreezEvent.backupStarted()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_BackupStartedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupStarted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupStarted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupStarted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupStarted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupStarted implements BreezEvent { - const factory BreezEvent_BackupStarted() = _$BreezEvent_BackupStartedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - factory _$$BreezEvent_BackupSucceededImplCopyWith( - _$BreezEvent_BackupSucceededImpl value, $Res Function(_$BreezEvent_BackupSucceededImpl) then) = - __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupSucceededImpl> - implements _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - __$$BreezEvent_BackupSucceededImplCopyWithImpl( - _$BreezEvent_BackupSucceededImpl _value, $Res Function(_$BreezEvent_BackupSucceededImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupSucceededImpl implements BreezEvent_BackupSucceeded { - const _$BreezEvent_BackupSucceededImpl(); - - @override - String toString() { - return 'BreezEvent.backupSucceeded()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_BackupSucceededImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupSucceeded(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupSucceeded?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupSucceeded(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupSucceeded?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupSucceeded implements BreezEvent { - const factory BreezEvent_BackupSucceeded() = _$BreezEvent_BackupSucceededImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupFailedImplCopyWith( - _$BreezEvent_BackupFailedImpl value, $Res Function(_$BreezEvent_BackupFailedImpl) then) = - __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({BackupFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupFailedImpl> - implements _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - __$$BreezEvent_BackupFailedImplCopyWithImpl( - _$BreezEvent_BackupFailedImpl _value, $Res Function(_$BreezEvent_BackupFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_BackupFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as BackupFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_BackupFailedImpl implements BreezEvent_BackupFailed { - const _$BreezEvent_BackupFailedImpl({required this.details}); - - @override - final BackupFailedData details; - - @override - String toString() { - return 'BreezEvent.backupFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => - __$$BreezEvent_BackupFailedImplCopyWithImpl<_$BreezEvent_BackupFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupFailed implements BreezEvent { - const factory BreezEvent_BackupFailed({required final BackupFailedData details}) = - _$BreezEvent_BackupFailedImpl; - - BackupFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { - factory _$$BreezEvent_ReverseSwapUpdatedImplCopyWith(_$BreezEvent_ReverseSwapUpdatedImpl value, - $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) then) = - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res>; - @useResult - $Res call({ReverseSwapInfo details}); -} - -/// @nodoc -class __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_ReverseSwapUpdatedImpl> - implements _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl( - _$BreezEvent_ReverseSwapUpdatedImpl _value, $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_ReverseSwapUpdatedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as ReverseSwapInfo, - )); - } -} - -/// @nodoc - -class _$BreezEvent_ReverseSwapUpdatedImpl implements BreezEvent_ReverseSwapUpdated { - const _$BreezEvent_ReverseSwapUpdatedImpl({required this.details}); - - @override - final ReverseSwapInfo details; - - @override - String toString() { - return 'BreezEvent.reverseSwapUpdated(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_ReverseSwapUpdatedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<_$BreezEvent_ReverseSwapUpdatedImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return reverseSwapUpdated(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return reverseSwapUpdated?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (reverseSwapUpdated != null) { - return reverseSwapUpdated(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return reverseSwapUpdated(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return reverseSwapUpdated?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (reverseSwapUpdated != null) { - return reverseSwapUpdated(this); - } - return orElse(); - } -} - -abstract class BreezEvent_ReverseSwapUpdated implements BreezEvent { - const factory BreezEvent_ReverseSwapUpdated({required final ReverseSwapInfo details}) = - _$BreezEvent_ReverseSwapUpdatedImpl; - - ReverseSwapInfo get details; - @JsonKey(ignore: true) - _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - factory _$$BreezEvent_SwapUpdatedImplCopyWith( - _$BreezEvent_SwapUpdatedImpl value, $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = - __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res>; - @useResult - $Res call({SwapInfo details}); -} - -/// @nodoc -class __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SwapUpdatedImpl> - implements _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - __$$BreezEvent_SwapUpdatedImplCopyWithImpl( - _$BreezEvent_SwapUpdatedImpl _value, $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_SwapUpdatedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as SwapInfo, - )); - } -} - -/// @nodoc - -class _$BreezEvent_SwapUpdatedImpl implements BreezEvent_SwapUpdated { - const _$BreezEvent_SwapUpdatedImpl({required this.details}); - - @override - final SwapInfo details; - - @override - String toString() { - return 'BreezEvent.swapUpdated(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_SwapUpdatedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => - __$$BreezEvent_SwapUpdatedImplCopyWithImpl<_$BreezEvent_SwapUpdatedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return swapUpdated(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return swapUpdated?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return swapUpdated(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return swapUpdated?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(this); - } - return orElse(); - } -} - -abstract class BreezEvent_SwapUpdated implements BreezEvent { - const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = _$BreezEvent_SwapUpdatedImpl; - - SwapInfo get details; - @JsonKey(ignore: true) - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$InputType { - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $InputTypeCopyWith<$Res> { - factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = - _$InputTypeCopyWithImpl<$Res, InputType>; -} - -/// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTypeCopyWith<$Res> { - _$InputTypeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { - factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, $Res Function(_$InputType_BitcoinAddressImpl) then) = - __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; - @useResult - $Res call({BitcoinAddressData address}); -} - -/// @nodoc -class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> - implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { - __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, $Res Function(_$InputType_BitcoinAddressImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_$InputType_BitcoinAddressImpl( - address: null == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as BitcoinAddressData, - )); - } -} - -/// @nodoc - -class _$InputType_BitcoinAddressImpl implements InputType_BitcoinAddress { - const _$InputType_BitcoinAddressImpl({required this.address}); - - @override - final BitcoinAddressData address; - - @override - String toString() { - return 'InputType.bitcoinAddress(address: $address)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_BitcoinAddressImpl && - (identical(other.address, address) || other.address == address)); - } - - @override - int get hashCode => Object.hash(runtimeType, address); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - __$$InputType_BitcoinAddressImplCopyWithImpl<_$InputType_BitcoinAddressImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bitcoinAddress(address); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bitcoinAddress?.call(address); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(address); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bitcoinAddress(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bitcoinAddress?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(this); - } - return orElse(); - } -} - -abstract class InputType_BitcoinAddress implements InputType { - const factory InputType_BitcoinAddress({required final BitcoinAddressData address}) = - _$InputType_BitcoinAddressImpl; - - BitcoinAddressData get address; - @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith( - _$InputType_Bolt11Impl value, $Res Function(_$InputType_Bolt11Impl) then) = - __$$InputType_Bolt11ImplCopyWithImpl<$Res>; - @useResult - $Res call({LNInvoice invoice}); -} - -/// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> - implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl( - _$InputType_Bolt11Impl _value, $Res Function(_$InputType_Bolt11Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? invoice = null, - }) { - return _then(_$InputType_Bolt11Impl( - invoice: null == invoice - ? _value.invoice - : invoice // ignore: cast_nullable_to_non_nullable - as LNInvoice, - )); - } -} - -/// @nodoc - -class _$InputType_Bolt11Impl implements InputType_Bolt11 { - const _$InputType_Bolt11Impl({required this.invoice}); - - @override - final LNInvoice invoice; - - @override - String toString() { - return 'InputType.bolt11(invoice: $invoice)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_Bolt11Impl && - (identical(other.invoice, invoice) || other.invoice == invoice)); - } - - @override - int get hashCode => Object.hash(runtimeType, invoice); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bolt11(invoice); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bolt11?.call(invoice); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(invoice); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bolt11(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bolt11?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(this); - } - return orElse(); - } -} - -abstract class InputType_Bolt11 implements InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = _$InputType_Bolt11Impl; - - LNInvoice get invoice; - @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith( - _$InputType_NodeIdImpl value, $Res Function(_$InputType_NodeIdImpl) then) = - __$$InputType_NodeIdImplCopyWithImpl<$Res>; - @useResult - $Res call({String nodeId}); -} - -/// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> - implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl( - _$InputType_NodeIdImpl _value, $Res Function(_$InputType_NodeIdImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? nodeId = null, - }) { - return _then(_$InputType_NodeIdImpl( - nodeId: null == nodeId - ? _value.nodeId - : nodeId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_NodeIdImpl implements InputType_NodeId { - const _$InputType_NodeIdImpl({required this.nodeId}); - - @override - final String nodeId; - - @override - String toString() { - return 'InputType.nodeId(nodeId: $nodeId)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_NodeIdImpl && - (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); - } - - @override - int get hashCode => Object.hash(runtimeType, nodeId); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return nodeId(this.nodeId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return nodeId?.call(this.nodeId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this.nodeId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return nodeId(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return nodeId?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this); - } - return orElse(); - } -} - -abstract class InputType_NodeId implements InputType { - const factory InputType_NodeId({required final String nodeId}) = _$InputType_NodeIdImpl; - - String get nodeId; - @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith(_$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = - __$$InputType_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({String url}); -} - -/// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> - implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl(_$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - }) { - return _then(_$InputType_UrlImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_UrlImpl implements InputType_Url { - const _$InputType_UrlImpl({required this.url}); - - @override - final String url; - - @override - String toString() { - return 'InputType.url(url: $url)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_UrlImpl && - (identical(other.url, url) || other.url == url)); - } - - @override - int get hashCode => Object.hash(runtimeType, url); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return url(this.url); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return url?.call(this.url); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this.url); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class InputType_Url implements InputType { - const factory InputType_Url({required final String url}) = _$InputType_UrlImpl; - - String get url; - @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith( - _$InputType_LnUrlPayImpl value, $Res Function(_$InputType_LnUrlPayImpl) then) = - __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> - implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl( - _$InputType_LnUrlPayImpl _value, $Res Function(_$InputType_LnUrlPayImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlPayImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlPayImpl implements InputType_LnUrlPay { - const _$InputType_LnUrlPayImpl({required this.data}); - - @override - final LnUrlPayRequestData data; - - @override - String toString() { - return 'InputType.lnUrlPay(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlPayImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlPay(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlPay?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlPay(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlPay?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlPay implements InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = _$InputType_LnUrlPayImpl; - - LnUrlPayRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, $Res Function(_$InputType_LnUrlWithdrawImpl) then) = - __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> - implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, $Res Function(_$InputType_LnUrlWithdrawImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlWithdrawImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlWithdrawImpl implements InputType_LnUrlWithdraw { - const _$InputType_LnUrlWithdrawImpl({required this.data}); - - @override - final LnUrlWithdrawRequestData data; - - @override - String toString() { - return 'InputType.lnUrlWithdraw(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlWithdrawImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - __$$InputType_LnUrlWithdrawImplCopyWithImpl<_$InputType_LnUrlWithdrawImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlWithdraw(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlWithdraw?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlWithdraw(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlWithdraw?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlWithdraw implements InputType { - const factory InputType_LnUrlWithdraw({required final LnUrlWithdrawRequestData data}) = - _$InputType_LnUrlWithdrawImpl; - - LnUrlWithdrawRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith( - _$InputType_LnUrlAuthImpl value, $Res Function(_$InputType_LnUrlAuthImpl) then) = - __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlAuthRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> - implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl( - _$InputType_LnUrlAuthImpl _value, $Res Function(_$InputType_LnUrlAuthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlAuthImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlAuthRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlAuthImpl implements InputType_LnUrlAuth { - const _$InputType_LnUrlAuthImpl({required this.data}); - - @override - final LnUrlAuthRequestData data; - - @override - String toString() { - return 'InputType.lnUrlAuth(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlAuthImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlAuth(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlAuth?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlAuth(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlAuth?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlAuth implements InputType { - const factory InputType_LnUrlAuth({required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; - - LnUrlAuthRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith( - _$InputType_LnUrlErrorImpl value, $Res Function(_$InputType_LnUrlErrorImpl) then) = - __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> - implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl( - _$InputType_LnUrlErrorImpl _value, $Res Function(_$InputType_LnUrlErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlErrorImpl implements InputType_LnUrlError { - const _$InputType_LnUrlErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'InputType.lnUrlError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlError implements InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = _$InputType_LnUrlErrorImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlCallbackStatus { - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlCallbackStatusCopyWith<$Res> { - factory $LnUrlCallbackStatusCopyWith(LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = - _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; -} - -/// @nodoc -class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> - implements $LnUrlCallbackStatusCopyWith<$Res> { - _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_OkImplCopyWith( - _$LnUrlCallbackStatus_OkImpl value, $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = - __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_OkImpl> - implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_OkImplCopyWithImpl( - _$LnUrlCallbackStatus_OkImpl _value, $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$LnUrlCallbackStatus_OkImpl implements LnUrlCallbackStatus_Ok { - const _$LnUrlCallbackStatus_OkImpl(); - - @override - String toString() { - return 'LnUrlCallbackStatus.ok()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_Ok implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith(_$LnUrlCallbackStatus_ErrorStatusImpl value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_ErrorStatusImpl> - implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl(_$LnUrlCallbackStatus_ErrorStatusImpl _value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlCallbackStatus_ErrorStatusImpl implements LnUrlCallbackStatus_ErrorStatus { - const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlCallbackStatus.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<_$LnUrlCallbackStatus_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_ErrorStatus implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlCallbackStatus_ErrorStatusImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlPayResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlPayResultCopyWith<$Res> { - factory $LnUrlPayResultCopyWith(LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = - _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; -} - -/// @nodoc -class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> - implements $LnUrlPayResultCopyWith<$Res> { - _$LnUrlPayResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith(_$LnUrlPayResult_EndpointSuccessImpl value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPaySuccessData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointSuccessImpl> - implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( - _$LnUrlPayResult_EndpointSuccessImpl _value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointSuccessImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPaySuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointSuccessImpl implements LnUrlPayResult_EndpointSuccess { - const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}); - - @override - final LnUrlPaySuccessData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointSuccess(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointSuccessImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<_$LnUrlPayResult_EndpointSuccessImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointSuccess(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointSuccess?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointSuccess(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointSuccess?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointSuccess implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointSuccess({required final LnUrlPaySuccessData data}) = - _$LnUrlPayResult_EndpointSuccessImpl; - - @override - LnUrlPaySuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( - _$LnUrlPayResult_EndpointErrorImpl value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointErrorImpl> - implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( - _$LnUrlPayResult_EndpointErrorImpl _value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointErrorImpl implements LnUrlPayResult_EndpointError { - const _$LnUrlPayResult_EndpointErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<_$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointError implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointError({required final LnUrlErrorData data}) = - _$LnUrlPayResult_EndpointErrorImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_PayErrorImplCopyWith( - _$LnUrlPayResult_PayErrorImpl value, $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> - implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_PayErrorImplCopyWithImpl( - _$LnUrlPayResult_PayErrorImpl _value, $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_PayErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_PayErrorImpl implements LnUrlPayResult_PayError { - const _$LnUrlPayResult_PayErrorImpl({required this.data}); - - @override - final LnUrlPayErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.payError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_PayErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<_$LnUrlPayResult_PayErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return payError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return payError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return payError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return payError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_PayError implements LnUrlPayResult { - const factory LnUrlPayResult_PayError({required final LnUrlPayErrorData data}) = - _$LnUrlPayResult_PayErrorImpl; - - @override - LnUrlPayErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlWithdrawResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlWithdrawResultCopyWith<$Res> { - factory $LnUrlWithdrawResultCopyWith(LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = - _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; -} - -/// @nodoc -class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> - implements $LnUrlWithdrawResultCopyWith<$Res> { - _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_OkImplCopyWith( - _$LnUrlWithdrawResult_OkImpl value, $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_OkImpl> - implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_OkImplCopyWithImpl( - _$LnUrlWithdrawResult_OkImpl _value, $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_OkImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_OkImpl implements LnUrlWithdrawResult_Ok { - const _$LnUrlWithdrawResult_OkImpl({required this.data}); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.ok(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_OkImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<_$LnUrlWithdrawResult_OkImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Ok implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Ok({required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_OkImpl; - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_TimeoutImplCopyWith( - _$LnUrlWithdrawResult_TimeoutImpl value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) then) = - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_TimeoutImpl> - implements _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl( - _$LnUrlWithdrawResult_TimeoutImpl _value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_TimeoutImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_TimeoutImpl implements LnUrlWithdrawResult_Timeout { - const _$LnUrlWithdrawResult_TimeoutImpl({required this.data}); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.timeout(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_TimeoutImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<_$LnUrlWithdrawResult_TimeoutImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return timeout(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return timeout?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (timeout != null) { - return timeout(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return timeout(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return timeout?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (timeout != null) { - return timeout(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Timeout implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Timeout({required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_TimeoutImpl; - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_ErrorStatusImpl> - implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl(_$LnUrlWithdrawResult_ErrorStatusImpl _value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_ErrorStatusImpl implements LnUrlWithdrawResult_ErrorStatus { - const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<_$LnUrlWithdrawResult_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_ErrorStatus implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlWithdrawResult_ErrorStatusImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeConfig { - GreenlightNodeConfig get config => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeConfigCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeConfigCopyWith<$Res> { - factory $NodeConfigCopyWith(NodeConfig value, $Res Function(NodeConfig) then) = - _$NodeConfigCopyWithImpl<$Res, NodeConfig>; - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> implements $NodeConfigCopyWith<$Res> { - _$NodeConfigCopyWithImpl(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? config = null, - }) { - return _then(_value.copyWith( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> implements $NodeConfigCopyWith<$Res> { - factory _$$NodeConfig_GreenlightImplCopyWith( - _$NodeConfig_GreenlightImpl value, $Res Function(_$NodeConfig_GreenlightImpl) then) = - __$$NodeConfig_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class __$$NodeConfig_GreenlightImplCopyWithImpl<$Res> - extends _$NodeConfigCopyWithImpl<$Res, _$NodeConfig_GreenlightImpl> - implements _$$NodeConfig_GreenlightImplCopyWith<$Res> { - __$$NodeConfig_GreenlightImplCopyWithImpl( - _$NodeConfig_GreenlightImpl _value, $Res Function(_$NodeConfig_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$NodeConfig_GreenlightImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - )); - } -} - -/// @nodoc - -class _$NodeConfig_GreenlightImpl implements NodeConfig_Greenlight { - const _$NodeConfig_GreenlightImpl({required this.config}); - - @override - final GreenlightNodeConfig config; - - @override - String toString() { - return 'NodeConfig.greenlight(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeConfig_GreenlightImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => - __$$NodeConfig_GreenlightImplCopyWithImpl<_$NodeConfig_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) { - return greenlight(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) { - return greenlight?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeConfig_Greenlight implements NodeConfig { - const factory NodeConfig_Greenlight({required final GreenlightNodeConfig config}) = - _$NodeConfig_GreenlightImpl; - - @override - GreenlightNodeConfig get config; - @override - @JsonKey(ignore: true) - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeCredentials { - GreenlightDeviceCredentials get credentials => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightDeviceCredentials credentials) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightDeviceCredentials credentials)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeCredentialsCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeCredentialsCopyWith<$Res> { - factory $NodeCredentialsCopyWith(NodeCredentials value, $Res Function(NodeCredentials) then) = - _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; - @useResult - $Res call({GreenlightDeviceCredentials credentials}); -} - -/// @nodoc -class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> - implements $NodeCredentialsCopyWith<$Res> { - _$NodeCredentialsCopyWithImpl(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? credentials = null, - }) { - return _then(_value.copyWith( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightDeviceCredentials, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> implements $NodeCredentialsCopyWith<$Res> { - factory _$$NodeCredentials_GreenlightImplCopyWith( - _$NodeCredentials_GreenlightImpl value, $Res Function(_$NodeCredentials_GreenlightImpl) then) = - __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightDeviceCredentials credentials}); -} - -/// @nodoc -class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> - extends _$NodeCredentialsCopyWithImpl<$Res, _$NodeCredentials_GreenlightImpl> - implements _$$NodeCredentials_GreenlightImplCopyWith<$Res> { - __$$NodeCredentials_GreenlightImplCopyWithImpl( - _$NodeCredentials_GreenlightImpl _value, $Res Function(_$NodeCredentials_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? credentials = null, - }) { - return _then(_$NodeCredentials_GreenlightImpl( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightDeviceCredentials, - )); - } -} - -/// @nodoc - -class _$NodeCredentials_GreenlightImpl implements NodeCredentials_Greenlight { - const _$NodeCredentials_GreenlightImpl({required this.credentials}); - - @override - final GreenlightDeviceCredentials credentials; - - @override - String toString() { - return 'NodeCredentials.greenlight(credentials: $credentials)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeCredentials_GreenlightImpl && - (identical(other.credentials, credentials) || other.credentials == credentials)); - } - - @override - int get hashCode => Object.hash(runtimeType, credentials); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => - __$$NodeCredentials_GreenlightImplCopyWithImpl<_$NodeCredentials_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightDeviceCredentials credentials) greenlight, - }) { - return greenlight(credentials); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, - }) { - return greenlight?.call(credentials); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightDeviceCredentials credentials)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(credentials); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeCredentials_Greenlight implements NodeCredentials { - const factory NodeCredentials_Greenlight({required final GreenlightDeviceCredentials credentials}) = - _$NodeCredentials_GreenlightImpl; - - @override - GreenlightDeviceCredentials get credentials; - @override - @JsonKey(ignore: true) - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$PaymentDetails { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PaymentDetailsCopyWith<$Res> { - factory $PaymentDetailsCopyWith(PaymentDetails value, $Res Function(PaymentDetails) then) = - _$PaymentDetailsCopyWithImpl<$Res, PaymentDetails>; -} - -/// @nodoc -class _$PaymentDetailsCopyWithImpl<$Res, $Val extends PaymentDetails> - implements $PaymentDetailsCopyWith<$Res> { - _$PaymentDetailsCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { - factory _$$PaymentDetails_LnImplCopyWith( - _$PaymentDetails_LnImpl value, $Res Function(_$PaymentDetails_LnImpl) then) = - __$$PaymentDetails_LnImplCopyWithImpl<$Res>; - @useResult - $Res call({LnPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_LnImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_LnImpl> - implements _$$PaymentDetails_LnImplCopyWith<$Res> { - __$$PaymentDetails_LnImplCopyWithImpl( - _$PaymentDetails_LnImpl _value, $Res Function(_$PaymentDetails_LnImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_LnImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_LnImpl implements PaymentDetails_Ln { - const _$PaymentDetails_LnImpl({required this.data}); - - @override - final LnPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.ln(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_LnImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return ln(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return ln?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return ln(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return ln?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_Ln implements PaymentDetails { - const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = _$PaymentDetails_LnImpl; - - @override - LnPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - factory _$$PaymentDetails_ClosedChannelImplCopyWith( - _$PaymentDetails_ClosedChannelImpl value, $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = - __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res>; - @useResult - $Res call({ClosedChannelPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_ClosedChannelImpl> - implements _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - __$$PaymentDetails_ClosedChannelImplCopyWithImpl( - _$PaymentDetails_ClosedChannelImpl _value, $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_ClosedChannelImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ClosedChannelPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_ClosedChannelImpl implements PaymentDetails_ClosedChannel { - const _$PaymentDetails_ClosedChannelImpl({required this.data}); - - @override - final ClosedChannelPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.closedChannel(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_ClosedChannelImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => - __$$PaymentDetails_ClosedChannelImplCopyWithImpl<_$PaymentDetails_ClosedChannelImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return closedChannel(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return closedChannel?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return closedChannel(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return closedChannel?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_ClosedChannel implements PaymentDetails { - const factory PaymentDetails_ClosedChannel({required final ClosedChannelPaymentDetails data}) = - _$PaymentDetails_ClosedChannelImpl; - - @override - ClosedChannelPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$ReportIssueRequest { - ReportPaymentFailureDetails get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ReportIssueRequestCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ReportIssueRequestCopyWith<$Res> { - factory $ReportIssueRequestCopyWith(ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = - _$ReportIssueRequestCopyWithImpl<$Res, ReportIssueRequest>; - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class _$ReportIssueRequestCopyWithImpl<$Res, $Val extends ReportIssueRequest> - implements $ReportIssueRequestCopyWith<$Res> { - _$ReportIssueRequestCopyWithImpl(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? data = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> - implements $ReportIssueRequestCopyWith<$Res> { - factory _$$ReportIssueRequest_PaymentFailureImplCopyWith(_$ReportIssueRequest_PaymentFailureImpl value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) then) = - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> - extends _$ReportIssueRequestCopyWithImpl<$Res, _$ReportIssueRequest_PaymentFailureImpl> - implements _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> { - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl(_$ReportIssueRequest_PaymentFailureImpl _value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$ReportIssueRequest_PaymentFailureImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - )); - } -} - -/// @nodoc - -class _$ReportIssueRequest_PaymentFailureImpl implements ReportIssueRequest_PaymentFailure { - const _$ReportIssueRequest_PaymentFailureImpl({required this.data}); - - @override - final ReportPaymentFailureDetails data; - - @override - String toString() { - return 'ReportIssueRequest.paymentFailure(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ReportIssueRequest_PaymentFailureImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<_$ReportIssueRequest_PaymentFailureImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) { - return paymentFailure(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) { - return paymentFailure?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, - }) { - return paymentFailure(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) { - return paymentFailure?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(this); - } - return orElse(); - } -} - -abstract class ReportIssueRequest_PaymentFailure implements ReportIssueRequest { - const factory ReportIssueRequest_PaymentFailure({required final ReportPaymentFailureDetails data}) = - _$ReportIssueRequest_PaymentFailureImpl; - - @override - ReportPaymentFailureDetails get data; - @override - @JsonKey(ignore: true) - _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$SuccessActionProcessed { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SuccessActionProcessedCopyWith<$Res> { - factory $SuccessActionProcessedCopyWith( - SuccessActionProcessed value, $Res Function(SuccessActionProcessed) then) = - _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; -} - -/// @nodoc -class _$SuccessActionProcessedCopyWithImpl<$Res, $Val extends SuccessActionProcessed> - implements $SuccessActionProcessedCopyWith<$Res> { - _$SuccessActionProcessedCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_AesImplCopyWith( - _$SuccessActionProcessed_AesImpl value, $Res Function(_$SuccessActionProcessed_AesImpl) then) = - __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataResult result}); - - $AesSuccessActionDataResultCopyWith<$Res> get result; -} - -/// @nodoc -class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_AesImpl> - implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - __$$SuccessActionProcessed_AesImplCopyWithImpl( - _$SuccessActionProcessed_AesImpl _value, $Res Function(_$SuccessActionProcessed_AesImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? result = null, - }) { - return _then(_$SuccessActionProcessed_AesImpl( - result: null == result - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataResult, - )); - } - - @override - @pragma('vm:prefer-inline') - $AesSuccessActionDataResultCopyWith<$Res> get result { - return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { - return _then(_value.copyWith(result: value)); - }); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_AesImpl implements SuccessActionProcessed_Aes { - const _$SuccessActionProcessed_AesImpl({required this.result}); - - @override - final AesSuccessActionDataResult result; - - @override - String toString() { - return 'SuccessActionProcessed.aes(result: $result)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_AesImpl && - (identical(other.result, result) || other.result == result)); - } - - @override - int get hashCode => Object.hash(runtimeType, result); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - __$$SuccessActionProcessed_AesImplCopyWithImpl<_$SuccessActionProcessed_AesImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return aes(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return aes?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return aes(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return aes?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Aes implements SuccessActionProcessed { - const factory SuccessActionProcessed_Aes({required final AesSuccessActionDataResult result}) = - _$SuccessActionProcessed_AesImpl; - - AesSuccessActionDataResult get result; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_MessageImplCopyWith(_$SuccessActionProcessed_MessageImpl value, - $Res Function(_$SuccessActionProcessed_MessageImpl) then) = - __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; - @useResult - $Res call({MessageSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_MessageImpl> - implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - __$$SuccessActionProcessed_MessageImplCopyWithImpl( - _$SuccessActionProcessed_MessageImpl _value, $Res Function(_$SuccessActionProcessed_MessageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_MessageImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as MessageSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_MessageImpl implements SuccessActionProcessed_Message { - const _$SuccessActionProcessed_MessageImpl({required this.data}); - - @override - final MessageSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.message(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_MessageImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - __$$SuccessActionProcessed_MessageImplCopyWithImpl<_$SuccessActionProcessed_MessageImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return message(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return message?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return message(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return message?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Message implements SuccessActionProcessed { - const factory SuccessActionProcessed_Message({required final MessageSuccessActionData data}) = - _$SuccessActionProcessed_MessageImpl; - - MessageSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_UrlImplCopyWith( - _$SuccessActionProcessed_UrlImpl value, $Res Function(_$SuccessActionProcessed_UrlImpl) then) = - __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({UrlSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_UrlImpl> - implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - __$$SuccessActionProcessed_UrlImplCopyWithImpl( - _$SuccessActionProcessed_UrlImpl _value, $Res Function(_$SuccessActionProcessed_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_UrlImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as UrlSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_UrlImpl implements SuccessActionProcessed_Url { - const _$SuccessActionProcessed_UrlImpl({required this.data}); - - @override - final UrlSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.url(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_UrlImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - __$$SuccessActionProcessed_UrlImplCopyWithImpl<_$SuccessActionProcessed_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return url(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return url?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Url implements SuccessActionProcessed { - const factory SuccessActionProcessed_Url({required final UrlSuccessActionData data}) = - _$SuccessActionProcessed_UrlImpl; - - UrlSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 060e15390..85803f00d 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -211,6 +211,10 @@ Future inProgressSwap() => BreezSdkBindings.instance.api.crateBinding Future> inProgressReverseSwaps() => BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(); +/// See [BreezServices::claim_reverse_swap] +Future claimReverseSwap({required String lockupAddress}) => + BreezSdkBindings.instance.api.crateBindingClaimReverseSwap(lockupAddress: lockupAddress); + /// See [BreezServices::open_channel_fee] Future openChannelFee({required OpenChannelFeeRequest req}) => BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req); @@ -550,18 +554,28 @@ class LnUrlPayErrorData { class LnUrlPayRequest { final LnUrlPayRequestData data; final BigInt amountMsat; + final bool useTrampoline; final String? comment; final String? paymentLabel; + final bool? validateSuccessActionUrl; const LnUrlPayRequest({ required this.data, required this.amountMsat, + required this.useTrampoline, this.comment, this.paymentLabel, + this.validateSuccessActionUrl, }); @override - int get hashCode => data.hashCode ^ amountMsat.hashCode ^ comment.hashCode ^ paymentLabel.hashCode; + int get hashCode => + data.hashCode ^ + amountMsat.hashCode ^ + useTrampoline.hashCode ^ + comment.hashCode ^ + paymentLabel.hashCode ^ + validateSuccessActionUrl.hashCode; @override bool operator ==(Object other) => @@ -570,8 +584,10 @@ class LnUrlPayRequest { runtimeType == other.runtimeType && data == other.data && amountMsat == other.amountMsat && + useTrampoline == other.useTrampoline && comment == other.comment && - paymentLabel == other.paymentLabel; + paymentLabel == other.paymentLabel && + validateSuccessActionUrl == other.validateSuccessActionUrl; } class LnUrlPayRequestData { @@ -691,6 +707,9 @@ sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { const factory LnUrlWithdrawResult.ok({ required LnUrlWithdrawSuccessData data, }) = LnUrlWithdrawResult_Ok; + const factory LnUrlWithdrawResult.timeout({ + required LnUrlWithdrawSuccessData data, + }) = LnUrlWithdrawResult_Timeout; const factory LnUrlWithdrawResult.errorStatus({ required LnUrlErrorData data, }) = LnUrlWithdrawResult_ErrorStatus; @@ -816,7 +835,7 @@ class RouteHint { class RouteHintHop { final String srcNodeId; - final BigInt shortChannelId; + final String shortChannelId; final int feesBaseMsat; final int feesProportionalMillionths; final BigInt cltvExpiryDelta; @@ -902,14 +921,16 @@ class Symbol { class UrlSuccessActionData { final String description; final String url; + final bool matchesCallbackDomain; const UrlSuccessActionData({ required this.description, required this.url, + required this.matchesCallbackDomain, }); @override - int get hashCode => description.hashCode ^ url.hashCode; + int get hashCode => description.hashCode ^ url.hashCode ^ matchesCallbackDomain.hashCode; @override bool operator ==(Object other) => @@ -917,5 +938,6 @@ class UrlSuccessActionData { other is UrlSuccessActionData && runtimeType == other.runtimeType && description == other.description && - url == other.url; + url == other.url && + matchesCallbackDomain == other.matchesCallbackDomain; } diff --git a/libs/sdk-flutter/lib/generated/binding.freezed.dart b/libs/sdk-flutter/lib/generated/binding.freezed.dart index 931c6318d..f1489b1ee 100644 --- a/libs/sdk-flutter/lib/generated/binding.freezed.dart +++ b/libs/sdk-flutter/lib/generated/binding.freezed.dart @@ -2101,18 +2101,21 @@ mixin _$LnUrlWithdrawResult { @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) => @@ -2120,18 +2123,21 @@ mixin _$LnUrlWithdrawResult { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) => @@ -2220,6 +2226,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) { return ok(data); @@ -2229,6 +2236,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) { return ok?.call(data); @@ -2238,6 +2246,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) { @@ -2251,6 +2260,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return ok(this); @@ -2260,6 +2270,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) { return ok?.call(this); @@ -2269,6 +2280,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) { @@ -2291,6 +2303,148 @@ abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { throw _privateConstructorUsedError; } +/// @nodoc +abstract class _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_TimeoutImplCopyWith( + _$LnUrlWithdrawResult_TimeoutImpl value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) then) = + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawSuccessData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_TimeoutImpl> + implements _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl( + _$LnUrlWithdrawResult_TimeoutImpl _value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_TimeoutImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawSuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_TimeoutImpl extends LnUrlWithdrawResult_Timeout { + const _$LnUrlWithdrawResult_TimeoutImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawSuccessData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.timeout(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_TimeoutImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<_$LnUrlWithdrawResult_TimeoutImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return timeout(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return timeout?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (timeout != null) { + return timeout(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, + }) { + return timeout(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return timeout?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (timeout != null) { + return timeout(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_Timeout extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_Timeout({required final LnUrlWithdrawSuccessData data}) = + _$LnUrlWithdrawResult_TimeoutImpl; + const LnUrlWithdrawResult_Timeout._() : super._(); + + @override + LnUrlWithdrawSuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => + throw _privateConstructorUsedError; +} + /// @nodoc abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, @@ -2357,6 +2511,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) { return errorStatus(data); @@ -2366,6 +2521,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) { return errorStatus?.call(data); @@ -2375,6 +2531,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) { @@ -2388,6 +2545,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return errorStatus(this); @@ -2397,6 +2555,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) { return errorStatus?.call(this); @@ -2406,6 +2565,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) { diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 7ae7bfbdd..559bee335 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -63,6 +63,15 @@ sealed class BreezEvent with _$BreezEvent { const factory BreezEvent.backupFailed({ required BackupFailedData details, }) = BreezEvent_BackupFailed; + + /// Indicates that a reverse swap has been updated which may also + /// include a status change + const factory BreezEvent.reverseSwapUpdated({ + required ReverseSwapInfo details, + }) = BreezEvent_ReverseSwapUpdated; + + /// Indicates that a swap has been updated which may also + /// include a status change const factory BreezEvent.swapUpdated({ required SwapInfo details, }) = BreezEvent_SwapUpdated; diff --git a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart index 9bac18922..bc7b77769 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart @@ -26,6 +26,7 @@ mixin _$BreezEvent { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) => throw _privateConstructorUsedError; @@ -39,6 +40,7 @@ mixin _$BreezEvent { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) => throw _privateConstructorUsedError; @@ -52,6 +54,7 @@ mixin _$BreezEvent { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) => @@ -66,6 +69,7 @@ mixin _$BreezEvent { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) => throw _privateConstructorUsedError; @@ -79,6 +83,7 @@ mixin _$BreezEvent { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) => throw _privateConstructorUsedError; @@ -92,6 +97,7 @@ mixin _$BreezEvent { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) => @@ -186,6 +192,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return newBlock(block); @@ -202,6 +209,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return newBlock?.call(block); @@ -218,6 +226,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -238,6 +247,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return newBlock(this); @@ -254,6 +264,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return newBlock?.call(this); @@ -270,6 +281,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -362,6 +374,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return invoicePaid(details); @@ -378,6 +391,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return invoicePaid?.call(details); @@ -394,6 +408,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -414,6 +429,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return invoicePaid(this); @@ -430,6 +446,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return invoicePaid?.call(this); @@ -446,6 +463,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -512,6 +530,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return synced(); @@ -528,6 +547,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return synced?.call(); @@ -544,6 +564,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -564,6 +585,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return synced(this); @@ -580,6 +602,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return synced?.call(this); @@ -596,6 +619,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -683,6 +707,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return paymentSucceed(details); @@ -699,6 +724,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return paymentSucceed?.call(details); @@ -715,6 +741,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -735,6 +762,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return paymentSucceed(this); @@ -751,6 +779,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return paymentSucceed?.call(this); @@ -767,6 +796,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -859,6 +889,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return paymentFailed(details); @@ -875,6 +906,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return paymentFailed?.call(details); @@ -891,6 +923,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -911,6 +944,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return paymentFailed(this); @@ -927,6 +961,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return paymentFailed?.call(this); @@ -943,6 +978,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1010,6 +1046,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupStarted(); @@ -1026,6 +1063,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupStarted?.call(); @@ -1042,6 +1080,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1062,6 +1101,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupStarted(this); @@ -1078,6 +1118,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupStarted?.call(this); @@ -1094,6 +1135,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1155,6 +1197,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupSucceeded(); @@ -1171,6 +1214,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupSucceeded?.call(); @@ -1187,6 +1231,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1207,6 +1252,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupSucceeded(this); @@ -1223,6 +1269,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupSucceeded?.call(this); @@ -1239,6 +1286,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1326,6 +1374,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupFailed(details); @@ -1342,6 +1391,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupFailed?.call(details); @@ -1358,6 +1408,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1378,6 +1429,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupFailed(this); @@ -1394,6 +1446,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupFailed?.call(this); @@ -1410,6 +1463,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1431,6 +1485,190 @@ abstract class BreezEvent_BackupFailed extends BreezEvent { throw _privateConstructorUsedError; } +/// @nodoc +abstract class _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { + factory _$$BreezEvent_ReverseSwapUpdatedImplCopyWith(_$BreezEvent_ReverseSwapUpdatedImpl value, + $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) then) = + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res>; + @useResult + $Res call({ReverseSwapInfo details}); +} + +/// @nodoc +class __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_ReverseSwapUpdatedImpl> + implements _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl( + _$BreezEvent_ReverseSwapUpdatedImpl _value, $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_ReverseSwapUpdatedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as ReverseSwapInfo, + )); + } +} + +/// @nodoc + +class _$BreezEvent_ReverseSwapUpdatedImpl extends BreezEvent_ReverseSwapUpdated { + const _$BreezEvent_ReverseSwapUpdatedImpl({required this.details}) : super._(); + + @override + final ReverseSwapInfo details; + + @override + String toString() { + return 'BreezEvent.reverseSwapUpdated(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_ReverseSwapUpdatedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<_$BreezEvent_ReverseSwapUpdatedImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return reverseSwapUpdated(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return reverseSwapUpdated?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (reverseSwapUpdated != null) { + return reverseSwapUpdated(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return reverseSwapUpdated(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return reverseSwapUpdated?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (reverseSwapUpdated != null) { + return reverseSwapUpdated(this); + } + return orElse(); + } +} + +abstract class BreezEvent_ReverseSwapUpdated extends BreezEvent { + const factory BreezEvent_ReverseSwapUpdated({required final ReverseSwapInfo details}) = + _$BreezEvent_ReverseSwapUpdatedImpl; + const BreezEvent_ReverseSwapUpdated._() : super._(); + + ReverseSwapInfo get details; + @JsonKey(ignore: true) + _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => + throw _privateConstructorUsedError; +} + /// @nodoc abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { factory _$$BreezEvent_SwapUpdatedImplCopyWith( @@ -1503,6 +1741,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return swapUpdated(details); @@ -1519,6 +1758,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return swapUpdated?.call(details); @@ -1535,6 +1775,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1555,6 +1796,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return swapUpdated(this); @@ -1571,6 +1813,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return swapUpdated?.call(this); @@ -1587,6 +1830,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 3cdc41bb6..fe717f193 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 2ac58a617..342ace360 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // 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 @@ -36,6 +36,16 @@ class BreezSdkBindings ); } + /// Initialize flutter_rust_bridge in mock mode. + /// No libraries for FFI are loaded. + static void initMock({ + required BreezSdkBindingsApi api, + }) { + instance.initMockImpl( + api: api, + ); + } + /// Dispose flutter_rust_bridge /// /// The call to this function is optional, since flutter_rust_bridge (and everything else) @@ -56,10 +66,10 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0'; + String get codegenVersion => '2.5.1'; @override - int get rustContentHash => 847148110; + int get rustContentHash => -488953100; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( stem: 'breez_sdk_core', @@ -84,6 +94,8 @@ abstract class BreezSdkBindingsApi extends BaseApi { Future crateBindingCheckMessage({required CheckMessageRequest req}); + Future crateBindingClaimReverseSwap({required String lockupAddress}); + Future crateBindingCloseLspChannels(); Future crateBindingConfigureNode({required ConfigureNodeRequest req}); @@ -365,6 +377,28 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements argNames: ["req"], ); + @override + Future crateBindingClaimReverseSwap({required String lockupAddress}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(lockupAddress); + return wire.wire__crate__binding__claim_reverse_swap(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingClaimReverseSwapConstMeta, + argValues: [lockupAddress], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateBindingClaimReverseSwapConstMeta => const TaskConstMeta( + debugName: "claim_reverse_swap", + argNames: ["lockupAddress"], + ); + @override Future crateBindingCloseLspChannels() { return handler.executeNormal(NormalTask( @@ -2055,6 +2089,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements details: dco_decode_box_autoadd_backup_failed_data(raw[1]), ); case 8: + return BreezEvent_ReverseSwapUpdated( + details: dco_decode_box_autoadd_reverse_swap_info(raw[1]), + ); + case 9: return BreezEvent_SwapUpdated( details: dco_decode_box_autoadd_swap_info(raw[1]), ); @@ -2073,10 +2111,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BuyBitcoinRequest dco_decode_buy_bitcoin_request(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}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return BuyBitcoinRequest( provider: dco_decode_buy_bitcoin_provider(arr[0]), openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[1]), + redirectUrl: dco_decode_opt_String(arr[2]), ); } @@ -2533,12 +2572,14 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements LnUrlPayRequest dco_decode_ln_url_pay_request(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}'); + if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); return LnUrlPayRequest( data: dco_decode_ln_url_pay_request_data(arr[0]), amountMsat: dco_decode_u_64(arr[1]), - comment: dco_decode_opt_String(arr[2]), - paymentLabel: dco_decode_opt_String(arr[3]), + useTrampoline: dco_decode_bool(arr[2]), + comment: dco_decode_opt_String(arr[3]), + paymentLabel: dco_decode_opt_String(arr[4]), + validateSuccessActionUrl: dco_decode_opt_box_autoadd_bool(arr[5]), ); } @@ -2627,6 +2668,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements data: dco_decode_box_autoadd_ln_url_withdraw_success_data(raw[1]), ); case 1: + return LnUrlWithdrawResult_Timeout( + data: dco_decode_box_autoadd_ln_url_withdraw_success_data(raw[1]), + ); + case 2: return LnUrlWithdrawResult_ErrorStatus( data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), ); @@ -2766,7 +2811,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements NodeState dco_decode_node_state(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); + if (arr.length != 13) throw Exception('unexpected arr length: expect 13 but see ${arr.length}'); return NodeState( id: dco_decode_String(arr[0]), blockHeight: dco_decode_u_32(arr[1]), @@ -2779,7 +2824,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements maxSinglePaymentAmountMsat: dco_decode_u_64(arr[8]), maxChanReserveMsats: dco_decode_u_64(arr[9]), connectedPeers: dco_decode_list_String(arr[10]), - inboundLiquidityMsats: dco_decode_u_64(arr[11]), + maxReceivableSinglePaymentAmountMsat: dco_decode_u_64(arr[11]), + totalInboundLiquidityMsats: dco_decode_u_64(arr[12]), ); } @@ -2787,10 +2833,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements OnchainPaymentLimitsResponse dco_decode_onchain_payment_limits_response(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}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return OnchainPaymentLimitsResponse( minSat: dco_decode_u_64(arr[0]), maxSat: dco_decode_u_64(arr[1]), + maxPayableSat: dco_decode_u_64(arr[2]), ); } @@ -3317,7 +3364,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); return RouteHintHop( srcNodeId: dco_decode_String(arr[0]), - shortChannelId: dco_decode_u_64(arr[1]), + shortChannelId: dco_decode_String(arr[1]), feesBaseMsat: dco_decode_u_32(arr[2]), feesProportionalMillionths: dco_decode_u_32(arr[3]), cltvExpiryDelta: dco_decode_u_64(arr[4]), @@ -3353,11 +3400,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements SendPaymentRequest dco_decode_send_payment_request(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}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return SendPaymentRequest( bolt11: dco_decode_String(arr[0]), - amountMsat: dco_decode_opt_box_autoadd_u_64(arr[1]), - label: dco_decode_opt_String(arr[2]), + useTrampoline: dco_decode_bool(arr[1]), + amountMsat: dco_decode_opt_box_autoadd_u_64(arr[2]), + label: dco_decode_opt_String(arr[3]), ); } @@ -3572,10 +3620,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements UrlSuccessActionData dco_decode_url_success_action_data(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}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return UrlSuccessActionData( description: dco_decode_String(arr[0]), url: dco_decode_String(arr[1]), + matchesCallbackDomain: dco_decode_bool(arr[2]), ); } @@ -4070,6 +4119,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_details = sse_decode_box_autoadd_backup_failed_data(deserializer); return BreezEvent_BackupFailed(details: var_details); case 8: + var var_details = sse_decode_box_autoadd_reverse_swap_info(deserializer); + return BreezEvent_ReverseSwapUpdated(details: var_details); + case 9: var var_details = sse_decode_box_autoadd_swap_info(deserializer); return BreezEvent_SwapUpdated(details: var_details); default: @@ -4089,7 +4141,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_provider = sse_decode_buy_bitcoin_provider(deserializer); var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); - return BuyBitcoinRequest(provider: var_provider, openingFeeParams: var_openingFeeParams); + var var_redirectUrl = sse_decode_opt_String(deserializer); + return BuyBitcoinRequest( + provider: var_provider, openingFeeParams: var_openingFeeParams, redirectUrl: var_redirectUrl); } @protected @@ -4641,10 +4695,17 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_data = sse_decode_ln_url_pay_request_data(deserializer); var var_amountMsat = sse_decode_u_64(deserializer); + var var_useTrampoline = sse_decode_bool(deserializer); var var_comment = sse_decode_opt_String(deserializer); var var_paymentLabel = sse_decode_opt_String(deserializer); + var var_validateSuccessActionUrl = sse_decode_opt_box_autoadd_bool(deserializer); return LnUrlPayRequest( - data: var_data, amountMsat: var_amountMsat, comment: var_comment, paymentLabel: var_paymentLabel); + data: var_data, + amountMsat: var_amountMsat, + useTrampoline: var_useTrampoline, + comment: var_comment, + paymentLabel: var_paymentLabel, + validateSuccessActionUrl: var_validateSuccessActionUrl); } @protected @@ -4734,6 +4795,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_data = sse_decode_box_autoadd_ln_url_withdraw_success_data(deserializer); return LnUrlWithdrawResult_Ok(data: var_data); case 1: + var var_data = sse_decode_box_autoadd_ln_url_withdraw_success_data(deserializer); + return LnUrlWithdrawResult_Timeout(data: var_data); + case 2: var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); return LnUrlWithdrawResult_ErrorStatus(data: var_data); default: @@ -4872,7 +4936,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_maxSinglePaymentAmountMsat = sse_decode_u_64(deserializer); var var_maxChanReserveMsats = sse_decode_u_64(deserializer); var var_connectedPeers = sse_decode_list_String(deserializer); - var var_inboundLiquidityMsats = sse_decode_u_64(deserializer); + var var_maxReceivableSinglePaymentAmountMsat = sse_decode_u_64(deserializer); + var var_totalInboundLiquidityMsats = sse_decode_u_64(deserializer); return NodeState( id: var_id, blockHeight: var_blockHeight, @@ -4885,7 +4950,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements maxSinglePaymentAmountMsat: var_maxSinglePaymentAmountMsat, maxChanReserveMsats: var_maxChanReserveMsats, connectedPeers: var_connectedPeers, - inboundLiquidityMsats: var_inboundLiquidityMsats); + maxReceivableSinglePaymentAmountMsat: var_maxReceivableSinglePaymentAmountMsat, + totalInboundLiquidityMsats: var_totalInboundLiquidityMsats); } @protected @@ -4893,7 +4959,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_minSat = sse_decode_u_64(deserializer); var var_maxSat = sse_decode_u_64(deserializer); - return OnchainPaymentLimitsResponse(minSat: var_minSat, maxSat: var_maxSat); + var var_maxPayableSat = sse_decode_u_64(deserializer); + return OnchainPaymentLimitsResponse( + minSat: var_minSat, maxSat: var_maxSat, maxPayableSat: var_maxPayableSat); } @protected @@ -5491,7 +5559,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements RouteHintHop sse_decode_route_hint_hop(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_srcNodeId = sse_decode_String(deserializer); - var var_shortChannelId = sse_decode_u_64(deserializer); + var var_shortChannelId = sse_decode_String(deserializer); var var_feesBaseMsat = sse_decode_u_32(deserializer); var var_feesProportionalMillionths = sse_decode_u_32(deserializer); var var_cltvExpiryDelta = sse_decode_u_64(deserializer); @@ -5532,9 +5600,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements SendPaymentRequest sse_decode_send_payment_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_bolt11 = sse_decode_String(deserializer); + var var_useTrampoline = sse_decode_bool(deserializer); var var_amountMsat = sse_decode_opt_box_autoadd_u_64(deserializer); var var_label = sse_decode_opt_String(deserializer); - return SendPaymentRequest(bolt11: var_bolt11, amountMsat: var_amountMsat, label: var_label); + return SendPaymentRequest( + bolt11: var_bolt11, useTrampoline: var_useTrampoline, amountMsat: var_amountMsat, label: var_label); } @protected @@ -5746,7 +5816,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_description = sse_decode_String(deserializer); var var_url = sse_decode_String(deserializer); - return UrlSuccessActionData(description: var_description, url: var_url); + var var_matchesCallbackDomain = sse_decode_bool(deserializer); + return UrlSuccessActionData( + description: var_description, url: var_url, matchesCallbackDomain: var_matchesCallbackDomain); } @protected @@ -6349,8 +6421,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case BreezEvent_BackupFailed(details: final details): sse_encode_i_32(7, serializer); sse_encode_box_autoadd_backup_failed_data(details, serializer); - case BreezEvent_SwapUpdated(details: final details): + case BreezEvent_ReverseSwapUpdated(details: final details): sse_encode_i_32(8, serializer); + sse_encode_box_autoadd_reverse_swap_info(details, serializer); + case BreezEvent_SwapUpdated(details: final details): + sse_encode_i_32(9, serializer); sse_encode_box_autoadd_swap_info(details, serializer); default: throw UnimplementedError(''); @@ -6368,6 +6443,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_buy_bitcoin_provider(self.provider, serializer); sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + sse_encode_opt_String(self.redirectUrl, serializer); } @protected @@ -6789,8 +6865,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_ln_url_pay_request_data(self.data, serializer); sse_encode_u_64(self.amountMsat, serializer); + sse_encode_bool(self.useTrampoline, serializer); sse_encode_opt_String(self.comment, serializer); sse_encode_opt_String(self.paymentLabel, serializer); + sse_encode_opt_box_autoadd_bool(self.validateSuccessActionUrl, serializer); } @protected @@ -6857,8 +6935,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case LnUrlWithdrawResult_Ok(data: final data): sse_encode_i_32(0, serializer); sse_encode_box_autoadd_ln_url_withdraw_success_data(data, serializer); - case LnUrlWithdrawResult_ErrorStatus(data: final data): + case LnUrlWithdrawResult_Timeout(data: final data): sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_withdraw_success_data(data, serializer); + case LnUrlWithdrawResult_ErrorStatus(data: final data): + sse_encode_i_32(2, serializer); sse_encode_box_autoadd_ln_url_error_data(data, serializer); default: throw UnimplementedError(''); @@ -6973,7 +7054,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_u_64(self.maxSinglePaymentAmountMsat, serializer); sse_encode_u_64(self.maxChanReserveMsats, serializer); sse_encode_list_String(self.connectedPeers, serializer); - sse_encode_u_64(self.inboundLiquidityMsats, serializer); + sse_encode_u_64(self.maxReceivableSinglePaymentAmountMsat, serializer); + sse_encode_u_64(self.totalInboundLiquidityMsats, serializer); } @protected @@ -6982,6 +7064,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_u_64(self.minSat, serializer); sse_encode_u_64(self.maxSat, serializer); + sse_encode_u_64(self.maxPayableSat, serializer); } @protected @@ -7475,7 +7558,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements void sse_encode_route_hint_hop(RouteHintHop self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.srcNodeId, serializer); - sse_encode_u_64(self.shortChannelId, serializer); + sse_encode_String(self.shortChannelId, serializer); sse_encode_u_32(self.feesBaseMsat, serializer); sse_encode_u_32(self.feesProportionalMillionths, serializer); sse_encode_u_64(self.cltvExpiryDelta, serializer); @@ -7502,6 +7585,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements void sse_encode_send_payment_request(SendPaymentRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.bolt11, serializer); + sse_encode_bool(self.useTrampoline, serializer); sse_encode_opt_box_autoadd_u_64(self.amountMsat, serializer); sse_encode_opt_String(self.label, serializer); } @@ -7671,5 +7755,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.description, serializer); sse_encode_String(self.url, serializer); + sse_encode_bool(self.matchesCallbackDomain, serializer); } } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index 63824be8b..2eea7aebc 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // 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 @@ -2603,9 +2603,15 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl)>(); + void wire__crate__binding__claim_reverse_swap( + int port_, + ffi.Pointer lockup_address, + ) { + return _wire__crate__binding__claim_reverse_swap( + port_, + lockup_address, + ); + } + + late final _wire__crate__binding__claim_reverse_swapPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap'); + late final _wire__crate__binding__claim_reverse_swap = _wire__crate__binding__claim_reverse_swapPtr + .asFunction)>(); + void wire__crate__binding__close_lsp_channels( int port_, ) { @@ -6128,6 +6164,9 @@ final class wire_cst_url_success_action_data extends ffi.Struct { external ffi.Pointer description; external ffi.Pointer url; + + @ffi.Bool() + external bool matches_callback_domain; } final class wire_cst_SuccessActionProcessed_Url extends ffi.Struct { @@ -6363,8 +6402,7 @@ final class wire_cst_BreezEvent_PaymentSucceed extends ffi.Struct { final class wire_cst_route_hint_hop extends ffi.Struct { external ffi.Pointer src_node_id; - @ffi.Uint64() - external int short_channel_id; + external ffi.Pointer short_channel_id; @ffi.Uint32() external int fees_base_msat; @@ -6450,6 +6488,10 @@ final class wire_cst_BreezEvent_BackupFailed extends ffi.Struct { external ffi.Pointer details; } +final class wire_cst_BreezEvent_ReverseSwapUpdated extends ffi.Struct { + external ffi.Pointer details; +} + final class wire_cst_BreezEvent_SwapUpdated extends ffi.Struct { external ffi.Pointer details; } @@ -6465,6 +6507,8 @@ final class BreezEventKind extends ffi.Union { external wire_cst_BreezEvent_BackupFailed BackupFailed; + external wire_cst_BreezEvent_ReverseSwapUpdated ReverseSwapUpdated; + external wire_cst_BreezEvent_SwapUpdated SwapUpdated; } @@ -6480,6 +6524,8 @@ final class wire_cst_buy_bitcoin_request extends ffi.Struct { external int provider; external ffi.Pointer opening_fee_params; + + external ffi.Pointer redirect_url; } final class wire_cst_check_message_request extends ffi.Struct { @@ -6639,9 +6685,14 @@ final class wire_cst_ln_url_pay_request extends ffi.Struct { @ffi.Uint64() external int amount_msat; + @ffi.Bool() + external bool use_trampoline; + external ffi.Pointer comment; external ffi.Pointer payment_label; + + external ffi.Pointer validate_success_action_url; } final class wire_cst_ln_url_withdraw_request_data extends ffi.Struct { @@ -6801,6 +6852,9 @@ final class wire_cst_send_onchain_request extends ffi.Struct { final class wire_cst_send_payment_request extends ffi.Struct { external ffi.Pointer bolt11; + @ffi.Bool() + external bool use_trampoline; + external ffi.Pointer amount_msat; external ffi.Pointer label; @@ -7183,6 +7237,10 @@ final class wire_cst_LnUrlWithdrawResult_Ok extends ffi.Struct { external ffi.Pointer data; } +final class wire_cst_LnUrlWithdrawResult_Timeout extends ffi.Struct { + external ffi.Pointer data; +} + final class wire_cst_LnUrlWithdrawResult_ErrorStatus extends ffi.Struct { external ffi.Pointer data; } @@ -7190,6 +7248,8 @@ final class wire_cst_LnUrlWithdrawResult_ErrorStatus extends ffi.Struct { final class LnUrlWithdrawResultKind extends ffi.Union { external wire_cst_LnUrlWithdrawResult_Ok Ok; + external wire_cst_LnUrlWithdrawResult_Timeout Timeout; + external wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; } @@ -7243,7 +7303,10 @@ final class wire_cst_node_state extends ffi.Struct { external ffi.Pointer connected_peers; @ffi.Uint64() - external int inbound_liquidity_msats; + external int max_receivable_single_payment_amount_msat; + + @ffi.Uint64() + external int total_inbound_liquidity_msats; } final class wire_cst_onchain_payment_limits_response extends ffi.Struct { @@ -7252,6 +7315,9 @@ final class wire_cst_onchain_payment_limits_response extends ffi.Struct { @ffi.Uint64() external int max_sat; + + @ffi.Uint64() + external int max_payable_sat; } final class wire_cst_open_channel_fee_response extends ffi.Struct { diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay.dart b/libs/sdk-flutter/lib/generated/lnurl/pay.dart index ae8095aed..12a6496ff 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index a8193dc21..1a745668e 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index e46eea34b..cb9b0ccbc 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.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.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -42,13 +42,19 @@ class BuyBitcoinRequest { final BuyBitcoinProvider provider; final OpeningFeeParams? openingFeeParams; + /// The optional URL to redirect to after completing the buy. + /// + /// For Moonpay, see + final String? redirectUrl; + const BuyBitcoinRequest({ required this.provider, this.openingFeeParams, + this.redirectUrl, }); @override - int get hashCode => provider.hashCode ^ openingFeeParams.hashCode; + int get hashCode => provider.hashCode ^ openingFeeParams.hashCode ^ redirectUrl.hashCode; @override bool operator ==(Object other) => @@ -56,7 +62,8 @@ class BuyBitcoinRequest { other is BuyBitcoinRequest && runtimeType == other.runtimeType && provider == other.provider && - openingFeeParams == other.openingFeeParams; + openingFeeParams == other.openingFeeParams && + redirectUrl == other.redirectUrl; } class BuyBitcoinResponse { @@ -564,7 +571,12 @@ class NodeState { final BigInt maxSinglePaymentAmountMsat; final BigInt maxChanReserveMsats; final List connectedPeers; - final BigInt inboundLiquidityMsats; + + /// Maximum receivable in a single payment without requiring a new channel open. + final BigInt maxReceivableSinglePaymentAmountMsat; + + /// Total receivable on all available channels + final BigInt totalInboundLiquidityMsats; const NodeState({ required this.id, @@ -578,7 +590,8 @@ class NodeState { required this.maxSinglePaymentAmountMsat, required this.maxChanReserveMsats, required this.connectedPeers, - required this.inboundLiquidityMsats, + required this.maxReceivableSinglePaymentAmountMsat, + required this.totalInboundLiquidityMsats, }); @override @@ -594,7 +607,8 @@ class NodeState { maxSinglePaymentAmountMsat.hashCode ^ maxChanReserveMsats.hashCode ^ connectedPeers.hashCode ^ - inboundLiquidityMsats.hashCode; + maxReceivableSinglePaymentAmountMsat.hashCode ^ + totalInboundLiquidityMsats.hashCode; @override bool operator ==(Object other) => @@ -612,27 +626,28 @@ class NodeState { maxSinglePaymentAmountMsat == other.maxSinglePaymentAmountMsat && maxChanReserveMsats == other.maxChanReserveMsats && connectedPeers == other.connectedPeers && - inboundLiquidityMsats == other.inboundLiquidityMsats; + maxReceivableSinglePaymentAmountMsat == other.maxReceivableSinglePaymentAmountMsat && + totalInboundLiquidityMsats == other.totalInboundLiquidityMsats; } class OnchainPaymentLimitsResponse { - /// Minimum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the lower limit of what the reverse swap service accepts as a send amount + /// Minimum amount the reverse swap service accepts as a send amount final BigInt minSat; - /// Maximum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the upper limit of what the reverse swap service accepts as a send amount + /// Maximum amount the reverse swap service accepts as a send amount final BigInt maxSat; + /// Maximum amount this node can send with the current channels and the current local balance + final BigInt maxPayableSat; + const OnchainPaymentLimitsResponse({ required this.minSat, required this.maxSat, + required this.maxPayableSat, }); @override - int get hashCode => minSat.hashCode ^ maxSat.hashCode; + int get hashCode => minSat.hashCode ^ maxSat.hashCode ^ maxPayableSat.hashCode; @override bool operator ==(Object other) => @@ -640,7 +655,8 @@ class OnchainPaymentLimitsResponse { other is OnchainPaymentLimitsResponse && runtimeType == other.runtimeType && minSat == other.minSat && - maxSat == other.maxSat; + maxSat == other.maxSat && + maxPayableSat == other.maxPayableSat; } class OpenChannelFeeRequest { @@ -1481,6 +1497,11 @@ class SendPaymentRequest { /// The bolt11 invoice final String bolt11; + /// Trampoline payments outsource pathfinding to the LSP. Trampoline payments can improve + /// payment performance, but are generally more expensive in terms of fees and they + /// compromise on privacy. + final bool useTrampoline; + /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. final BigInt? amountMsat; @@ -1489,12 +1510,13 @@ class SendPaymentRequest { const SendPaymentRequest({ required this.bolt11, + required this.useTrampoline, this.amountMsat, this.label, }); @override - int get hashCode => bolt11.hashCode ^ amountMsat.hashCode ^ label.hashCode; + int get hashCode => bolt11.hashCode ^ useTrampoline.hashCode ^ amountMsat.hashCode ^ label.hashCode; @override bool operator ==(Object other) => @@ -1502,6 +1524,7 @@ class SendPaymentRequest { other is SendPaymentRequest && runtimeType == other.runtimeType && bolt11 == other.bolt11 && + useTrampoline == other.useTrampoline && amountMsat == other.amountMsat && label == other.label; } @@ -1652,7 +1675,7 @@ class SwapInfo { /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. final BigInt paidMsat; - /// Total amount of transactions sent to the swap address. + /// Total count of transactions sent to the swap address. final BigInt totalIncomingTxs; /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 101028e25..9afb20783 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0 + cargo install flutter_rust_bridge_codegen --version 2.5.1 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate diff --git a/libs/sdk-flutter/pubspec.lock b/libs/sdk-flutter/pubspec.lock index 966b705f5..e7f291662 100644 --- a/libs/sdk-flutter/pubspec.lock +++ b/libs/sdk-flutter/pubspec.lock @@ -17,22 +17,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.4.1" - archive: - dependency: transitive - description: - name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d - url: "https://pub.dev" - source: hosted - version: "3.6.1" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -141,10 +133,10 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -173,18 +165,18 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" dart_style: dependency: transitive description: @@ -213,26 +205,26 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -250,17 +242,17 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: "02720226035257ad0b571c1256f43df3e1556a499f6bcb004849a0faaa0e87f0" + sha256: "5fe868d3cb8cbc4d83091748552e03f00ccfa41b8e44691bc382611f831d5f8b" url: "https://pub.dev" source: hosted - version: "1.82.6" + version: "2.5.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" freezed: - dependency: "direct main" + dependency: "direct dev" description: name: freezed sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 @@ -299,14 +291,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" - http: - dependency: transitive - description: - name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 - url: "https://pub.dev" - source: hosted - version: "1.2.2" http_multi_server: dependency: transitive description: @@ -335,10 +319,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: @@ -383,10 +367,10 @@ packages: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" matcher: dependency: transitive description: @@ -415,10 +399,10 @@ packages: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" package_config: dependency: transitive description: @@ -435,14 +419,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" pool: dependency: transitive description: @@ -467,22 +443,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - puppeteer: - dependency: transitive - description: - name: puppeteer - sha256: de3f921154e5d336b14cdc05b674ac3db5701a5338f3cb0042868a5146f16e67 - url: "https://pub.dev" - source: hosted - version: "3.12.0" quiver: dependency: transitive description: name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" rxdart: dependency: "direct main" description: @@ -499,22 +467,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -536,14 +496,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" stack_trace: dependency: transitive description: @@ -600,14 +552,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" typed_data: dependency: transitive description: @@ -616,14 +560,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90" - url: "https://pub.dev" - source: hosted - version: "4.4.2" vector_math: dependency: transitive description: @@ -652,18 +588,26 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.1" yaml: dependency: transitive description: diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 0cb7b9dcb..1bed50950 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: sdk: flutter ### flutter_rust_bridge_codegen dependencies ffi: ^2.1.2 # requires Dart >=3.3.0(Flutter 3.19) - flutter_rust_bridge: ^2.0.0 - freezed_annotation: ^2.4.1 + flutter_rust_bridge: ">=2.0.0 <=2.5.1" + freezed_annotation: ^2.4.2 ### rxdart: ^0.28.0 From dba25bfb9402e1384ee6cdaf5a6e4a33253485c6 Mon Sep 17 00:00:00 2001 From: Erdem Yerebasmaz Date: Wed, 6 Nov 2024 11:11:45 +0300 Subject: [PATCH 23/23] Bump flutter_rust_bridge to 2.6.0 * Remove flutter_rust_bridge from workspace & sdk-bindings toml * Force rename sync as it's a reserved keyword (which can be used as an identifier without restriction). * Replace _lnToolkit occurrence with binding --- libs/Cargo.lock | 9 ++++----- libs/Cargo.toml | 1 - libs/sdk-bindings/Cargo.toml | 1 - libs/sdk-core/Cargo.toml | 2 +- libs/sdk-core/src/binding.rs | 1 + libs/sdk-core/src/frb_generated.rs | 8 ++++---- libs/sdk-flutter/lib/breez_sdk.dart | 2 +- libs/sdk-flutter/lib/generated/binding.dart | 2 +- libs/sdk-flutter/lib/generated/breez_services.dart | 2 +- libs/sdk-flutter/lib/generated/chain.dart | 2 +- libs/sdk-flutter/lib/generated/frb_generated.dart | 6 +++--- libs/sdk-flutter/lib/generated/frb_generated.io.dart | 2 +- libs/sdk-flutter/lib/generated/lnurl/pay.dart | 2 +- libs/sdk-flutter/lib/generated/lsp.dart | 2 +- libs/sdk-flutter/lib/generated/models.dart | 2 +- libs/sdk-flutter/makefile | 2 +- libs/sdk-flutter/pubspec.lock | 4 ++-- libs/sdk-flutter/pubspec.yaml | 2 +- tools/sdk-cli/Cargo.lock | 8 ++++---- 19 files changed, 29 insertions(+), 31 deletions(-) diff --git a/libs/Cargo.lock b/libs/Cargo.lock index 0d17f0481..7efdc2f13 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -687,7 +687,6 @@ dependencies = [ "anyhow", "breez-sdk-core", "camino", - "flutter_rust_bridge", "glob", "log", "once_cell", @@ -1294,9 +1293,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f052ec223b70cbdf2248376a9ad5af9281b3fdf8ea3c7d3f66fff52a9aaf1fa" +checksum = "93b95a1b4f20b8c037535bcda990abf0ae2bd94c93e27ebbbe00633322bc1561" dependencies = [ "allo-isolate", "android_logger", @@ -1323,9 +1322,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23414fe526f51870c6d89d27bbffbee52ebe0900164a4147b32caf1d3e131682" +checksum = "fafd532ccfcce8ef23e858fe07303ff572e8b302be6ec0b0f38ca6eb319206dc" dependencies = [ "hex", "md-5", diff --git a/libs/Cargo.toml b/libs/Cargo.toml index 4a97f2f78..c27f40f3e 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -21,7 +21,6 @@ aes = "0.8" anyhow = { version = "1.0.79", features = ["backtrace"] } base64 = "0.13.0" bitcoin = "=0.29.2" # Same version as used in gl-client -flutter_rust_bridge = ">=2.0.0, =2.5.1" # Pin the reqwest dependency until macOS linker issue is fixed: https://github.com/seanmonstar/reqwest/issues/2006 hex = "0.4" lightning = "=0.0.118" # Same version as used in gl-client diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index 72c060596..1de1087d1 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -26,7 +26,6 @@ uniffi-kotlin-multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin camino = "1.1.1" log = { workspace = true } once_cell = { workspace = true } -flutter_rust_bridge = { workspace = true } tiny-bip39 = "*" tonic = { workspace = true, features = [ "tls", diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index 627794ea0..342a9fa33 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["staticlib", "cdylib", "lib"] [dependencies] aes = { workspace = true } anyhow = { workspace = true } -flutter_rust_bridge = "=2.5.1" +flutter_rust_bridge = "=2.6.0" hex = { workspace = true } gl-client = { git = "https://github.com/Blockstream/greenlight.git", features = [ "permissive", diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 0f84ef23c..a7660b00b 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -327,6 +327,7 @@ pub fn is_initialized() -> bool { block_on(async { get_breez_services().await.is_ok() }) } +#[frb(name = "sync")] /// See [BreezServices::sync] pub fn sync() -> Result<()> { block_on(async { get_breez_services().await?.sync().await }) diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index ca19bfa19..f7a1ee61c 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/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.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. #![allow( non_camel_case_types, @@ -37,7 +37,7 @@ 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.5.1"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.6.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -488953100; // Section: executor @@ -1407,7 +1407,7 @@ fn wire__crate__binding__static_backup_impl( fn wire__crate__binding__sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "sync", + debug_name: "sync(dart_style=sync)", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, @@ -8254,7 +8254,7 @@ impl SseEncode for crate::binding::UrlSuccessActionData { #[cfg(not(target_family = "wasm"))] mod io { // This file is automatically generated, so please do not edit it. - // @generated by `flutter_rust_bridge`@ 2.5.1. + // @generated by `flutter_rust_bridge`@ 2.6.0. // Section: imports diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 3cf35cc26..ff6bfab9a 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -446,7 +446,7 @@ class BreezSDK { Future claimReverseSwap({ required String lockupAddress, }) async { - return await _lnToolkit.claimReverseSwap(lockupAddress: lockupAddress); + return await binding.claimReverseSwap(lockupAddress: lockupAddress); } /* Swap Fee API's */ diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 85803f00d..b8f411f84 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 559bee335..be6c1dff3 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index fe717f193..3356bbf40 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 342ace360..30b7ec2e2 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.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 @@ -66,7 +66,7 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.5.1'; + String get codegenVersion => '2.6.0'; @override int get rustContentHash => -488953100; @@ -1571,7 +1571,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements } TaskConstMeta get kCrateBindingSyncConstMeta => const TaskConstMeta( - debugName: "sync", + debugName: "sync(dart_style=sync)", argNames: [], ); diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index 2eea7aebc..d5fc16136 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.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 diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay.dart b/libs/sdk-flutter/lib/generated/lnurl/pay.dart index 12a6496ff..a332b33e4 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index 1a745668e..9e273a0bc 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index cb9b0ccbc..76e1ca7df 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// @generated by `flutter_rust_bridge`@ 2.5.1. +// @generated by `flutter_rust_bridge`@ 2.6.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 9afb20783..8067ef459 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.5.1 + cargo install flutter_rust_bridge_codegen --version 2.6.0 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate diff --git a/libs/sdk-flutter/pubspec.lock b/libs/sdk-flutter/pubspec.lock index e7f291662..244bfbb56 100644 --- a/libs/sdk-flutter/pubspec.lock +++ b/libs/sdk-flutter/pubspec.lock @@ -242,10 +242,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: "5fe868d3cb8cbc4d83091748552e03f00ccfa41b8e44691bc382611f831d5f8b" + sha256: fb9d3c9395eae3c71d4fe3ec343b9f30636c9988150c8bb33b60047549b34e3d url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" flutter_test: dependency: "direct dev" description: flutter diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 1bed50950..c35d7915e 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: sdk: flutter ### flutter_rust_bridge_codegen dependencies ffi: ^2.1.2 # requires Dart >=3.3.0(Flutter 3.19) - flutter_rust_bridge: ">=2.0.0 <=2.5.1" + flutter_rust_bridge: 2.6.0 freezed_annotation: ^2.4.2 ### rxdart: ^0.28.0 diff --git a/tools/sdk-cli/Cargo.lock b/tools/sdk-cli/Cargo.lock index 6ae72d386..6448344cb 100644 --- a/tools/sdk-cli/Cargo.lock +++ b/tools/sdk-cli/Cargo.lock @@ -1164,9 +1164,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f052ec223b70cbdf2248376a9ad5af9281b3fdf8ea3c7d3f66fff52a9aaf1fa" +checksum = "93b95a1b4f20b8c037535bcda990abf0ae2bd94c93e27ebbbe00633322bc1561" dependencies = [ "allo-isolate", "android_logger", @@ -1193,9 +1193,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.5.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23414fe526f51870c6d89d27bbffbee52ebe0900164a4147b32caf1d3e131682" +checksum = "fafd532ccfcce8ef23e858fe07303ff572e8b302be6ec0b0f38ca6eb319206dc" dependencies = [ "hex", "md-5",