diff --git a/libs/Cargo.lock b/libs/Cargo.lock index d6a3d83c4..eb79869fb 100644 --- a/libs/Cargo.lock +++ b/libs/Cargo.lock @@ -81,14 +81,13 @@ dependencies = [ [[package]] name = "allo-isolate" -version = "0.1.20" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b7997817c178b853573e8bdfb6c3afe02810b43f17d766d6703560074b0c3" +checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" dependencies = [ "anyhow", "atomic", "backtrace", - "chrono", ] [[package]] @@ -103,6 +102,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" @@ -596,6 +613,12 @@ version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.5.0" @@ -896,20 +919,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-parser" version = "8.2.0" @@ -1087,35 +1131,41 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.6" +version = "2.0.0-dev.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" +checksum = "dbafb8df6b5ec843e2b7f19f33f5b682d6bd028bf86aef2c5e02ff3e4ea37b03" 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", "threadpool", + "tokio", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "flutter_rust_bridge_macros" -version = "1.82.4" +version = "2.0.0-dev.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c2fe4c18349a2b17b980a1214e19a4cb7888a86f70ce5a9a0fccb5611f77bdb" +checksum = "04366488e32ac18f07982356d62860e145cc7ae28e16070f240082fe1c8ed5c9" +dependencies = [ + "hex", + "quote", + "syn 2.0.48", +] [[package]] name = "fnv" @@ -1693,9 +1743,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -2085,6 +2135,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" @@ -3744,9 +3805,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3754,9 +3815,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -3769,9 +3830,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3781,9 +3842,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3791,9 +3852,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -3804,9 +3865,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" diff --git a/libs/sdk-bindings/Cargo.toml b/libs/sdk-bindings/Cargo.toml index b981f9cf5..d4f42adf2 100644 --- a/libs/sdk-bindings/Cargo.toml +++ b/libs/sdk-bindings/Cargo.toml @@ -25,7 +25,7 @@ uniffi-kotlin-multiplatform = { git = "https://gitlab.com/trixnity/uniffi-kotlin camino = "1.1.1" log = "*" once_cell = "*" -flutter_rust_bridge = "=1.82.6" +flutter_rust_bridge = ">= 2.0.0-dev.34, <= 2.0.0-dev.36" tiny-bip39 = "*" tonic = { version = "^0.8", features = [ "tls", diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index 849d57a61..0a31516c7 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-dev.36" aes = "0.8" anyhow = { version = "1.0.79", features = ["backtrace"] } cbc = { version = "0.1", features = ["std"] } diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 140bce792..fc87d2792 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -10,14 +10,12 @@ //! The first option loses the `SdkError` type. The second option keeps the type, which we can retrieve //! with `anyhow::Error::downcast_ref` (or equivalent Dart method). We therefore use the second approach. -use std::future::Future; use std::sync::Arc; +use crate::frb_generated::StreamSink; use anyhow::{anyhow, Result}; -use flutter_rust_bridge::StreamSink; use log::{Level, LevelFilter, Metadata, Record}; -use once_cell::sync::{Lazy, OnceCell}; -use tokio::sync::Mutex; +use once_cell::sync::OnceCell; use crate::breez_services::{self, BreezEvent, BreezServices, EventListener}; use crate::chain::RecommendedFees; @@ -47,501 +45,471 @@ use crate::{ SignMessageResponse, StaticBackupRequest, StaticBackupResponse, }; -/* -The format Lazy>> for the following variables allows them to be instance-global, -meaning they can be set only once per instance, but calling disconnect() will unset them. - */ -static BREEZ_SERVICES_INSTANCE: Lazy>>> = - Lazy::new(|| Mutex::new(None)); static NOTIFICATION_STREAM: OnceCell> = OnceCell::new(); -static RT: Lazy = Lazy::new(|| tokio::runtime::Runtime::new().unwrap()); static LOG_INIT: OnceCell = OnceCell::new(); -/* Breez Services API's */ - /// Wrapper around [BreezServices::connect] which also initializes SDK logging -pub fn connect(req: ConnectRequest) -> Result<()> { - block_on(async move { - let mut locked = BREEZ_SERVICES_INSTANCE.lock().await; - match *locked { - None => { - let breez_services = - BreezServices::connect(req, Box::new(BindingEventListener {})).await?; - - *locked = Some(breez_services); - Ok(()) - } - Some(_) => Err(ConnectError::Generic { - err: "Static node services already set, please call disconnect() first".into(), - }), - } - }) - .map_err(anyhow::Error::new::) +pub async fn connect(req: ConnectRequest) -> Result { + let breez_services = BreezServices::connect(req, Box::new(BindingEventListener {})).await?; + Ok(BindingBreezServices { breez_services }) } -/// Check whether node service is initialized or not -pub fn is_initialized() -> bool { - block_on(async { get_breez_services().await.is_ok() }) +pub struct BindingBreezServices { + breez_services: Arc, } -/// See [BreezServices::sync] -pub fn sync() -> Result<()> { - block_on(async { get_breez_services().await?.sync().await }) - .map_err(anyhow::Error::new::) -} +/* Breez Services API's */ + +impl BindingBreezServices { + /// See [BreezServices::sync] + pub async fn sync(&self) -> Result<()> { + self.breez_services + .sync() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::node_credentials] -pub fn node_credentials() -> Result> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::node_credentials] + pub fn node_credentials(&self) -> Result> { + self.breez_services .node_credentials() .map_err(anyhow::Error::new::) - }) -} + } -/// See [BreezServices::node_info] -pub fn node_info() -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::node_info] + pub fn node_info(&self) -> Result { + self.breez_services .node_info() .map_err(anyhow::Error::new::) - }) -} - -/// See [BreezServices::configure_node] -pub fn configure_node(req: ConfigureNodeRequest) -> Result<()> { - block_on(async { get_breez_services().await?.configure_node(req).await }) - .map_err(anyhow::Error::new::) -} - -/// Cleanup node resources and stop the signer. -pub fn disconnect() -> Result<()> { - block_on(async { - // To avoid deadlock: first disconnect SDK, then acquire lock and unset global instance - get_breez_services().await?.disconnect().await?; - let mut locked_sdk_instance = BREEZ_SERVICES_INSTANCE.lock().await; - *locked_sdk_instance = None; - - Ok(()) - }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::sign_message] -pub fn sign_message(req: SignMessageRequest) -> Result { - block_on(async { get_breez_services().await?.sign_message(req).await }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::check_message] -pub fn check_message(req: CheckMessageRequest) -> Result { - block_on(async { get_breez_services().await?.check_message(req).await }) - .map_err(anyhow::Error::new::) -} - -/* Breez Services Helper API's */ - -/// See [breez_services::mnemonic_to_seed] -pub fn mnemonic_to_seed(phrase: String) -> Result> { - breez_services::mnemonic_to_seed(phrase) -} - -/// See [BreezServices::default_config] -pub fn default_config( - env_type: EnvironmentType, - api_key: String, - node_config: NodeConfig, -) -> Config { - BreezServices::default_config(env_type, api_key, node_config) -} - -/// See [BreezServices::static_backup] -pub fn static_backup(req: StaticBackupRequest) -> Result { - BreezServices::static_backup(req).map_err(anyhow::Error::new::) -} + } -/// See [BreezServices::service_health_check] -pub fn service_health_check(api_key: String) -> Result { - block_on(async { BreezServices::service_health_check(api_key).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::configure_node] + pub async fn configure_node(&self, req: ConfigureNodeRequest) -> Result<()> { + self.breez_services + .configure_node(req) + .await + .map_err(anyhow::Error::new::) + } -/* Stream API's */ + /// Cleanup node resources and stop the signer. + pub async fn disconnect(&self) -> Result<()> { + self.breez_services + .disconnect() + .await + .map_err(anyhow::Error::new::) + } -/// If used, this must be called before `connect`. It can only be called once. -pub fn breez_events_stream(s: StreamSink) -> Result<()> { - NOTIFICATION_STREAM - .set(s) - .map_err(|_| anyhow!("Events stream already created"))?; - Ok(()) -} + /// See [BreezServices::sign_message] + pub async fn sign_message(&self, req: SignMessageRequest) -> Result { + self.breez_services + .sign_message(req) + .await + .map_err(anyhow::Error::new::) + } -/// If used, this must be called before `connect`. It can only be called once. -pub fn breez_log_stream(s: StreamSink) -> Result<()> { - LOG_INIT - .set(true) - .map_err(|_| anyhow!("Log stream already created"))?; - BindingLogger::init(s); - Ok(()) -} + /// See [BreezServices::check_message] + pub async fn check_message(&self, req: CheckMessageRequest) -> Result { + self.breez_services + .check_message(req) + .await + .map_err(anyhow::Error::new::) + } -/* LSP API's */ + /* LSP API's */ -/// See [BreezServices::list_lsps] -pub fn list_lsps() -> Result> { - block_on(async { get_breez_services().await?.list_lsps().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_lsps] + pub async fn list_lsps(&self) -> Result> { + self.breez_services + .list_lsps() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::connect_lsp] -pub fn connect_lsp(lsp_id: String) -> Result<()> { - block_on(async { get_breez_services().await?.connect_lsp(lsp_id).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::connect_lsp] + pub async fn connect_lsp(&self, lsp_id: String) -> Result<()> { + self.breez_services + .connect_lsp(lsp_id) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lsp_id] -pub fn lsp_id() -> Result> { - block_on(async { get_breez_services().await?.lsp_id().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lsp_id] + pub async fn lsp_id(&self) -> Result> { + self.breez_services + .lsp_id() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::fetch_lsp_info] -pub fn fetch_lsp_info(id: String) -> Result> { - block_on(async { get_breez_services().await?.fetch_lsp_info(id).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::fetch_lsp_info] + pub async fn fetch_lsp_info(&self, id: String) -> Result> { + self.breez_services + .fetch_lsp_info(id) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lsp_info] -pub fn lsp_info() -> Result { - block_on(async { get_breez_services().await?.lsp_info().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lsp_info] + pub async fn lsp_info(&self) -> Result { + self.breez_services + .lsp_info() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::close_lsp_channels] -pub fn close_lsp_channels() -> Result<()> { - block_on(async { - _ = get_breez_services().await?.close_lsp_channels().await?; + /// See [BreezServices::close_lsp_channels] + pub async fn close_lsp_channels(&self) -> Result<()> { + self.breez_services.close_lsp_channels().await?; Ok(()) - }) -} + } -pub fn register_webhook(webhook_url: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + pub async fn register_webhook(&self, webhook_url: String) -> Result<()> { + self.breez_services .register_webhook(webhook_url) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -pub fn unregister_webhook(webhook_url: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + pub async fn unregister_webhook(&self, webhook_url: String) -> Result<()> { + self.breez_services .unregister_webhook(webhook_url) .await - }) - .map_err(anyhow::Error::new::) -} - -/* Backup API's */ - -/// See [BreezServices::backup] -pub fn backup() -> Result<()> { - block_on(async { get_breez_services().await?.backup().await }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::backup_status] -pub fn backup_status() -> Result { - block_on(async { get_breez_services().await?.backup_status() }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Parse API's */ + /* Backup API's */ -pub fn parse_invoice(invoice: String) -> Result { - invoice::parse_invoice(&invoice).map_err(|e| anyhow::Error::new::(e.into())) -} + /// See [BreezServices::backup] + pub async fn backup(&self) -> Result<()> { + self.breez_services + .backup() + .await + .map_err(anyhow::Error::new::) + } -pub fn parse_input(input: String) -> Result { - block_on(async { input_parser::parse(&input).await }) -} + /// See [BreezServices::backup_status] + pub fn backup_status(&self) -> Result { + self.breez_services + .backup_status() + .map_err(anyhow::Error::new::) + } -/* Payment API's */ + /* Payment API's */ -/// See [BreezServices::list_payments] -pub fn list_payments(req: ListPaymentsRequest) -> Result> { - block_on(async { get_breez_services().await?.list_payments(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_payments] + pub async fn list_payments(&self, req: ListPaymentsRequest) -> Result> { + self.breez_services + .list_payments(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::list_payments] -pub fn payment_by_hash(hash: String) -> Result> { - block_on(async { get_breez_services().await?.payment_by_hash(hash).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_payments] + pub async fn payment_by_hash(&self, hash: String) -> Result> { + self.breez_services + .payment_by_hash(hash) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::set_payment_metadata] -pub fn set_payment_metadata(hash: String, metadata: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::set_payment_metadata] + pub async fn set_payment_metadata(&self, hash: String, metadata: String) -> Result<()> { + self.breez_services .set_payment_metadata(hash, metadata) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Lightning Payment API's */ + /* Lightning Payment API's */ -/// See [BreezServices::send_payment] -pub fn send_payment(req: SendPaymentRequest) -> Result { - block_on(async { get_breez_services().await?.send_payment(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::send_payment] + pub async fn send_payment(&self, req: SendPaymentRequest) -> Result { + self.breez_services + .send_payment(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::send_spontaneous_payment] -pub fn send_spontaneous_payment(req: SendSpontaneousPaymentRequest) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::send_spontaneous_payment] + pub async fn send_spontaneous_payment( + &self, + req: SendSpontaneousPaymentRequest, + ) -> Result { + self.breez_services .send_spontaneous_payment(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::receive_payment] -pub fn receive_payment(req: ReceivePaymentRequest) -> Result { - block_on(async { get_breez_services().await?.receive_payment(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::receive_payment] + pub async fn receive_payment( + &self, + req: ReceivePaymentRequest, + ) -> Result { + self.breez_services + .receive_payment(req) + .await + .map_err(anyhow::Error::new::) + } -/* LNURL API's */ + /* LNURL API's */ -/// See [BreezServices::lnurl_pay] -pub fn lnurl_pay(req: LnUrlPayRequest) -> Result { - block_on(async { get_breez_services().await?.lnurl_pay(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lnurl_pay] + pub async fn lnurl_pay(&self, req: LnUrlPayRequest) -> Result { + self.breez_services + .lnurl_pay(req) + .await + .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::) -} + /// See [BreezServices::lnurl_withdraw] + pub async fn lnurl_withdraw(&self, req: LnUrlWithdrawRequest) -> Result { + self.breez_services + .lnurl_withdraw(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lnurl_auth] -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::) -} + /// See [BreezServices::lnurl_auth] + pub async fn lnurl_auth(&self, req_data: LnUrlAuthRequestData) -> Result { + self.breez_services + .lnurl_auth(req_data) + .await + .map_err(anyhow::Error::new::) + } -/* Support API */ + /* Support API */ -/// See [BreezServices::report_issue] -pub fn report_issue(req: ReportIssueRequest) -> Result<()> { - block_on(async { get_breez_services().await?.report_issue(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::report_issue] + pub async fn report_issue(&self, req: ReportIssueRequest) -> Result<()> { + self.breez_services + .report_issue(req) + .await + .map_err(anyhow::Error::new::) + } -/* Fiat Currency API's */ + /* Fiat Currency API's */ -/// See [BreezServices::fetch_fiat_rates] -pub fn fetch_fiat_rates() -> Result> { - block_on(async { get_breez_services().await?.fetch_fiat_rates().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::fetch_fiat_rates] + pub async fn fetch_fiat_rates(&self) -> Result> { + self.breez_services + .fetch_fiat_rates() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::list_fiat_currencies] -pub fn list_fiat_currencies() -> Result> { - block_on(async { get_breez_services().await?.list_fiat_currencies().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_fiat_currencies] + pub async fn list_fiat_currencies(&self) -> Result> { + self.breez_services + .list_fiat_currencies() + .await + .map_err(anyhow::Error::new::) + } -/* On-Chain Swap API's */ + /* On-Chain Swap API's */ -/// See [BreezServices::max_reverse_swap_amount] -pub fn max_reverse_swap_amount() -> Result { - #[allow(deprecated)] - block_on(async { get_breez_services().await?.max_reverse_swap_amount().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::max_reverse_swap_amount] + pub async fn max_reverse_swap_amount(&self) -> Result { + #[allow(deprecated)] + self.breez_services + .max_reverse_swap_amount() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::send_onchain] -pub fn send_onchain(req: SendOnchainRequest) -> Result { - #[allow(deprecated)] - block_on(async { get_breez_services().await?.send_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::send_onchain] + pub async fn send_onchain(&self, req: SendOnchainRequest) -> Result { + #[allow(deprecated)] + self.breez_services + .send_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::pay_onchain] -pub fn pay_onchain(req: PayOnchainRequest) -> Result { - block_on(async { get_breez_services().await?.pay_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::pay_onchain] + pub async fn pay_onchain(&self, req: PayOnchainRequest) -> Result { + self.breez_services + .pay_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::receive_onchain] -pub fn receive_onchain(req: ReceiveOnchainRequest) -> Result { - block_on(async { get_breez_services().await?.receive_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::receive_onchain] + pub async fn receive_onchain(&self, req: ReceiveOnchainRequest) -> Result { + self.breez_services + .receive_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::buy_bitcoin] -pub fn buy_bitcoin(req: BuyBitcoinRequest) -> Result { - block_on(async { get_breez_services().await?.buy_bitcoin(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::buy_bitcoin] + pub async fn buy_bitcoin(&self, req: BuyBitcoinRequest) -> Result { + self.breez_services + .buy_bitcoin(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::redeem_onchain_funds] -pub fn redeem_onchain_funds(req: RedeemOnchainFundsRequest) -> Result { - block_on(async { get_breez_services().await?.redeem_onchain_funds(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::redeem_onchain_funds] + pub async fn redeem_onchain_funds( + &self, + req: RedeemOnchainFundsRequest, + ) -> Result { + self.breez_services + .redeem_onchain_funds(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_redeem_onchain_funds] -pub fn prepare_redeem_onchain_funds( - req: PrepareRedeemOnchainFundsRequest, -) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::prepare_redeem_onchain_funds] + pub async fn prepare_redeem_onchain_funds( + &self, + req: PrepareRedeemOnchainFundsRequest, + ) -> Result { + self.breez_services .prepare_redeem_onchain_funds(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Refundables API's */ + /* Refundables API's */ -/// See [BreezServices::list_refundables] -pub fn list_refundables() -> Result> { - block_on(async { get_breez_services().await?.list_refundables().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_refundables] + pub async fn list_refundables(&self) -> Result> { + self.breez_services + .list_refundables() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_refund] -pub fn prepare_refund(req: PrepareRefundRequest) -> Result { - block_on(async { get_breez_services().await?.prepare_refund(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::prepare_refund] + pub async fn prepare_refund(&self, req: PrepareRefundRequest) -> Result { + self.breez_services + .prepare_refund(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::refund] -pub fn refund(req: RefundRequest) -> Result { - block_on(async { get_breez_services().await?.refund(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::refund] + pub async fn refund(&self, req: RefundRequest) -> Result { + self.breez_services + .refund(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::rescan_swaps] -pub fn rescan_swaps() -> Result<()> { - block_on(async { get_breez_services().await?.rescan_swaps().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::rescan_swaps] + pub async fn rescan_swaps(&self) -> Result<()> { + self.breez_services + .rescan_swaps() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::redeem_swap] -pub fn redeem_swap(swap_address: String) -> Result<()> { - block_on(async { get_breez_services().await?.redeem_swap(swap_address).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::redeem_swap] + pub async fn redeem_swap(&self, swap_address: String) -> Result<()> { + self.breez_services + .redeem_swap(swap_address) + .await + .map_err(anyhow::Error::new::) + } -/* In Progress Swap API's */ + /* In Progress Swap API's */ -/// See [BreezServices::in_progress_swap] -pub fn in_progress_swap() -> Result> { - block_on(async { get_breez_services().await?.in_progress_swap().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::in_progress_swap] + pub async fn in_progress_swap(&self) -> Result> { + self.breez_services + .in_progress_swap() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::in_progress_reverse_swaps] -pub fn in_progress_reverse_swaps() -> Result> { - #[allow(deprecated)] - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::in_progress_reverse_swaps] + pub async fn in_progress_reverse_swaps(&self) -> Result> { + #[allow(deprecated)] + self.breez_services .in_progress_reverse_swaps() .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Swap Fee API's */ + /* Swap Fee API's */ -/// See [BreezServices::open_channel_fee] -pub fn open_channel_fee(req: OpenChannelFeeRequest) -> Result { - block_on(async { get_breez_services().await?.open_channel_fee(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::open_channel_fee] + pub async fn open_channel_fee( + &self, + req: OpenChannelFeeRequest, + ) -> Result { + self.breez_services + .open_channel_fee(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::fetch_reverse_swap_fees] -pub fn fetch_reverse_swap_fees(req: ReverseSwapFeesRequest) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::fetch_reverse_swap_fees] + pub async fn fetch_reverse_swap_fees( + &self, + req: ReverseSwapFeesRequest, + ) -> Result { + self.breez_services .fetch_reverse_swap_fees(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::onchain_payment_limits] -pub fn onchain_payment_limits() -> Result { - block_on(async { get_breez_services().await?.onchain_payment_limits().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::onchain_payment_limits] + pub async fn onchain_payment_limits(&self) -> Result { + self.breez_services + .onchain_payment_limits() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_onchain_payment] -pub fn prepare_onchain_payment( - req: PrepareOnchainPaymentRequest, -) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::prepare_onchain_payment] + pub async fn prepare_onchain_payment( + &self, + req: PrepareOnchainPaymentRequest, + ) -> Result { + self.breez_services .prepare_onchain_payment(req) .await .map_err(anyhow::Error::new::) - }) -} + } -/// See [BreezServices::in_progress_onchain_payments] -pub fn in_progress_onchain_payments() -> Result> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::in_progress_onchain_payments] + pub async fn in_progress_onchain_payments(&self) -> Result> { + self.breez_services .in_progress_onchain_payments() .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::recommended_fees] -pub fn recommended_fees() -> Result { - block_on(async { get_breez_services().await?.recommended_fees().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::recommended_fees] + pub async fn recommended_fees(&self) -> Result { + self.breez_services + .recommended_fees() + .await + .map_err(anyhow::Error::new::) + } -/* CLI API's */ + /* CLI API's */ -/// See [BreezServices::execute_dev_command] -pub fn execute_command(command: String) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::execute_dev_command] + pub async fn execute_command(&self, command: String) -> Result { + self.breez_services .execute_dev_command(command) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::generate_diagnostic_data] -pub fn generate_diagnostic_data() -> Result { - block_on(async { get_breez_services().await?.generate_diagnostic_data().await }) - .map_err(anyhow::Error::new::) + /// See [BreezServices::generate_diagnostic_data] + pub async fn generate_diagnostic_data(&self) -> Result { + self.breez_services + .generate_diagnostic_data() + .await + .map_err(anyhow::Error::new::) + } } - /* Binding Related Logic */ struct BindingEventListener; @@ -549,7 +517,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); } } } @@ -573,7 +541,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(), }); @@ -582,19 +550,59 @@ impl log::Log for BindingLogger { fn flush(&self) {} } -async fn get_breez_services() -> Result, SdkError> { - match BREEZ_SERVICES_INSTANCE.lock().await.as_ref() { - None => Err(SdkError::Generic { - err: "Node service was not initialized".into(), - }), - Some(sdk) => Ok(sdk.clone()), - } +/* Parse API's */ + +pub fn parse_invoice(invoice: String) -> Result { + invoice::parse_invoice(&invoice).map_err(|e| anyhow::Error::new::(e.into())) +} + +pub async fn parse_input(input: String) -> Result { + input_parser::parse(&input).await +} + +/* Breez Services Helper API's */ + +/// See [breez_services::mnemonic_to_seed] +pub fn mnemonic_to_seed(phrase: String) -> Result> { + breez_services::mnemonic_to_seed(phrase) +} + +/// See [BreezServices::default_config] +pub fn default_config( + env_type: EnvironmentType, + api_key: String, + node_config: NodeConfig, +) -> Config { + BreezServices::default_config(env_type, api_key, node_config) } -fn block_on(future: F) -> F::Output { - rt().block_on(future) +/// See [BreezServices::static_backup] +pub fn static_backup(req: StaticBackupRequest) -> Result { + BreezServices::static_backup(req).map_err(anyhow::Error::new::) } -pub(crate) fn rt() -> &'static tokio::runtime::Runtime { - &RT +/// See [BreezServices::service_health_check] +pub async fn service_health_check(api_key: String) -> Result { + BreezServices::service_health_check(api_key) + .await + .map_err(anyhow::Error::new::) +} + +/* Stream API's */ + +/// If used, this must be called before `connect`. It can only be called once. +pub fn breez_events_stream(s: StreamSink) -> Result<()> { + NOTIFICATION_STREAM + .set(s) + .map_err(|_| anyhow!("Events stream already created"))?; + Ok(()) +} + +/// If used, this must be called before `connect`. It can only be called once. +pub fn breez_log_stream(s: StreamSink) -> Result<()> { + LOG_INIT + .set(true) + .map_err(|_| anyhow!("Log stream already created"))?; + BindingLogger::init(s); + Ok(()) } 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..eeb9870af --- /dev/null +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -0,0 +1,5517 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// Section: imports + +use super::*; +use crate::binding::*; +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 for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> BindingBreezServices { + flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(CstDecode::< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >::cst_decode( + self + )) + } +} +impl + CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + > 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, + > 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_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::error::ConnectError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Generic }; + crate::error::ConnectError::Generic { + err: ans.err.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.RestoreOnly }; + crate::error::ConnectError::RestoreOnly { + err: ans.err.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::error::ConnectError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } +} +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(), + 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::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(), + 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::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_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ConnectErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_connect_error { + 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(), + 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(), + 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(), + 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: 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__crate__binding__BindingBreezServices_backup( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_backup_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_backup_status_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin( + port_: i64, + that: usize, + req: *mut wire_cst_buy_bitcoin_request, +) { + wire__crate__binding__BindingBreezServices_buy_bitcoin_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message( + port_: i64, + that: usize, + req: *mut wire_cst_check_message_request, +) { + wire__crate__binding__BindingBreezServices_check_message_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_close_lsp_channels_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node( + port_: i64, + that: usize, + req: *mut wire_cst_configure_node_request, +) { + wire__crate__binding__BindingBreezServices_configure_node_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp( + port_: i64, + that: usize, + lsp_id: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_connect_lsp_impl(port_, that, lsp_id) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_disconnect_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command( + port_: i64, + that: usize, + command: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_execute_command_impl(port_, that, command) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_fetch_fiat_rates_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info( + port_: i64, + that: usize, + id: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_fetch_lsp_info_impl(port_, that, id) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( + port_: i64, + that: usize, + req: *mut wire_cst_reverse_swap_fees_request, +) { + wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_generate_diagnostic_data_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_onchain_payments_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_swap_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_fiat_currencies_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_lsps_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments( + port_: i64, + that: usize, + req: *mut wire_cst_list_payments_request, +) { + wire__crate__binding__BindingBreezServices_list_payments_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_refundables_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth( + port_: i64, + that: usize, + req_data: *mut wire_cst_ln_url_auth_request_data, +) { + wire__crate__binding__BindingBreezServices_lnurl_auth_impl(port_, that, req_data) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay( + port_: i64, + that: usize, + req: *mut wire_cst_ln_url_pay_request, +) { + wire__crate__binding__BindingBreezServices_lnurl_pay_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw( + port_: i64, + that: usize, + req: *mut wire_cst_ln_url_withdraw_request, +) { + wire__crate__binding__BindingBreezServices_lnurl_withdraw_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_lsp_id_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_lsp_info_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_max_reverse_swap_amount_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_node_credentials_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_node_info_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_onchain_payment_limits_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee( + port_: i64, + that: usize, + req: *mut wire_cst_open_channel_fee_request, +) { + wire__crate__binding__BindingBreezServices_open_channel_fee_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_pay_onchain_request, +) { + wire__crate__binding__BindingBreezServices_pay_onchain_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash( + port_: i64, + that: usize, + hash: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_payment_by_hash_impl(port_, that, hash) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_onchain_payment_request, +) { + wire__crate__binding__BindingBreezServices_prepare_onchain_payment_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_redeem_onchain_funds_request, +) { + wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_refund_request, +) { + wire__crate__binding__BindingBreezServices_prepare_refund_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_receive_onchain_request, +) { + wire__crate__binding__BindingBreezServices_receive_onchain_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment( + port_: i64, + that: usize, + req: *mut wire_cst_receive_payment_request, +) { + wire__crate__binding__BindingBreezServices_receive_payment_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_recommended_fees_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds( + port_: i64, + that: usize, + req: *mut wire_cst_redeem_onchain_funds_request, +) { + wire__crate__binding__BindingBreezServices_redeem_onchain_funds_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap( + port_: i64, + that: usize, + swap_address: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_redeem_swap_impl(port_, that, swap_address) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund( + port_: i64, + that: usize, + req: *mut wire_cst_refund_request, +) { + wire__crate__binding__BindingBreezServices_refund_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook( + port_: i64, + that: usize, + webhook_url: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_register_webhook_impl(port_, that, webhook_url) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue( + port_: i64, + that: usize, + req: *mut wire_cst_report_issue_request, +) { + wire__crate__binding__BindingBreezServices_report_issue_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_rescan_swaps_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_send_onchain_request, +) { + wire__crate__binding__BindingBreezServices_send_onchain_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment( + port_: i64, + that: usize, + req: *mut wire_cst_send_payment_request, +) { + wire__crate__binding__BindingBreezServices_send_payment_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment( + port_: i64, + that: usize, + req: *mut wire_cst_send_spontaneous_payment_request, +) { + wire__crate__binding__BindingBreezServices_send_spontaneous_payment_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata( + port_: i64, + that: usize, + hash: *mut wire_cst_list_prim_u_8_strict, + metadata: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_set_payment_metadata_impl( + port_, that, hash, metadata, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message( + port_: i64, + that: usize, + req: *mut wire_cst_sign_message_request, +) { + wire__crate__binding__BindingBreezServices_sign_message_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_sync_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook( + port_: i64, + that: usize, + webhook_url: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_unregister_webhook_impl(port_, that, webhook_url) +} + +#[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__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__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__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__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__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__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_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + 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_generatedRustAutoOpaqueInnerBindingBreezServices( + 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 { + 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_error { + tag: i32, + kind: ConnectErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union ConnectErrorKind { + Generic: wire_cst_ConnectError_Generic, + RestoreOnly: wire_cst_ConnectError_RestoreOnly, + ServiceConnectivity: wire_cst_ConnectError_ServiceConnectivity, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_RestoreOnly { + err: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_ServiceConnectivity { + err: *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, + 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, + 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, + 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: 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..037afadac --- /dev/null +++ b/libs/sdk-core/src/frb_generated.rs @@ -0,0 +1,7992 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +#![allow( + non_camel_case_types, + unused, + non_snake_case, + clippy::needless_return, + clippy::redundant_closure_call, + clippy::redundant_closure, + clippy::useless_conversion, + clippy::unit_arg, + clippy::unused_unit, + clippy::double_parens, + clippy::let_and_return, + clippy::too_many_arguments, + clippy::match_single_binding, + clippy::clone_on_copy, + clippy::let_unit_value +)] + +// Section: imports + +use crate::binding::*; +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.36"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1104475804; + +// Section: executor + +flutter_rust_bridge::frb_generated_default_handler!(); + +// Section: wire_funcs + +fn wire__crate__binding__BindingBreezServices_backup_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_backup", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::backup(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_backup_status_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_backup_status", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco((move || { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::backup_status(&api_that) + })()) + } }) +} +fn wire__crate__binding__BindingBreezServices_buy_bitcoin_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_buy_bitcoin", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::buy_bitcoin(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_check_message_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_check_message", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::check_message(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_close_lsp_channels_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_close_lsp_channels", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::close_lsp_channels(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_configure_node_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_configure_node", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::configure_node(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_connect_lsp_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + lsp_id: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_connect_lsp", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_lsp_id = lsp_id.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::connect_lsp(&api_that, api_lsp_id).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_disconnect_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_disconnect", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::disconnect(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_execute_command_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + command: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_execute_command", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_command = command.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::execute_command(&api_that, api_command).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_fetch_fiat_rates_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_fiat_rates", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_fiat_rates(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_fetch_lsp_info_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + id: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_lsp_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_id = id.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_lsp_info(&api_that, api_id).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_reverse_swap_fees", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_reverse_swap_fees(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_generate_diagnostic_data_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_generate_diagnostic_data", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::generate_diagnostic_data(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_in_progress_onchain_payments_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_onchain_payments", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_onchain_payments(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_reverse_swaps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_reverse_swaps(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_in_progress_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_swap", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_swap(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_list_fiat_currencies_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_fiat_currencies", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_fiat_currencies(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_list_lsps_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_lsps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_lsps(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_list_payments_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_payments", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_payments(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_list_refundables_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_refundables", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_refundables(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_lnurl_auth_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req_data: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_auth", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req_data = req_data.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_auth(&api_that, api_req_data).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_lnurl_pay_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_pay", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_pay(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_lnurl_withdraw_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_withdraw", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_withdraw(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_lsp_id_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lsp_id", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lsp_id(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_lsp_info_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lsp_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lsp_info(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_max_reverse_swap_amount_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_max_reverse_swap_amount", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::max_reverse_swap_amount(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_node_credentials_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_node_credentials", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco((move || { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::node_credentials(&api_that) + })()) + } }) +} +fn wire__crate__binding__BindingBreezServices_node_info_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_node_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco((move || { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::node_info(&api_that) + })()) + } }) +} +fn wire__crate__binding__BindingBreezServices_onchain_payment_limits_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::onchain_payment_limits(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_open_channel_fee_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_open_channel_fee", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::open_channel_fee(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_pay_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_pay_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::pay_onchain(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_payment_by_hash_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + hash: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_payment_by_hash", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_hash = hash.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::payment_by_hash(&api_that, api_hash).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_prepare_onchain_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_onchain_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_onchain_payment(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_redeem_onchain_funds", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_redeem_onchain_funds(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_prepare_refund_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_refund", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_refund(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_receive_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_receive_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::receive_onchain(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_receive_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_receive_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::receive_payment(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_recommended_fees_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_recommended_fees", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::recommended_fees(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_redeem_onchain_funds_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_redeem_onchain_funds", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::redeem_onchain_funds(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_redeem_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + swap_address: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_redeem_swap", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_swap_address = swap_address.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::redeem_swap(&api_that, api_swap_address).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_refund_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_refund", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::refund(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_register_webhook_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + webhook_url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_register_webhook", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_webhook_url = webhook_url.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::register_webhook(&api_that, api_webhook_url).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_report_issue_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_report_issue", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::report_issue(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_rescan_swaps_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_rescan_swaps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::rescan_swaps(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_send_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_onchain(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_send_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_payment(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_send_spontaneous_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_spontaneous_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_spontaneous_payment(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_set_payment_metadata_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + hash: impl CstDecode, + metadata: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_set_payment_metadata", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_hash = hash.cst_decode();let api_metadata = metadata.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::set_payment_metadata(&api_that, api_hash, api_metadata).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_sign_message_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_sign_message", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::sign_message(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_sync_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_sync", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::sync(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_unregister_webhook_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + webhook_url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_unregister_webhook", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_webhook_url = webhook_url.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::unregister_webhook(&api_that, api_webhook_url).await + })().await) + } }) +} +fn wire__crate__binding__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__crate__binding__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__crate__binding__connect_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( + 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| async move { + transform_result_dco( + (move || async move { crate::binding::connect(api_req).await })().await, + ) + } + }, + ) +} +fn wire__crate__binding__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__crate__binding__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__crate__binding__parse_input_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + input: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( + 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| async move { + transform_result_dco( + (move || async move { crate::binding::parse_input(api_input).await })().await, + ) + } + }, + ) +} +fn wire__crate__binding__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__crate__binding__service_health_check_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + api_key: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( + 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| async move { + transform_result_dco((move || async move { + crate::binding::service_health_check(api_api_key).await + })().await) + } + }, + ) +} +fn wire__crate__binding__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))()) + }, + ) +} + +// 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 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 { + let mut inner = ::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner); + } +} + +impl SseDecode for BindingBreezServices { + // 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 +{ + // 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::error::ConnectError { + // 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_err = ::sse_decode(deserializer); + return crate::error::ConnectError::Generic { err: var_err }; + } + 1 => { + let mut var_err = ::sse_decode(deserializer); + return crate::error::ConnectError::RestoreOnly { err: var_err }; + } + 2 => { + let mut var_err = ::sse_decode(deserializer); + return crate::error::ConnectError::ServiceConnectivity { err: var_err }; + } + _ => { + unimplemented!(""); + } + } + } +} + +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_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); + 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, + lnurl_pay_comment: var_lnurlPayComment, + 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); + 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, + }; + } +} + +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, + }; + } +} + +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, + 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 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 BindingBreezServices { + 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::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::error::ConnectError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::error::ConnectError::Generic { err } => { + [0.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + crate::error::ConnectError::RestoreOnly { err } => { + [1.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + crate::error::ConnectError::ServiceConnectivity { err } => { + [2.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::error::ConnectError {} +impl flutter_rust_bridge::IntoIntoDart for crate::error::ConnectError { + fn into_into_dart(self) -> crate::error::ConnectError { + 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.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(), + 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(), + self.label.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 BindingBreezServices { + // 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 +{ + // 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::error::ConnectError { + // 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::error::ConnectError::Generic { err } => { + ::sse_encode(0, serializer); + ::sse_encode(err, serializer); + } + crate::error::ConnectError::RestoreOnly { err } => { + ::sse_encode(1, serializer); + ::sse_encode(err, serializer); + } + crate::error::ConnectError::ServiceConnectivity { err } => { + ::sse_encode(2, serializer); + ::sse_encode(err, 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.lnurl_pay_comment, 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); + >::sse_encode(self.label, 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); + } +} + +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; +#[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 13aa25147..afd5657f9 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -155,7 +155,7 @@ //! //! Join this [telegram group](https://t.me/breezsdk). -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/README.md b/libs/sdk-flutter/README.md index c9d9c3f60..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 1.82.6 +cargo install flutter_rust_bridge_codegen --version 2.0.0-dev.36 ``` ## Building the plugin diff --git a/libs/sdk-flutter/analysis_options.yaml b/libs/sdk-flutter/analysis_options.yaml index 9a7e168ac..e2613db7f 100644 --- a/libs/sdk-flutter/analysis_options.yaml +++ b/libs/sdk-flutter/analysis_options.yaml @@ -24,6 +24,4 @@ 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 + - lib/generated/** \ No newline at end of file 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/ios/Classes/BreezSDKPlugin.m b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m index 21a07c509..0841418dc 100644 --- a/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m +++ b/libs/sdk-flutter/ios/Classes/BreezSDKPlugin.m @@ -1,5 +1,5 @@ #import "BreezSDKPlugin.h" -#import "bridge_generated.h" +#import "frb_generated.h" #if __has_include() #import #else diff --git a/libs/sdk-flutter/ios/Classes/bridge_generated.h b/libs/sdk-flutter/ios/Classes/bridge_generated.h deleted file mode 100644 index a50dd20dc..000000000 --- a/libs/sdk-flutter/ios/Classes/bridge_generated.h +++ /dev/null @@ -1,608 +0,0 @@ -#include -#include -#include -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 DartCObject DartCObject; - -typedef int64_t DartPort; - -typedef bool (*DartPostCObjectFnType)(DartPort port_id, void *message); - -typedef struct wire_uint_8_list { - uint8_t *ptr; - int32_t len; -} wire_uint_8_list; - -typedef struct wire_GreenlightCredentials { - struct wire_uint_8_list *device_key; - struct wire_uint_8_list *device_cert; -} wire_GreenlightCredentials; - -typedef struct wire_GreenlightNodeConfig { - struct wire_GreenlightCredentials *partner_credentials; - struct wire_uint_8_list *invite_code; -} wire_GreenlightNodeConfig; - -typedef struct wire_NodeConfig_Greenlight { - struct wire_GreenlightNodeConfig *config; -} wire_NodeConfig_Greenlight; - -typedef union NodeConfigKind { - struct wire_NodeConfig_Greenlight *Greenlight; -} NodeConfigKind; - -typedef struct wire_NodeConfig { - int32_t tag; - union NodeConfigKind *kind; -} wire_NodeConfig; - -typedef struct wire_Config { - struct wire_uint_8_list *breezserver; - struct wire_uint_8_list *chainnotifier_url; - struct wire_uint_8_list *mempoolspace_url; - struct wire_uint_8_list *working_dir; - int32_t network; - uint32_t payment_timeout_sec; - struct wire_uint_8_list *default_lsp_id; - struct wire_uint_8_list *api_key; - double maxfee_percent; - uint64_t exemptfee_msat; - struct wire_NodeConfig node_config; -} wire_Config; - -typedef struct wire_ConnectRequest { - struct wire_Config config; - struct wire_uint_8_list *seed; - bool *restore_only; -} wire_ConnectRequest; - -typedef struct wire_ConfigureNodeRequest { - struct wire_uint_8_list *close_to_address; -} wire_ConfigureNodeRequest; - -typedef struct wire_SignMessageRequest { - struct wire_uint_8_list *message; -} wire_SignMessageRequest; - -typedef struct wire_CheckMessageRequest { - struct wire_uint_8_list *message; - struct wire_uint_8_list *pubkey; - struct wire_uint_8_list *signature; -} wire_CheckMessageRequest; - -typedef struct wire_StaticBackupRequest { - struct wire_uint_8_list *working_dir; -} wire_StaticBackupRequest; - -typedef struct wire_list_payment_type_filter { - int32_t *ptr; - int32_t len; -} wire_list_payment_type_filter; - -typedef struct wire_MetadataFilter { - struct wire_uint_8_list *json_path; - struct wire_uint_8_list *json_value; -} wire_MetadataFilter; - -typedef struct wire_list_metadata_filter { - struct wire_MetadataFilter *ptr; - int32_t len; -} wire_list_metadata_filter; - -typedef struct wire_ListPaymentsRequest { - struct wire_list_payment_type_filter *filters; - struct wire_list_metadata_filter *metadata_filters; - int64_t *from_timestamp; - int64_t *to_timestamp; - bool *include_failures; - uint32_t *offset; - uint32_t *limit; -} wire_ListPaymentsRequest; - -typedef struct wire_SendPaymentRequest { - struct wire_uint_8_list *bolt11; - uint64_t *amount_msat; - struct wire_uint_8_list *label; -} wire_SendPaymentRequest; - -typedef struct wire_TlvEntry { - uint64_t field_number; - struct wire_uint_8_list *value; -} wire_TlvEntry; - -typedef struct wire_list_tlv_entry { - struct wire_TlvEntry *ptr; - int32_t len; -} wire_list_tlv_entry; - -typedef struct wire_SendSpontaneousPaymentRequest { - struct wire_uint_8_list *node_id; - uint64_t amount_msat; - struct wire_list_tlv_entry *extra_tlvs; - struct wire_uint_8_list *label; -} wire_SendSpontaneousPaymentRequest; - -typedef struct wire_OpeningFeeParams { - uint64_t min_msat; - uint32_t proportional; - struct wire_uint_8_list *valid_until; - uint32_t max_idle_time; - uint32_t max_client_to_self_delay; - struct wire_uint_8_list *promise; -} wire_OpeningFeeParams; - -typedef struct wire_ReceivePaymentRequest { - uint64_t amount_msat; - struct wire_uint_8_list *description; - struct wire_uint_8_list *preimage; - struct wire_OpeningFeeParams *opening_fee_params; - bool *use_description_hash; - uint32_t *expiry; - uint32_t *cltv; -} wire_ReceivePaymentRequest; - -typedef struct wire_LnUrlPayRequestData { - struct wire_uint_8_list *callback; - uint64_t min_sendable; - uint64_t max_sendable; - struct wire_uint_8_list *metadata_str; - uint16_t comment_allowed; - struct wire_uint_8_list *domain; - bool allows_nostr; - struct wire_uint_8_list *nostr_pubkey; - struct wire_uint_8_list *ln_address; -} wire_LnUrlPayRequestData; - -typedef struct wire_LnUrlPayRequest { - struct wire_LnUrlPayRequestData data; - uint64_t amount_msat; - struct wire_uint_8_list *comment; - struct wire_uint_8_list *payment_label; -} wire_LnUrlPayRequest; - -typedef struct wire_LnUrlWithdrawRequestData { - struct wire_uint_8_list *callback; - struct wire_uint_8_list *k1; - struct wire_uint_8_list *default_description; - uint64_t min_withdrawable; - uint64_t max_withdrawable; -} wire_LnUrlWithdrawRequestData; - -typedef struct wire_LnUrlWithdrawRequest { - struct wire_LnUrlWithdrawRequestData data; - uint64_t amount_msat; - struct wire_uint_8_list *description; -} wire_LnUrlWithdrawRequest; - -typedef struct wire_LnUrlAuthRequestData { - struct wire_uint_8_list *k1; - struct wire_uint_8_list *action; - struct wire_uint_8_list *domain; - struct wire_uint_8_list *url; -} wire_LnUrlAuthRequestData; - -typedef struct wire_ReportPaymentFailureDetails { - struct wire_uint_8_list *payment_hash; - struct wire_uint_8_list *comment; -} wire_ReportPaymentFailureDetails; - -typedef struct wire_ReportIssueRequest_PaymentFailure { - struct wire_ReportPaymentFailureDetails *data; -} wire_ReportIssueRequest_PaymentFailure; - -typedef union ReportIssueRequestKind { - struct wire_ReportIssueRequest_PaymentFailure *PaymentFailure; -} ReportIssueRequestKind; - -typedef struct wire_ReportIssueRequest { - int32_t tag; - union ReportIssueRequestKind *kind; -} wire_ReportIssueRequest; - -typedef struct wire_SendOnchainRequest { - uint64_t amount_sat; - struct wire_uint_8_list *onchain_recipient_address; - struct wire_uint_8_list *pair_hash; - uint32_t sat_per_vbyte; -} wire_SendOnchainRequest; - -typedef struct wire_PrepareOnchainPaymentResponse { - struct wire_uint_8_list *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_PrepareOnchainPaymentResponse; - -typedef struct wire_PayOnchainRequest { - struct wire_uint_8_list *recipient_address; - struct wire_PrepareOnchainPaymentResponse prepare_res; -} wire_PayOnchainRequest; - -typedef struct wire_ReceiveOnchainRequest { - struct wire_OpeningFeeParams *opening_fee_params; -} wire_ReceiveOnchainRequest; - -typedef struct wire_BuyBitcoinRequest { - int32_t provider; - struct wire_OpeningFeeParams *opening_fee_params; -} wire_BuyBitcoinRequest; - -typedef struct wire_RedeemOnchainFundsRequest { - struct wire_uint_8_list *to_address; - uint32_t sat_per_vbyte; -} wire_RedeemOnchainFundsRequest; - -typedef struct wire_PrepareRedeemOnchainFundsRequest { - struct wire_uint_8_list *to_address; - uint32_t sat_per_vbyte; -} wire_PrepareRedeemOnchainFundsRequest; - -typedef struct wire_PrepareRefundRequest { - struct wire_uint_8_list *swap_address; - struct wire_uint_8_list *to_address; - uint32_t sat_per_vbyte; -} wire_PrepareRefundRequest; - -typedef struct wire_RefundRequest { - struct wire_uint_8_list *swap_address; - struct wire_uint_8_list *to_address; - uint32_t sat_per_vbyte; -} wire_RefundRequest; - -typedef struct wire_OpenChannelFeeRequest { - uint64_t *amount_msat; - uint32_t *expiry; -} wire_OpenChannelFeeRequest; - -typedef struct wire_ReverseSwapFeesRequest { - uint64_t *send_amount_sat; - uint32_t *claim_tx_feerate; -} wire_ReverseSwapFeesRequest; - -typedef struct wire_PrepareOnchainPaymentRequest { - uint64_t amount_sat; - int32_t amount_type; - uint32_t claim_tx_feerate; -} wire_PrepareOnchainPaymentRequest; - -typedef struct DartCObject *WireSyncReturn; - -void store_dart_post_cobject(DartPostCObjectFnType ptr); - -Dart_Handle get_dart_object(uintptr_t ptr); - -void drop_dart_object(uintptr_t ptr); - -uintptr_t new_dart_opaque(Dart_Handle handle); - -intptr_t init_frb_dart_api_dl(void *obj); - -void wire_connect(int64_t port_, struct wire_ConnectRequest *req); - -void wire_is_initialized(int64_t port_); - -void wire_sync(int64_t port_); - -void wire_node_credentials(int64_t port_); - -void wire_node_info(int64_t port_); - -void wire_configure_node(int64_t port_, struct wire_ConfigureNodeRequest *req); - -void wire_disconnect(int64_t port_); - -void wire_sign_message(int64_t port_, struct wire_SignMessageRequest *req); - -void wire_check_message(int64_t port_, struct wire_CheckMessageRequest *req); - -void wire_mnemonic_to_seed(int64_t port_, struct wire_uint_8_list *phrase); - -void wire_default_config(int64_t port_, - int32_t env_type, - struct wire_uint_8_list *api_key, - struct wire_NodeConfig *node_config); - -void wire_static_backup(int64_t port_, struct wire_StaticBackupRequest *req); - -void wire_service_health_check(int64_t port_, struct wire_uint_8_list *api_key); - -void wire_breez_events_stream(int64_t port_); - -void wire_breez_log_stream(int64_t port_); - -void wire_list_lsps(int64_t port_); - -void wire_connect_lsp(int64_t port_, struct wire_uint_8_list *lsp_id); - -void wire_lsp_id(int64_t port_); - -void wire_fetch_lsp_info(int64_t port_, struct wire_uint_8_list *id); - -void wire_lsp_info(int64_t port_); - -void wire_close_lsp_channels(int64_t port_); - -void wire_register_webhook(int64_t port_, struct wire_uint_8_list *webhook_url); - -void wire_unregister_webhook(int64_t port_, struct wire_uint_8_list *webhook_url); - -void wire_backup(int64_t port_); - -void wire_backup_status(int64_t port_); - -void wire_parse_invoice(int64_t port_, struct wire_uint_8_list *invoice); - -void wire_parse_input(int64_t port_, struct wire_uint_8_list *input); - -void wire_list_payments(int64_t port_, struct wire_ListPaymentsRequest *req); - -void wire_payment_by_hash(int64_t port_, struct wire_uint_8_list *hash); - -void wire_set_payment_metadata(int64_t port_, - struct wire_uint_8_list *hash, - struct wire_uint_8_list *metadata); - -void wire_send_payment(int64_t port_, struct wire_SendPaymentRequest *req); - -void wire_send_spontaneous_payment(int64_t port_, struct wire_SendSpontaneousPaymentRequest *req); - -void wire_receive_payment(int64_t port_, struct wire_ReceivePaymentRequest *req); - -void wire_lnurl_pay(int64_t port_, struct wire_LnUrlPayRequest *req); - -void wire_lnurl_withdraw(int64_t port_, struct wire_LnUrlWithdrawRequest *req); - -void wire_lnurl_auth(int64_t port_, struct wire_LnUrlAuthRequestData *req_data); - -void wire_report_issue(int64_t port_, struct wire_ReportIssueRequest *req); - -void wire_fetch_fiat_rates(int64_t port_); - -void wire_list_fiat_currencies(int64_t port_); - -void wire_max_reverse_swap_amount(int64_t port_); - -void wire_send_onchain(int64_t port_, struct wire_SendOnchainRequest *req); - -void wire_pay_onchain(int64_t port_, struct wire_PayOnchainRequest *req); - -void wire_receive_onchain(int64_t port_, struct wire_ReceiveOnchainRequest *req); - -void wire_buy_bitcoin(int64_t port_, struct wire_BuyBitcoinRequest *req); - -void wire_redeem_onchain_funds(int64_t port_, struct wire_RedeemOnchainFundsRequest *req); - -void wire_prepare_redeem_onchain_funds(int64_t port_, - struct wire_PrepareRedeemOnchainFundsRequest *req); - -void wire_list_refundables(int64_t port_); - -void wire_prepare_refund(int64_t port_, struct wire_PrepareRefundRequest *req); - -void wire_refund(int64_t port_, struct wire_RefundRequest *req); - -void wire_rescan_swaps(int64_t port_); - -void wire_redeem_swap(int64_t port_, struct wire_uint_8_list *swap_address); - -void wire_in_progress_swap(int64_t port_); - -void wire_in_progress_reverse_swaps(int64_t port_); - -void wire_open_channel_fee(int64_t port_, struct wire_OpenChannelFeeRequest *req); - -void wire_fetch_reverse_swap_fees(int64_t port_, struct wire_ReverseSwapFeesRequest *req); - -void wire_onchain_payment_limits(int64_t port_); - -void wire_prepare_onchain_payment(int64_t port_, struct wire_PrepareOnchainPaymentRequest *req); - -void wire_in_progress_onchain_payments(int64_t port_); - -void wire_recommended_fees(int64_t port_); - -void wire_execute_command(int64_t port_, struct wire_uint_8_list *command); - -void wire_generate_diagnostic_data(int64_t port_); - -bool *new_box_autoadd_bool_0(bool value); - -struct wire_BuyBitcoinRequest *new_box_autoadd_buy_bitcoin_request_0(void); - -struct wire_CheckMessageRequest *new_box_autoadd_check_message_request_0(void); - -struct wire_ConfigureNodeRequest *new_box_autoadd_configure_node_request_0(void); - -struct wire_ConnectRequest *new_box_autoadd_connect_request_0(void); - -struct wire_GreenlightCredentials *new_box_autoadd_greenlight_credentials_0(void); - -struct wire_GreenlightNodeConfig *new_box_autoadd_greenlight_node_config_0(void); - -int64_t *new_box_autoadd_i64_0(int64_t value); - -struct wire_ListPaymentsRequest *new_box_autoadd_list_payments_request_0(void); - -struct wire_LnUrlAuthRequestData *new_box_autoadd_ln_url_auth_request_data_0(void); - -struct wire_LnUrlPayRequest *new_box_autoadd_ln_url_pay_request_0(void); - -struct wire_LnUrlWithdrawRequest *new_box_autoadd_ln_url_withdraw_request_0(void); - -struct wire_NodeConfig *new_box_autoadd_node_config_0(void); - -struct wire_OpenChannelFeeRequest *new_box_autoadd_open_channel_fee_request_0(void); - -struct wire_OpeningFeeParams *new_box_autoadd_opening_fee_params_0(void); - -struct wire_PayOnchainRequest *new_box_autoadd_pay_onchain_request_0(void); - -struct wire_PrepareOnchainPaymentRequest *new_box_autoadd_prepare_onchain_payment_request_0(void); - -struct wire_PrepareRedeemOnchainFundsRequest *new_box_autoadd_prepare_redeem_onchain_funds_request_0(void); - -struct wire_PrepareRefundRequest *new_box_autoadd_prepare_refund_request_0(void); - -struct wire_ReceiveOnchainRequest *new_box_autoadd_receive_onchain_request_0(void); - -struct wire_ReceivePaymentRequest *new_box_autoadd_receive_payment_request_0(void); - -struct wire_RedeemOnchainFundsRequest *new_box_autoadd_redeem_onchain_funds_request_0(void); - -struct wire_RefundRequest *new_box_autoadd_refund_request_0(void); - -struct wire_ReportIssueRequest *new_box_autoadd_report_issue_request_0(void); - -struct wire_ReportPaymentFailureDetails *new_box_autoadd_report_payment_failure_details_0(void); - -struct wire_ReverseSwapFeesRequest *new_box_autoadd_reverse_swap_fees_request_0(void); - -struct wire_SendOnchainRequest *new_box_autoadd_send_onchain_request_0(void); - -struct wire_SendPaymentRequest *new_box_autoadd_send_payment_request_0(void); - -struct wire_SendSpontaneousPaymentRequest *new_box_autoadd_send_spontaneous_payment_request_0(void); - -struct wire_SignMessageRequest *new_box_autoadd_sign_message_request_0(void); - -struct wire_StaticBackupRequest *new_box_autoadd_static_backup_request_0(void); - -uint32_t *new_box_autoadd_u32_0(uint32_t value); - -uint64_t *new_box_autoadd_u64_0(uint64_t value); - -struct wire_list_metadata_filter *new_list_metadata_filter_0(int32_t len); - -struct wire_list_payment_type_filter *new_list_payment_type_filter_0(int32_t len); - -struct wire_list_tlv_entry *new_list_tlv_entry_0(int32_t len); - -struct wire_uint_8_list *new_uint_8_list_0(int32_t len); - -union NodeConfigKind *inflate_NodeConfig_Greenlight(void); - -union ReportIssueRequestKind *inflate_ReportIssueRequest_PaymentFailure(void); - -void free_WireSyncReturn(WireSyncReturn ptr); - -static int64_t dummy_method_to_enforce_bundling(void) { - int64_t dummy_var = 0; - dummy_var ^= ((int64_t) (void*) wire_connect); - dummy_var ^= ((int64_t) (void*) wire_is_initialized); - dummy_var ^= ((int64_t) (void*) wire_sync); - dummy_var ^= ((int64_t) (void*) wire_node_credentials); - dummy_var ^= ((int64_t) (void*) wire_node_info); - dummy_var ^= ((int64_t) (void*) wire_configure_node); - dummy_var ^= ((int64_t) (void*) wire_disconnect); - dummy_var ^= ((int64_t) (void*) wire_sign_message); - dummy_var ^= ((int64_t) (void*) wire_check_message); - dummy_var ^= ((int64_t) (void*) wire_mnemonic_to_seed); - dummy_var ^= ((int64_t) (void*) wire_default_config); - dummy_var ^= ((int64_t) (void*) wire_static_backup); - dummy_var ^= ((int64_t) (void*) wire_service_health_check); - dummy_var ^= ((int64_t) (void*) wire_breez_events_stream); - dummy_var ^= ((int64_t) (void*) wire_breez_log_stream); - dummy_var ^= ((int64_t) (void*) wire_list_lsps); - dummy_var ^= ((int64_t) (void*) wire_connect_lsp); - dummy_var ^= ((int64_t) (void*) wire_lsp_id); - dummy_var ^= ((int64_t) (void*) wire_fetch_lsp_info); - dummy_var ^= ((int64_t) (void*) wire_lsp_info); - dummy_var ^= ((int64_t) (void*) wire_close_lsp_channels); - dummy_var ^= ((int64_t) (void*) wire_register_webhook); - dummy_var ^= ((int64_t) (void*) wire_unregister_webhook); - dummy_var ^= ((int64_t) (void*) wire_backup); - dummy_var ^= ((int64_t) (void*) wire_backup_status); - dummy_var ^= ((int64_t) (void*) wire_parse_invoice); - dummy_var ^= ((int64_t) (void*) wire_parse_input); - dummy_var ^= ((int64_t) (void*) wire_list_payments); - dummy_var ^= ((int64_t) (void*) wire_payment_by_hash); - dummy_var ^= ((int64_t) (void*) wire_set_payment_metadata); - dummy_var ^= ((int64_t) (void*) wire_send_payment); - dummy_var ^= ((int64_t) (void*) wire_send_spontaneous_payment); - dummy_var ^= ((int64_t) (void*) wire_receive_payment); - dummy_var ^= ((int64_t) (void*) wire_lnurl_pay); - dummy_var ^= ((int64_t) (void*) wire_lnurl_withdraw); - dummy_var ^= ((int64_t) (void*) wire_lnurl_auth); - dummy_var ^= ((int64_t) (void*) wire_report_issue); - dummy_var ^= ((int64_t) (void*) wire_fetch_fiat_rates); - dummy_var ^= ((int64_t) (void*) wire_list_fiat_currencies); - dummy_var ^= ((int64_t) (void*) wire_max_reverse_swap_amount); - dummy_var ^= ((int64_t) (void*) wire_send_onchain); - dummy_var ^= ((int64_t) (void*) wire_pay_onchain); - dummy_var ^= ((int64_t) (void*) wire_receive_onchain); - dummy_var ^= ((int64_t) (void*) wire_buy_bitcoin); - dummy_var ^= ((int64_t) (void*) wire_redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) wire_prepare_redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) wire_list_refundables); - dummy_var ^= ((int64_t) (void*) wire_prepare_refund); - dummy_var ^= ((int64_t) (void*) wire_refund); - dummy_var ^= ((int64_t) (void*) wire_rescan_swaps); - dummy_var ^= ((int64_t) (void*) wire_redeem_swap); - dummy_var ^= ((int64_t) (void*) wire_in_progress_swap); - dummy_var ^= ((int64_t) (void*) wire_in_progress_reverse_swaps); - dummy_var ^= ((int64_t) (void*) wire_open_channel_fee); - dummy_var ^= ((int64_t) (void*) wire_fetch_reverse_swap_fees); - dummy_var ^= ((int64_t) (void*) wire_onchain_payment_limits); - dummy_var ^= ((int64_t) (void*) wire_prepare_onchain_payment); - dummy_var ^= ((int64_t) (void*) wire_in_progress_onchain_payments); - dummy_var ^= ((int64_t) (void*) wire_recommended_fees); - dummy_var ^= ((int64_t) (void*) wire_execute_command); - dummy_var ^= ((int64_t) (void*) wire_generate_diagnostic_data); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_bool_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_buy_bitcoin_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_check_message_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_configure_node_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_connect_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_greenlight_credentials_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_greenlight_node_config_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_i64_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_list_payments_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_ln_url_auth_request_data_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_ln_url_pay_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_ln_url_withdraw_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_node_config_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_open_channel_fee_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_opening_fee_params_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_pay_onchain_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_onchain_payment_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_redeem_onchain_funds_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_prepare_refund_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_receive_onchain_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_receive_payment_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_redeem_onchain_funds_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_refund_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_report_issue_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_report_payment_failure_details_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_reverse_swap_fees_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_send_onchain_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_send_payment_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_send_spontaneous_payment_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_sign_message_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_static_backup_request_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_u32_0); - dummy_var ^= ((int64_t) (void*) new_box_autoadd_u64_0); - dummy_var ^= ((int64_t) (void*) new_list_metadata_filter_0); - dummy_var ^= ((int64_t) (void*) new_list_payment_type_filter_0); - dummy_var ^= ((int64_t) (void*) new_list_tlv_entry_0); - dummy_var ^= ((int64_t) (void*) new_uint_8_list_0); - dummy_var ^= ((int64_t) (void*) inflate_NodeConfig_Greenlight); - dummy_var ^= ((int64_t) (void*) inflate_ReportIssueRequest_PaymentFailure); - dummy_var ^= ((int64_t) (void*) free_WireSyncReturn); - dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); - dummy_var ^= ((int64_t) (void*) get_dart_object); - dummy_var ^= ((int64_t) (void*) drop_dart_object); - dummy_var ^= ((int64_t) (void*) new_dart_opaque); - return dummy_var; -} 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..756a7f0a3 --- /dev/null +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -0,0 +1,1428 @@ +#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_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_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_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 *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; + +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; + 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_; + 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_ConnectError_Generic { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_Generic; + +typedef struct wire_cst_ConnectError_RestoreOnly { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_RestoreOnly; + +typedef struct wire_cst_ConnectError_ServiceConnectivity { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_ServiceConnectivity; + +typedef union ConnectErrorKind { + struct wire_cst_ConnectError_Generic Generic; + struct wire_cst_ConnectError_RestoreOnly RestoreOnly; + struct wire_cst_ConnectError_ServiceConnectivity ServiceConnectivity; +} ConnectErrorKind; + +typedef struct wire_cst_connect_error { + int32_t tag; + union ConnectErrorKind kind; +} wire_cst_connect_error; + +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__crate__binding__BindingBreezServices_backup(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin(int64_t port_, + uintptr_t that, + struct wire_cst_buy_bitcoin_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message(int64_t port_, + uintptr_t that, + struct wire_cst_check_message_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node(int64_t port_, + uintptr_t that, + struct wire_cst_configure_node_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *lsp_id); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *command); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *id); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees(int64_t port_, + uintptr_t that, + struct wire_cst_reverse_swap_fees_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments(int64_t port_, + uintptr_t that, + struct wire_cst_list_payments_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_auth_request_data *req_data); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_pay_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_withdraw_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee(int64_t port_, + uintptr_t that, + struct wire_cst_open_channel_fee_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_pay_onchain_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *hash); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_onchain_payment_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_redeem_onchain_funds_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_refund_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_receive_onchain_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment(int64_t port_, + uintptr_t that, + struct wire_cst_receive_payment_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds(int64_t port_, + uintptr_t that, + struct wire_cst_redeem_onchain_funds_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *swap_address); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund(int64_t port_, + uintptr_t that, + struct wire_cst_refund_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *webhook_url); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue(int64_t port_, + uintptr_t that, + struct wire_cst_report_issue_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_send_onchain_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment(int64_t port_, + uintptr_t that, + struct wire_cst_send_payment_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment(int64_t port_, + uintptr_t that, + struct wire_cst_send_spontaneous_payment_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata(int64_t port_, + uintptr_t that, + 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__BindingBreezServices_sign_message(int64_t port_, + uintptr_t that, + struct wire_cst_sign_message_request *req); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *webhook_url); + +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__crate__binding__breez_log_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); + +void frbgen_breez_sdk_wire__crate__binding__connect(int64_t port_, + struct wire_cst_connect_request *req); + +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__crate__binding__mnemonic_to_seed(int64_t port_, + struct wire_cst_list_prim_u_8_strict *phrase); + +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__crate__binding__parse_invoice(int64_t port_, + struct wire_cst_list_prim_u_8_strict *invoice); + +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__crate__binding__static_backup(int64_t port_, + struct wire_cst_static_backup_request *req); + +void frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices(const void *ptr); + +void frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices(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); + +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_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook); + 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__connect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__default_config); + 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__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__service_health_check); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__static_backup); + dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); + return dummy_var; +} diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index 9c2d441c5..c5440af70 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -1,16 +1,18 @@ 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(); + late BindingBreezServices breezServices; - BreezSDK(); + BreezSDK() { + verifyInitialized(); + } /* Streams */ @@ -24,6 +26,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 +53,7 @@ class BreezSDK { } void _initializeEventsStream() { - _breezEventsStream ??= _lnToolkit.breezEventsStream().asBroadcastStream(); + _breezEventsStream ??= binding.breezEventsStream().asBroadcastStream(); } void _initializeLogStream() { @@ -50,7 +62,7 @@ class BreezSDK { .receiveBroadcastStream() .map((log) => LogEntry(line: log["line"], level: log["level"])); } else { - _breezLogStream ??= _lnToolkit.breezLogStream().asBroadcastStream(); + _breezLogStream ??= binding.breezLogStream().asBroadcastStream(); } } @@ -66,59 +78,31 @@ class BreezSDK { /// Listen to node state Stream get nodeStateStream => nodeStateController.stream; - /// Register for webhook callbacks at the given `webhook_url` whenever a new payment is received. - /// - /// More webhook types may be supported in the future. - Future registerWebhook({required String webhookUrl}) async { - return _lnToolkit.registerWebhook(webhookUrl: webhookUrl); - } - - /// Unregister webhook callbacks for the given `webhook_url`. - Future unregisterWebhook({required String webhookUrl}) async { - return _lnToolkit.unregisterWebhook(webhookUrl: webhookUrl); - } - /// connect initializes the global NodeService, schedule the node to run in the cloud and /// run the signer. This must be called in order to start communicate with the node /// /// # Arguments /// /// * `req` - The connect request containing the `config` sdk configuration and `seed` node private key - Future connect({ + Future connect({ required ConnectRequest req, }) async { - await _lnToolkit.connect(req: req); + breezServices = await binding.connect(req: req); _subscribeToSdkStreams(); await fetchNodeData(); + return breezServices; } - /// Check whether node service is initialized or not - Future isInitialized() async => await _lnToolkit.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(); - /// get the node state from the persistent storage Future nodeInfo() async { - final nodeState = await _lnToolkit.nodeInfo(); + final nodeState = await breezServices.nodeInfo(); nodeStateController.add(nodeState); return nodeState; } - /// Configure an optional address to send funds to during a mutual channel close - Future configureNode({ - required ConfigureNodeRequest req, - }) async { - return await _lnToolkit.configureNode(req: req); - } - /// Cleanup node resources and stop the signer. Future disconnect() async { - await _lnToolkit.disconnect(); + await breezServices.disconnect(); _unsubscribeFromSdkStreams(); } @@ -127,7 +111,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({ @@ -135,77 +119,33 @@ class BreezSDK { required String apiKey, required NodeConfig nodeConfig, }) async { - return await _lnToolkit.defaultConfig( + return await binding.defaultConfig( envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, ); } - /// Sign given message with the private key of the node id. Returns a zbase - /// encoded signature. - Future signMessage({ - required SignMessageRequest req, - }) async { - return await _lnToolkit.signMessage(req: req); - } - - /// Check whether given message was signed by the private key or the given - /// pubkey and the signature (zbase encoded) is valid. - Future checkMessage({ - required CheckMessageRequest req, - }) async { - return await _lnToolkit.checkMessage(req: req); - } - - /* LSP API's */ - - /// List available lsps that can be selected by the user - Future> listLsps() async => await _lnToolkit.listLsps(); - - /// Select the lsp to be used and provide inbound liquidity - Future connectLSP(String lspId) async { - return await _lnToolkit.connectLsp(lspId: lspId); - } - - /// Get the current LSP's ID - Future lspId() async => await _lnToolkit.lspId(); - - /// Convenience method to look up LSP info based on current LSP ID - Future lspInfo() async => await _lnToolkit.lspInfo(); - - /// Convenience method to look up [LspInformation] for a given LSP ID - Future fetchLspInfo(String lspId) async => await _lnToolkit.fetchLspInfo(id: lspId); - - /// close all channels with the current lsp - Future closeLspChannels() async => await _lnToolkit.closeLspChannels(); - - /* Backup API's & Streams*/ + /* Backup Streams*/ // Listen to backup results final StreamController _backupStreamController = BehaviorSubject(); Stream get backupStream => _backupStreamController.stream; - /// Start the backup process - Future backup() async => await _lnToolkit.backup(); - - /// Returns the state of the backup process - Future backupStatus() async => await _lnToolkit.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*/ @@ -219,97 +159,22 @@ class BreezSDK { Future> listPayments({ required ListPaymentsRequest req, }) async { - final paymentsList = await _lnToolkit.listPayments(req: req); + final paymentsList = await breezServices.listPayments(req: req); paymentsController.add(paymentsList); return paymentsList; } - /// Fetch a specific payment by its hash. - Future paymentByHash({ - required String hash, - }) async { - return await _lnToolkit.paymentByHash(hash: hash); - } - - /// Set the external metadata of a payment as a valid JSON string - Future setPaymentMetadata({ - required String hash, - required String metadata, - }) async { - return await _lnToolkit.setPaymentMetadata(hash: hash, metadata: metadata); - } - - /* Lightning Payment API's */ - - /// pay a bolt11 invoice - Future sendPayment({ - required SendPaymentRequest req, - }) async { - return await _lnToolkit.sendPayment(req: req); - } - - /// pay directly to a node id using keysend - Future sendSpontaneousPayment({ - required SendSpontaneousPaymentRequest req, - }) async { - return await _lnToolkit.sendSpontaneousPayment(req: req); - } - - /// Creates an bolt11 payment request. - /// This also works when the node doesn't have any channels and need inbound liquidity. - /// In such case when the invoice is paid a new zero-conf channel will be open by the LSP, - /// providing inbound liquidity and the payment will be routed via this new channel. - Future receivePayment({ - required ReceivePaymentRequest req, - }) async { - return await _lnToolkit.receivePayment(req: req); - } - - /* LNURL API's */ - - /// Second step of LNURL-pay. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlPayRequestData` payload needed here. - Future lnurlPay({ - required LnUrlPayRequest req, - }) async { - return await _lnToolkit.lnurlPay(req: req); - } - - /// Second step of LNURL-withdraw. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlWithdrawRequestData` payload needed here. - /// - /// This call will validate the given amount in the `request` against the parameters - /// 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); - } - - /// Third and last step of LNURL-auth. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlAuthRequestData` payload needed here. The second step is user approval of auth action. - /// - /// This call will sign `k1` of the LNURL endpoint (`req_data`) on `secp256k1` using `linkingPrivKey` and DER-encodes the signature. - /// If they match the endpoint requirements, the LNURL auth request is made. A successful result here means the client signature is verified. - Future lnurlAuth({ - required LnUrlAuthRequestData reqData, - }) async { - return await _lnToolkit.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 breezServices.fetchFiatRates(); return rates.fold>({}, (map, rate) { map[rate.coin] = rate; return map; }); } - /// List all available fiat currencies - Future> listFiatCurrencies() async => await _lnToolkit.listFiatCurrencies(); - /* Swap Stream */ final StreamController _swapEventsStreamController = @@ -319,179 +184,20 @@ class BreezSDK { /* On-Chain Swap API's */ - /// Creates a reverse swap and attempts to pay the HODL invoice - @Deprecated( - 'Use payOnchain instead. ' - 'This method was deprecated after v0.3.2', - ) - Future sendOnchain({ - required SendOnchainRequest req, - }) async { - return await _lnToolkit.sendOnchain(req: req); - } - - Future onchainPaymentLimits() async { - return await _lnToolkit.onchainPaymentLimits(); - } - - /// Creates a reverse swap and attempts to pay the HODL invoice - Future payOnchain({ - required PayOnchainRequest req, - }) async { - return await _lnToolkit.payOnchain(req: req); - } - - /// Onchain receive swap API - Future receiveOnchain({ - required ReceiveOnchainRequest req, - }) async { - return await _lnToolkit.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); - } - /// 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 breezServices.redeemOnchainFunds(req: req); await listPayments(req: const ListPaymentsRequest()); return redeemOnchainFundsResponse; } - /// Returns the max amount that can be sent on-chain using the send_onchain method. - /// The returned amount is the sum of the max amount that can be sent on each channel - /// minus the expected fees. - /// 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(); - } - - /* Refundables API's */ - - /// list non-completed expired swaps that should be refunded by calling refund() - Future> listRefundables() async => await _lnToolkit.listRefundables(); - - /// Construct and broadcast a refund transaction for a failed/expired swap - Future refund({ - required RefundRequest req, - }) async { - return await _lnToolkit.refund(req: req); - } - - /// Prepares a refund transaction for a failed/expired swap. - /// - /// Can optionally be used before refund to know how much fees will be paid - /// to perform the refund. - Future prepareRefund({ - required PrepareRefundRequest req, - }) async { - return await _lnToolkit.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(); - - /* 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(); - - /// Redeems an individual swap. - /// - /// To be used only in the context of mobile notifications, where the notification triggers - /// an individual redeem. - /// - /// This is taken care of automatically in the context of typical SDK usage. - Future redeemSwap({ - required String swapAddress, - }) async { - return await _lnToolkit.redeemSwap(swapAddress: swapAddress); - } - - /// Returns the blocking [ReverseSwapInfo]s that are in progress - @Deprecated( - 'Use inProgressOnchainPayments instead. ' - 'This method was deprecated after v0.3.6', - ) - Future> inProgressReverseSwaps() async => _lnToolkit.inProgressReverseSwaps(); - - /* Swap Fee API's */ - - /// Gets the fees required to open a channel for a given amount. - Future openChannelFee({ - required OpenChannelFeeRequest req, - }) async { - return await _lnToolkit.openChannelFee(req: req); - } - - /// Lookup the most recent reverse swap pair info using the Boltz API - @Deprecated( - 'Use prepareOnchainPayment instead. ' - 'This method was deprecated after v0.3.2', - ) - Future fetchReverseSwapFees({ - required ReverseSwapFeesRequest req, - }) async { - return await _lnToolkit.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); - } - - /// Returns the blocking [ReverseSwapInfo]s that are in progress - Future> inProgressOnchainPayments() async => _lnToolkit.inProgressOnchainPayments(); - - /// Fetches the current recommended fees - Future recommendedFees() async => await _lnToolkit.recommendedFees(); - - Future prepareRedeemOnchainFunds({ - required PrepareRedeemOnchainFundsRequest req, - }) async => - _lnToolkit.prepareRedeemOnchainFunds(req: req); - - /* Support API's */ - - /// Send an issue report using the Support API. - /// - `ReportIssueRequest.paymentFailure` sends a payment failure report to the Support API - /// using the provided `paymentHash` to lookup the failed `Payment` and the current `NodeState`. - Future reportIssue({ - required ReportIssueRequest req, - }) async { - return await _lnToolkit.reportIssue(req: req); - } - /// Fetches the service health check from the support API. Future serviceHealthCheck({ required String apiKey, }) async { - return await _lnToolkit.serviceHealthCheck(apiKey: apiKey); - } - - /* CLI API's */ - - /// Execute a command directly on the NodeAPI interface. - /// Mainly used to debugging. - Future executeCommand({required String command}) async { - return await _lnToolkit.executeCommand(command: command); - } - - /// Generate diagnostic data. - /// Mainly used to debugging. - Future generateDiagnosticData() async { - return await _lnToolkit.generateDiagnosticData(); + return await binding.serviceHealthCheck(apiKey: apiKey); } /* Helper Methods */ @@ -501,7 +207,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; @@ -580,7 +286,7 @@ extension SDKConfig on Config { String? defaultLspId, String? apiKey, double? maxfeePercent, - int? exemptfeeMsat, + BigInt? exemptfeeMsat, NodeConfig? nodeConfig, }) { return Config( diff --git a/libs/sdk-flutter/lib/bridge_generated.dart b/libs/sdk-flutter/lib/bridge_generated.dart deleted file mode 100644 index 320de4faf..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.dart +++ /dev/null @@ -1,6902 +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::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; -} - -/// 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, - }); -} - -@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, - }); -} - -/// 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, - }); -} - -@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; - 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; - - const BuyBitcoinRequest({ - required this.provider, - this.openingFeeParams, - }); -} - -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, - }); -} - -/// 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, - }); -} - -/// Indicates the different kinds of supported environments for [crate::BreezServices]. -enum EnvironmentType { - Production, - Staging, -} - -/// Wrapper around the [CurrencyInfo] of a fiat currency -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 deviceKey; - final Uint8List deviceCert; - - const GreenlightCredentials({ - required this.deviceKey, - required this.deviceCert, - }); -} - -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 { - /// # 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; -} - -/// 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, - }); -} - -/// 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, - }); -} - -/// 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, - }); -} - -/// 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, - }); -} - -@freezed -sealed class LnUrlCallbackStatus with _$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; -} - -/// Wrapped in a [LnUrlError], this represents a LNURL-endpoint error. -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, - }); -} - -/// 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, - }); -} - -/// 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, - }); -} - -@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 { - /// 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, - }); -} - -/// 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, - }); -} - -@freezed -sealed class LnUrlWithdrawResult with _$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, - }); -} - -/// 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, - }); -} - -/// Localized name of a currency -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, - }); -} - -/// The different supported bitcoin networks -enum Network { - /// Mainnet - 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 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, - }); -} - -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, - }); -} - -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, - }); -} - -/// Denominator in an exchange rate -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, -} - -/// A route hint for a LN payment -class RouteHint { - final List hops; - - const RouteHint({ - required this.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, - }); -} - -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; - - /// 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, - }); -} - -/// 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 { - /// 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; -} - -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, - }); -} - -/// 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, -} - -/// 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, - }); -} - -/// 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 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); - } - - 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_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_opt_list_localized_name(arr[5]), - localeOverrides: _wire2api_opt_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( - deviceKey: _wire2api_uint_8_list(arr[0]), - deviceCert: _wire2api_uint_8_list(arr[1]), - ); - } - - 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_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_credentials(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeState _wire2api_node_state(dynamic raw) { - final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 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]), - inboundLiquidityMsats: _wire2api_u64(arr[11]), - ); - } - - OnchainPaymentLimitsResponse _wire2api_onchain_payment_limits_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OnchainPaymentLimitsResponse( - minSat: _wire2api_u64(arr[0]), - maxSat: _wire2api_u64(arr[1]), - ); - } - - 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); - } - - List? _wire2api_opt_list_locale_overrides(dynamic raw) { - return raw == null ? null : _wire2api_list_locale_overrides(raw); - } - - List? _wire2api_opt_list_localized_name(dynamic raw) { - return raw == null ? null : _wire2api_list_localized_name(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_u64(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); - } - - 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.device_key = api2wire_uint_8_list(apiObj.deviceKey); - wireObj.device_cert = api2wire_uint_8_list(apiObj.deviceCert); - } - - 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.comment = api2wire_opt_String(apiObj.comment); - wireObj.payment_label = api2wire_opt_String(apiObj.paymentLabel); - } - - 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.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_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 device_key; - - external ffi.Pointer device_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; - - 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; - - external ffi.Pointer comment; - - external ffi.Pointer payment_label; -} - -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; -} - -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; 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 8cba071cd..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.freezed.dart +++ /dev/null @@ -1,5925 +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(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 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(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 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(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 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(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 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(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 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(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 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(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 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(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 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(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 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_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(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 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(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 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(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 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_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(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 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 { - 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 implements NodeCredentials_Greenlight { - const _$NodeCredentials_GreenlightImpl({required this.credentials}); - - @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 implements NodeCredentials { - const factory NodeCredentials_Greenlight({required final GreenlightCredentials credentials}) = - _$NodeCredentials_GreenlightImpl; - - @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 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/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/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart new file mode 100644 index 000000000..92a547bc9 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -0,0 +1,303 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'breez_services.dart'; +import 'chain.dart'; +import 'error.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.crateBindingConnect(req: req, hint: hint); + +Future parseInvoice({required String invoice, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice, hint: hint); + +Future parseInput({required String input, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingParseInput(input: input, hint: hint); + +/// See [breez_services::mnemonic_to_seed] +Future mnemonicToSeed({required String phrase, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingMnemonicToSeed(phrase: phrase, hint: hint); + +/// See [BreezServices::default_config] +Future defaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingDefaultConfig(envType: envType, apiKey: apiKey, nodeConfig: nodeConfig, hint: hint); + +/// See [BreezServices::static_backup] +Future staticBackup({required StaticBackupRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingStaticBackup(req: req, hint: hint); + +/// See [BreezServices::service_health_check] +Future serviceHealthCheck({required String apiKey, dynamic 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.crateBindingBreezEventsStream(hint: hint); + +/// If used, this must be called before `connect`. It can only be called once. +Stream breezLogStream({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBreezLogStream(hint: hint); + +// Rust type: RustOpaqueNom> +@sealed +class BindingBreezServices extends RustOpaque { + BindingBreezServices.dcoDecode(List wire) : super.dcoDecode(wire, _kStaticData); + + BindingBreezServices.sseDecode(BigInt ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + BreezSdkBindings.instance.api.rust_arc_increment_strong_count_BindingBreezServices, + rustArcDecrementStrongCount: + BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_BindingBreezServices, + rustArcDecrementStrongCountPtr: + BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_BindingBreezServicesPtr, + ); + + /// See [BreezServices::backup] + Future backup({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesBackup(that: this, hint: hint); + + /// See [BreezServices::backup_status] + Future backupStatus({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesBackupStatus(that: this, hint: hint); + + /// See [BreezServices::buy_bitcoin] + Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesBuyBitcoin(that: this, req: req, hint: hint); + + /// See [BreezServices::check_message] + Future checkMessage({required CheckMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesCheckMessage(that: this, req: req, hint: hint); + + /// See [BreezServices::close_lsp_channels] + Future closeLspChannels({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesCloseLspChannels(that: this, hint: hint); + + /// See [BreezServices::configure_node] + Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesConfigureNode(that: this, req: req, hint: hint); + + /// See [BreezServices::connect_lsp] + Future connectLsp({required String lspId, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesConnectLsp(that: this, lspId: lspId, hint: hint); + + /// Cleanup node resources and stop the signer. + Future disconnect({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesDisconnect(that: this, hint: hint); + + /// See [BreezServices::execute_dev_command] + Future executeCommand({required String command, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesExecuteCommand(that: this, command: command, hint: hint); + + /// See [BreezServices::fetch_fiat_rates] + Future> fetchFiatRates({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesFetchFiatRates(that: this, hint: hint); + + /// See [BreezServices::fetch_lsp_info] + Future fetchLspInfo({required String id, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesFetchLspInfo(that: this, id: id, hint: hint); + + /// See [BreezServices::fetch_reverse_swap_fees] + Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesFetchReverseSwapFees(that: this, req: req, hint: hint); + + /// See [BreezServices::generate_diagnostic_data] + Future generateDiagnosticData({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesGenerateDiagnosticData(that: this, hint: hint); + + /// See [BreezServices::in_progress_onchain_payments] + Future> inProgressOnchainPayments({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesInProgressOnchainPayments(that: this, hint: hint); + + /// See [BreezServices::in_progress_reverse_swaps] + Future> inProgressReverseSwaps({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesInProgressReverseSwaps(that: this, hint: hint); + + /// See [BreezServices::in_progress_swap] + Future inProgressSwap({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesInProgressSwap(that: this, hint: hint); + + /// See [BreezServices::list_fiat_currencies] + Future> listFiatCurrencies({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesListFiatCurrencies(that: this, hint: hint); + + /// See [BreezServices::list_lsps] + Future> listLsps({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesListLsps(that: this, hint: hint); + + /// See [BreezServices::list_payments] + Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesListPayments(that: this, req: req, hint: hint); + + /// See [BreezServices::list_refundables] + Future> listRefundables({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesListRefundables(that: this, hint: hint); + + /// See [BreezServices::lnurl_auth] + Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlAuth(that: this, reqData: reqData, hint: hint); + + /// See [BreezServices::lnurl_pay] + Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlPay(that: this, req: req, hint: hint); + + /// See [BreezServices::lnurl_withdraw] + Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlWithdraw(that: this, req: req, hint: hint); + + /// See [BreezServices::lsp_id] + Future lspId({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesLspId(that: this, hint: hint); + + /// See [BreezServices::lsp_info] + Future lspInfo({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesLspInfo(that: this, hint: hint); + + /// See [BreezServices::max_reverse_swap_amount] + Future maxReverseSwapAmount({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesMaxReverseSwapAmount(that: this, hint: hint); + + /// See [BreezServices::node_credentials] + Future nodeCredentials({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesNodeCredentials(that: this, hint: hint); + + /// See [BreezServices::node_info] + Future nodeInfo({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesNodeInfo(that: this, hint: hint); + + /// See [BreezServices::onchain_payment_limits] + Future onchainPaymentLimits({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesOnchainPaymentLimits(that: this, hint: hint); + + /// See [BreezServices::open_channel_fee] + Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesOpenChannelFee(that: this, req: req, hint: hint); + + /// See [BreezServices::pay_onchain] + Future payOnchain({required PayOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPayOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::list_payments] + Future paymentByHash({required String hash, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPaymentByHash(that: this, hash: hash, hint: hint); + + /// See [BreezServices::prepare_onchain_payment] + Future prepareOnchainPayment( + {required PrepareOnchainPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareOnchainPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::prepare_redeem_onchain_funds] + Future prepareRedeemOnchainFunds( + {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareRedeemOnchainFunds(that: this, req: req, hint: hint); + + /// See [BreezServices::prepare_refund] + Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareRefund(that: this, req: req, hint: hint); + + /// See [BreezServices::receive_onchain] + Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReceiveOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::receive_payment] + Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReceivePayment(that: this, req: req, hint: hint); + + /// See [BreezServices::recommended_fees] + Future recommendedFees({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRecommendedFees(that: this, hint: hint); + + /// See [BreezServices::redeem_onchain_funds] + Future redeemOnchainFunds( + {required RedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRedeemOnchainFunds(that: this, req: req, hint: hint); + + /// See [BreezServices::redeem_swap] + Future redeemSwap({required String swapAddress, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRedeemSwap(that: this, swapAddress: swapAddress, hint: hint); + + /// See [BreezServices::refund] + Future refund({required RefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRefund(that: this, req: req, hint: hint); + + Future registerWebhook({required String webhookUrl, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRegisterWebhook(that: this, webhookUrl: webhookUrl, hint: hint); + + /// See [BreezServices::report_issue] + Future reportIssue({required ReportIssueRequest req, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReportIssue(that: this, req: req, hint: hint); + + /// See [BreezServices::rescan_swaps] + Future rescanSwaps({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRescanSwaps(that: this, hint: hint); + + /// See [BreezServices::send_onchain] + Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::send_payment] + Future sendPayment({required SendPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::send_spontaneous_payment] + Future sendSpontaneousPayment( + {required SendSpontaneousPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendSpontaneousPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::set_payment_metadata] + Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesSetPaymentMetadata( + that: this, hash: hash, metadata: metadata, hint: hint); + + /// See [BreezServices::sign_message] + Future signMessage({required SignMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSignMessage(that: this, req: req, hint: hint); + + /// See [BreezServices::sync] + Future sync({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesSync(that: this, hint: hint); + + Future unregisterWebhook({required String webhookUrl, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesUnregisterWebhook(that: this, webhookUrl: webhookUrl, 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..9c9af8a7f --- /dev/null +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -0,0 +1,208 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// 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; + 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 ^ label.hashCode; + + @override + bool operator ==(Object other) => + identical(this, other) || + other is PaymentFailedData && + runtimeType == other.runtimeType && + error == other.error && + nodeId == other.nodeId && + invoice == other.invoice && + label == other.label; +} + +/// 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..9bac18922 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart @@ -0,0 +1,1608 @@ +// 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..45a52924e --- /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.36. + +// 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 BigInt fastestFee; + final BigInt halfHourFee; + final BigInt hourFee; + final BigInt economyFee; + final BigInt 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/error.dart b/libs/sdk-flutter/lib/generated/error.dart new file mode 100644 index 000000000..650dc8b7e --- /dev/null +++ b/libs/sdk-flutter/lib/generated/error.dart @@ -0,0 +1,31 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// 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'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'error.freezed.dart'; + +@freezed +sealed class ConnectError with _$ConnectError implements FrbException { + const ConnectError._(); + + /// This error is raised when a general error occurs not specific to other error variants + /// in this enum. + const factory ConnectError.generic({ + required String err, + }) = ConnectError_Generic; + + /// This error is raised when [crate::models::ConnectRequest::restore_only] is set to true + /// and no node exists for [crate::models::ConnectRequest::seed]. + const factory ConnectError.restoreOnly({ + required String err, + }) = ConnectError_RestoreOnly; + + /// This error is raised when a connection to an external service fails. + const factory ConnectError.serviceConnectivity({ + required String err, + }) = ConnectError_ServiceConnectivity; +} diff --git a/libs/sdk-flutter/lib/generated/error.freezed.dart b/libs/sdk-flutter/lib/generated/error.freezed.dart new file mode 100644 index 000000000..01e158595 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/error.freezed.dart @@ -0,0 +1,529 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'error.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$ConnectError { + String get err => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $ConnectErrorCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ConnectErrorCopyWith<$Res> { + factory $ConnectErrorCopyWith(ConnectError value, $Res Function(ConnectError) then) = + _$ConnectErrorCopyWithImpl<$Res, ConnectError>; + @useResult + $Res call({String err}); +} + +/// @nodoc +class _$ConnectErrorCopyWithImpl<$Res, $Val extends ConnectError> implements $ConnectErrorCopyWith<$Res> { + _$ConnectErrorCopyWithImpl(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? err = null, + }) { + return _then(_value.copyWith( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ConnectError_GenericImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_GenericImplCopyWith( + _$ConnectError_GenericImpl value, $Res Function(_$ConnectError_GenericImpl) then) = + __$$ConnectError_GenericImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_GenericImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_GenericImpl> + implements _$$ConnectError_GenericImplCopyWith<$Res> { + __$$ConnectError_GenericImplCopyWithImpl( + _$ConnectError_GenericImpl _value, $Res Function(_$ConnectError_GenericImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_GenericImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_GenericImpl extends ConnectError_Generic { + const _$ConnectError_GenericImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.generic(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_GenericImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_GenericImplCopyWith<_$ConnectError_GenericImpl> get copyWith => + __$$ConnectError_GenericImplCopyWithImpl<_$ConnectError_GenericImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return generic(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return generic?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (generic != null) { + return generic(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return generic(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return generic?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (generic != null) { + return generic(this); + } + return orElse(); + } +} + +abstract class ConnectError_Generic extends ConnectError { + const factory ConnectError_Generic({required final String err}) = _$ConnectError_GenericImpl; + const ConnectError_Generic._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_GenericImplCopyWith<_$ConnectError_GenericImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConnectError_RestoreOnlyImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_RestoreOnlyImplCopyWith( + _$ConnectError_RestoreOnlyImpl value, $Res Function(_$ConnectError_RestoreOnlyImpl) then) = + __$$ConnectError_RestoreOnlyImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_RestoreOnlyImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_RestoreOnlyImpl> + implements _$$ConnectError_RestoreOnlyImplCopyWith<$Res> { + __$$ConnectError_RestoreOnlyImplCopyWithImpl( + _$ConnectError_RestoreOnlyImpl _value, $Res Function(_$ConnectError_RestoreOnlyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_RestoreOnlyImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_RestoreOnlyImpl extends ConnectError_RestoreOnly { + const _$ConnectError_RestoreOnlyImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.restoreOnly(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_RestoreOnlyImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_RestoreOnlyImplCopyWith<_$ConnectError_RestoreOnlyImpl> get copyWith => + __$$ConnectError_RestoreOnlyImplCopyWithImpl<_$ConnectError_RestoreOnlyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return restoreOnly(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return restoreOnly?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (restoreOnly != null) { + return restoreOnly(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return restoreOnly(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return restoreOnly?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (restoreOnly != null) { + return restoreOnly(this); + } + return orElse(); + } +} + +abstract class ConnectError_RestoreOnly extends ConnectError { + const factory ConnectError_RestoreOnly({required final String err}) = _$ConnectError_RestoreOnlyImpl; + const ConnectError_RestoreOnly._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_RestoreOnlyImplCopyWith<_$ConnectError_RestoreOnlyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConnectError_ServiceConnectivityImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_ServiceConnectivityImplCopyWith(_$ConnectError_ServiceConnectivityImpl value, + $Res Function(_$ConnectError_ServiceConnectivityImpl) then) = + __$$ConnectError_ServiceConnectivityImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_ServiceConnectivityImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_ServiceConnectivityImpl> + implements _$$ConnectError_ServiceConnectivityImplCopyWith<$Res> { + __$$ConnectError_ServiceConnectivityImplCopyWithImpl(_$ConnectError_ServiceConnectivityImpl _value, + $Res Function(_$ConnectError_ServiceConnectivityImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_ServiceConnectivityImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_ServiceConnectivityImpl extends ConnectError_ServiceConnectivity { + const _$ConnectError_ServiceConnectivityImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.serviceConnectivity(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_ServiceConnectivityImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_ServiceConnectivityImplCopyWith<_$ConnectError_ServiceConnectivityImpl> get copyWith => + __$$ConnectError_ServiceConnectivityImplCopyWithImpl<_$ConnectError_ServiceConnectivityImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return serviceConnectivity(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return serviceConnectivity?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (serviceConnectivity != null) { + return serviceConnectivity(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return serviceConnectivity(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return serviceConnectivity?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (serviceConnectivity != null) { + return serviceConnectivity(this); + } + return orElse(); + } +} + +abstract class ConnectError_ServiceConnectivity extends ConnectError { + const factory ConnectError_ServiceConnectivity({required final String err}) = + _$ConnectError_ServiceConnectivityImpl; + const ConnectError_ServiceConnectivity._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_ServiceConnectivityImplCopyWith<_$ConnectError_ServiceConnectivityImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/fiat.dart b/libs/sdk-flutter/lib/generated/fiat.dart new file mode 100644 index 000000000..5e37f8d22 --- /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.36. + +// 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..2a17c3c2f --- /dev/null +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -0,0 +1,8048 @@ +// This file is automatically generated, so please do not edit it. +// 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 + +import 'binding.dart'; +import 'breez_services.dart'; +import 'chain.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'error.dart'; +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.36'; + + @override + int get rustContentHash => -1104475804; + + static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( + stem: 'breez_sdk_core', + ioDirectory: '../sdk-core/target/release/', + webPrefix: 'pkg/', + ); +} + +abstract class BreezSdkBindingsApi extends BaseApi { + Future crateBindingBindingBreezServicesBackup({required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesBackupStatus( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesBuyBitcoin( + {required BindingBreezServices that, required BuyBitcoinRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesCheckMessage( + {required BindingBreezServices that, required CheckMessageRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesCloseLspChannels( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesConfigureNode( + {required BindingBreezServices that, required ConfigureNodeRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesConnectLsp( + {required BindingBreezServices that, required String lspId, dynamic hint}); + + Future crateBindingBindingBreezServicesDisconnect({required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesExecuteCommand( + {required BindingBreezServices that, required String command, dynamic hint}); + + Future> crateBindingBindingBreezServicesFetchFiatRates( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesFetchLspInfo( + {required BindingBreezServices that, required String id, dynamic hint}); + + Future crateBindingBindingBreezServicesFetchReverseSwapFees( + {required BindingBreezServices that, required ReverseSwapFeesRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesGenerateDiagnosticData( + {required BindingBreezServices that, dynamic hint}); + + Future> crateBindingBindingBreezServicesInProgressOnchainPayments( + {required BindingBreezServices that, dynamic hint}); + + Future> crateBindingBindingBreezServicesInProgressReverseSwaps( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesInProgressSwap( + {required BindingBreezServices that, dynamic hint}); + + Future> crateBindingBindingBreezServicesListFiatCurrencies( + {required BindingBreezServices that, dynamic hint}); + + Future> crateBindingBindingBreezServicesListLsps( + {required BindingBreezServices that, dynamic hint}); + + Future> crateBindingBindingBreezServicesListPayments( + {required BindingBreezServices that, required ListPaymentsRequest req, dynamic hint}); + + Future> crateBindingBindingBreezServicesListRefundables( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesLnurlAuth( + {required BindingBreezServices that, required LnUrlAuthRequestData reqData, dynamic hint}); + + Future crateBindingBindingBreezServicesLnurlPay( + {required BindingBreezServices that, required LnUrlPayRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesLnurlWithdraw( + {required BindingBreezServices that, required LnUrlWithdrawRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesLspId({required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesLspInfo( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesMaxReverseSwapAmount( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesNodeCredentials( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesNodeInfo( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesOnchainPaymentLimits( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesOpenChannelFee( + {required BindingBreezServices that, required OpenChannelFeeRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesPayOnchain( + {required BindingBreezServices that, required PayOnchainRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesPaymentByHash( + {required BindingBreezServices that, required String hash, dynamic hint}); + + Future crateBindingBindingBreezServicesPrepareOnchainPayment( + {required BindingBreezServices that, required PrepareOnchainPaymentRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesPrepareRedeemOnchainFunds( + {required BindingBreezServices that, required PrepareRedeemOnchainFundsRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesPrepareRefund( + {required BindingBreezServices that, required PrepareRefundRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesReceiveOnchain( + {required BindingBreezServices that, required ReceiveOnchainRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesReceivePayment( + {required BindingBreezServices that, required ReceivePaymentRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesRecommendedFees( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesRedeemOnchainFunds( + {required BindingBreezServices that, required RedeemOnchainFundsRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesRedeemSwap( + {required BindingBreezServices that, required String swapAddress, dynamic hint}); + + Future crateBindingBindingBreezServicesRefund( + {required BindingBreezServices that, required RefundRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesRegisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}); + + Future crateBindingBindingBreezServicesReportIssue( + {required BindingBreezServices that, required ReportIssueRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesRescanSwaps( + {required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesSendOnchain( + {required BindingBreezServices that, required SendOnchainRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesSendPayment( + {required BindingBreezServices that, required SendPaymentRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesSendSpontaneousPayment( + {required BindingBreezServices that, required SendSpontaneousPaymentRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesSetPaymentMetadata( + {required BindingBreezServices that, required String hash, required String metadata, dynamic hint}); + + Future crateBindingBindingBreezServicesSignMessage( + {required BindingBreezServices that, required SignMessageRequest req, dynamic hint}); + + Future crateBindingBindingBreezServicesSync({required BindingBreezServices that, dynamic hint}); + + Future crateBindingBindingBreezServicesUnregisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}); + + Stream crateBindingBreezEventsStream({dynamic hint}); + + Stream crateBindingBreezLogStream({dynamic hint}); + + Future crateBindingConnect({required ConnectRequest req, dynamic hint}); + + Future crateBindingDefaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}); + + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}); + + Future crateBindingParseInput({required String input, dynamic hint}); + + Future crateBindingParseInvoice({required String invoice, dynamic hint}); + + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}); + + Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}); + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_BindingBreezServices; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_BindingBreezServices; + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_BindingBreezServicesPtr; +} + +class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { + BreezSdkBindingsApiImpl({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + @override + Future crateBindingBindingBreezServicesBackup({required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_backup(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesBackupConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesBackupConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_backup", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesBackupStatus( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_backup_status(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_backup_status, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesBackupStatusConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesBackupStatusConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_backup_status", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesBuyBitcoin( + {required BindingBreezServices that, required BuyBitcoinRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_buy_bitcoin_request(req); + return wire.wire__crate__binding__BindingBreezServices_buy_bitcoin(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_buy_bitcoin_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesBuyBitcoinConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesBuyBitcoinConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_buy_bitcoin", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesCheckMessage( + {required BindingBreezServices that, required CheckMessageRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_check_message_request(req); + return wire.wire__crate__binding__BindingBreezServices_check_message(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_check_message_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesCheckMessageConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesCheckMessageConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_check_message", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesCloseLspChannels( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_close_lsp_channels(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesCloseLspChannelsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesCloseLspChannelsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_close_lsp_channels", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesConfigureNode( + {required BindingBreezServices that, required ConfigureNodeRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_configure_node_request(req); + return wire.wire__crate__binding__BindingBreezServices_configure_node(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesConfigureNodeConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesConfigureNodeConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_configure_node", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesConnectLsp( + {required BindingBreezServices that, required String lspId, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(lspId); + return wire.wire__crate__binding__BindingBreezServices_connect_lsp(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesConnectLspConstMeta, + argValues: [that, lspId], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesConnectLspConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_connect_lsp", + argNames: ["that", "lspId"], + ); + + @override + Future crateBindingBindingBreezServicesDisconnect( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_disconnect(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesDisconnectConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesDisconnectConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_disconnect", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesExecuteCommand( + {required BindingBreezServices that, required String command, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(command); + return wire.wire__crate__binding__BindingBreezServices_execute_command(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesExecuteCommandConstMeta, + argValues: [that, command], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesExecuteCommandConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_execute_command", + argNames: ["that", "command"], + ); + + @override + Future> crateBindingBindingBreezServicesFetchFiatRates( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_fetch_fiat_rates(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_rate, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesFetchFiatRatesConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesFetchFiatRatesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_fiat_rates", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesFetchLspInfo( + {required BindingBreezServices that, required String id, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(id); + return wire.wire__crate__binding__BindingBreezServices_fetch_lsp_info(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesFetchLspInfoConstMeta, + argValues: [that, id], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesFetchLspInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_lsp_info", + argNames: ["that", "id"], + ); + + @override + Future crateBindingBindingBreezServicesFetchReverseSwapFees( + {required BindingBreezServices that, required ReverseSwapFeesRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_reverse_swap_fees_request(req); + return wire.wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_reverse_swap_pair_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesFetchReverseSwapFeesConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesFetchReverseSwapFeesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_reverse_swap_fees", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesGenerateDiagnosticData( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_generate_diagnostic_data(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesGenerateDiagnosticDataConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesGenerateDiagnosticDataConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_generate_diagnostic_data", + argNames: ["that"], + ); + + @override + Future> crateBindingBindingBreezServicesInProgressOnchainPayments( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_onchain_payments(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesInProgressOnchainPaymentsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressOnchainPaymentsConstMeta => + const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_onchain_payments", + argNames: ["that"], + ); + + @override + Future> crateBindingBindingBreezServicesInProgressReverseSwaps( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesInProgressReverseSwapsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressReverseSwapsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_reverse_swaps", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesInProgressSwap( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_swap(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesInProgressSwapConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressSwapConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_swap", + argNames: ["that"], + ); + + @override + Future> crateBindingBindingBreezServicesListFiatCurrencies( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_fiat_currencies(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_fiat_currency, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesListFiatCurrenciesConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesListFiatCurrenciesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_fiat_currencies", + argNames: ["that"], + ); + + @override + Future> crateBindingBindingBreezServicesListLsps( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_lsps(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesListLspsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesListLspsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_lsps", + argNames: ["that"], + ); + + @override + Future> crateBindingBindingBreezServicesListPayments( + {required BindingBreezServices that, required ListPaymentsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_list_payments_request(req); + return wire.wire__crate__binding__BindingBreezServices_list_payments(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_payment, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesListPaymentsConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesListPaymentsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_payments", + argNames: ["that", "req"], + ); + + @override + Future> crateBindingBindingBreezServicesListRefundables( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_refundables(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_list_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesListRefundablesConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesListRefundablesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_refundables", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesLnurlAuth( + {required BindingBreezServices that, required LnUrlAuthRequestData reqData, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); + return wire.wire__crate__binding__BindingBreezServices_lnurl_auth(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_callback_status, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesLnurlAuthConstMeta, + argValues: [that, reqData], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlAuthConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_auth", + argNames: ["that", "reqData"], + ); + + @override + Future crateBindingBindingBreezServicesLnurlPay( + {required BindingBreezServices that, required LnUrlPayRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_pay_request(req); + return wire.wire__crate__binding__BindingBreezServices_lnurl_pay(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_pay_result, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesLnurlPayConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlPayConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_pay", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesLnurlWithdraw( + {required BindingBreezServices that, required LnUrlWithdrawRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_withdraw_request(req); + return wire.wire__crate__binding__BindingBreezServices_lnurl_withdraw(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_url_withdraw_result, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesLnurlWithdrawConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlWithdrawConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_withdraw", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesLspId({required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_lsp_id(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_String, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesLspIdConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesLspIdConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lsp_id", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesLspInfo( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_lsp_info(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_lsp_information, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesLspInfoConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesLspInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lsp_info", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesMaxReverseSwapAmount( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_max_reverse_swap_amount(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_max_reverse_swap_amount_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesMaxReverseSwapAmountConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesMaxReverseSwapAmountConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_max_reverse_swap_amount", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesNodeCredentials( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_node_credentials(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_node_credentials, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesNodeCredentialsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesNodeCredentialsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_node_credentials", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesNodeInfo( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_node_info(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_node_state, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesNodeInfoConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesNodeInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_node_info", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesOnchainPaymentLimits( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_onchain_payment_limits(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_onchain_payment_limits_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesOnchainPaymentLimitsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesOnchainPaymentLimitsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_onchain_payment_limits", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesOpenChannelFee( + {required BindingBreezServices that, required OpenChannelFeeRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_open_channel_fee_request(req); + return wire.wire__crate__binding__BindingBreezServices_open_channel_fee(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_open_channel_fee_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesOpenChannelFeeConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesOpenChannelFeeConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_open_channel_fee", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesPayOnchain( + {required BindingBreezServices that, required PayOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_pay_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_pay_onchain(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_pay_onchain_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesPayOnchainConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesPayOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_pay_onchain", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesPaymentByHash( + {required BindingBreezServices that, required String hash, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(hash); + return wire.wire__crate__binding__BindingBreezServices_payment_by_hash(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_opt_box_autoadd_payment, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesPaymentByHashConstMeta, + argValues: [that, hash], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesPaymentByHashConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_payment_by_hash", + argNames: ["that", "hash"], + ); + + @override + Future crateBindingBindingBreezServicesPrepareOnchainPayment( + {required BindingBreezServices that, required PrepareOnchainPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_onchain_payment(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_onchain_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesPrepareOnchainPaymentConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareOnchainPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_prepare_onchain_payment", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesPrepareRedeemOnchainFunds( + {required BindingBreezServices that, required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( + port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_redeem_onchain_funds_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesPrepareRedeemOnchainFundsConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareRedeemOnchainFundsConstMeta => + const TaskConstMeta( + debugName: "BindingBreezServices_prepare_redeem_onchain_funds", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesPrepareRefund( + {required BindingBreezServices that, required PrepareRefundRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_refund_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_refund(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_prepare_refund_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesPrepareRefundConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareRefundConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_prepare_refund", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesReceiveOnchain( + {required BindingBreezServices that, required ReceiveOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_receive_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_receive_onchain(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_swap_info, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesReceiveOnchainConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesReceiveOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_receive_onchain", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesReceivePayment( + {required BindingBreezServices that, required ReceivePaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_receive_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_receive_payment(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_receive_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesReceivePaymentConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesReceivePaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_receive_payment", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesRecommendedFees( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_recommended_fees(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_recommended_fees, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRecommendedFeesConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRecommendedFeesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_recommended_fees", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesRedeemOnchainFunds( + {required BindingBreezServices that, required RedeemOnchainFundsRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); + return wire.wire__crate__binding__BindingBreezServices_redeem_onchain_funds(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_redeem_onchain_funds_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRedeemOnchainFundsConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRedeemOnchainFundsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_redeem_onchain_funds", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesRedeemSwap( + {required BindingBreezServices that, required String swapAddress, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(swapAddress); + return wire.wire__crate__binding__BindingBreezServices_redeem_swap(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRedeemSwapConstMeta, + argValues: [that, swapAddress], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRedeemSwapConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_redeem_swap", + argNames: ["that", "swapAddress"], + ); + + @override + Future crateBindingBindingBreezServicesRefund( + {required BindingBreezServices that, required RefundRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_refund_request(req); + return wire.wire__crate__binding__BindingBreezServices_refund(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_refund_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRefundConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRefundConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_refund", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesRegisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(webhookUrl); + return wire.wire__crate__binding__BindingBreezServices_register_webhook(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRegisterWebhookConstMeta, + argValues: [that, webhookUrl], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRegisterWebhookConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_register_webhook", + argNames: ["that", "webhookUrl"], + ); + + @override + Future crateBindingBindingBreezServicesReportIssue( + {required BindingBreezServices that, required ReportIssueRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_report_issue_request(req); + return wire.wire__crate__binding__BindingBreezServices_report_issue(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesReportIssueConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesReportIssueConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_report_issue", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesRescanSwaps( + {required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_rescan_swaps(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesRescanSwapsConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesRescanSwapsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_rescan_swaps", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesSendOnchain( + {required BindingBreezServices that, required SendOnchainRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_onchain(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_onchain_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSendOnchainConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSendOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_onchain", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesSendPayment( + {required BindingBreezServices that, required SendPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_payment(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSendPaymentConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSendPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_payment", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesSendSpontaneousPayment( + {required BindingBreezServices that, required SendSpontaneousPaymentRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_spontaneous_payment(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_send_payment_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSendSpontaneousPaymentConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSendSpontaneousPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_spontaneous_payment", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesSetPaymentMetadata( + {required BindingBreezServices that, required String hash, required String metadata, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(hash); + var arg2 = cst_encode_String(metadata); + return wire.wire__crate__binding__BindingBreezServices_set_payment_metadata(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSetPaymentMetadataConstMeta, + argValues: [that, hash, metadata], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSetPaymentMetadataConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_set_payment_metadata", + argNames: ["that", "hash", "metadata"], + ); + + @override + Future crateBindingBindingBreezServicesSignMessage( + {required BindingBreezServices that, required SignMessageRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_sign_message_request(req); + return wire.wire__crate__binding__BindingBreezServices_sign_message(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_sign_message_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSignMessageConstMeta, + argValues: [that, req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSignMessageConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_sign_message", + argNames: ["that", "req"], + ); + + @override + Future crateBindingBindingBreezServicesSync({required BindingBreezServices that, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_sync(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesSyncConstMeta, + argValues: [that], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesSyncConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_sync", + argNames: ["that"], + ); + + @override + Future crateBindingBindingBreezServicesUnregisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(webhookUrl); + return wire.wire__crate__binding__BindingBreezServices_unregister_webhook(port_, arg0, arg1); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBindingBreezServicesUnregisterWebhookConstMeta, + argValues: [that, webhookUrl], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingBindingBreezServicesUnregisterWebhookConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_unregister_webhook", + argNames: ["that", "webhookUrl"], + ); + + @override + 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__crate__binding__breez_events_stream(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBreezEventsStreamConstMeta, + argValues: [s], + apiImpl: this, + hint: hint, + ))); + return s.stream; + } + + TaskConstMeta get kCrateBindingBreezEventsStreamConstMeta => const TaskConstMeta( + debugName: "breez_events_stream", + argNames: ["s"], + ); + + @override + 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__crate__binding__breez_log_stream(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingBreezLogStreamConstMeta, + argValues: [s], + apiImpl: this, + hint: hint, + ))); + return s.stream; + } + + TaskConstMeta get kCrateBindingBreezLogStreamConstMeta => const TaskConstMeta( + debugName: "breez_log_stream", + argNames: ["s"], + ); + + @override + 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__crate__binding__connect(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices, + decodeErrorData: dco_decode_connect_error, + ), + constMeta: kCrateBindingConnectConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingConnectConstMeta => const TaskConstMeta( + debugName: "connect", + argNames: ["req"], + ); + + @override + Future crateBindingDefaultConfig( + {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__crate__binding__default_config(port_, arg0, arg1, arg2); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_config, + decodeErrorData: null, + ), + constMeta: kCrateBindingDefaultConfigConstMeta, + argValues: [envType, apiKey, nodeConfig], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingDefaultConfigConstMeta => const TaskConstMeta( + debugName: "default_config", + argNames: ["envType", "apiKey", "nodeConfig"], + ); + + @override + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(phrase); + 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: kCrateBindingMnemonicToSeedConstMeta, + argValues: [phrase], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingMnemonicToSeedConstMeta => const TaskConstMeta( + debugName: "mnemonic_to_seed", + argNames: ["phrase"], + ); + + @override + Future crateBindingParseInput({required String input, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(input); + return wire.wire__crate__binding__parse_input(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_input_type, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingParseInputConstMeta, + argValues: [input], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingParseInputConstMeta => const TaskConstMeta( + debugName: "parse_input", + argNames: ["input"], + ); + + @override + Future crateBindingParseInvoice({required String invoice, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(invoice); + return wire.wire__crate__binding__parse_invoice(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_ln_invoice, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingParseInvoiceConstMeta, + argValues: [invoice], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingParseInvoiceConstMeta => const TaskConstMeta( + debugName: "parse_invoice", + argNames: ["invoice"], + ); + + @override + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(apiKey); + return wire.wire__crate__binding__service_health_check(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_service_health_check_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingServiceHealthCheckConstMeta, + argValues: [apiKey], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingServiceHealthCheckConstMeta => const TaskConstMeta( + debugName: "service_health_check", + argNames: ["apiKey"], + ); + + @override + 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__crate__binding__static_backup(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_static_backup_response, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingStaticBackupConstMeta, + argValues: [req], + apiImpl: this, + hint: hint, + )); + } + + TaskConstMeta get kCrateBindingStaticBackupConstMeta => const TaskConstMeta( + debugName: "static_backup", + argNames: ["req"], + ); + + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_BindingBreezServices => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_BindingBreezServices => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices; + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return AnyhowException(raw as String); + } + + @protected + BindingBreezServices + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + + @protected + BindingBreezServices + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + + @protected + BindingBreezServices + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + + @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 + 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); + } + + @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 + BigInt dco_decode_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dco_decode_u_64(raw); + } + + @protected + 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 + ConnectError dco_decode_connect_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return ConnectError_Generic( + err: dco_decode_String(raw[1]), + ); + case 1: + return ConnectError_RestoreOnly( + err: dco_decode_String(raw[1]), + ); + case 2: + return ConnectError_ServiceConnectivity( + err: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + + @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 + PlatformInt64 dco_decode_i_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeI64(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 != 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]), + 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]), + 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]), + ); + } + + @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 + 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); + } + + @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 + BigInt? dco_decode_opt_box_autoadd_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw == null ? null : dco_decode_box_autoadd_u_64(raw); + } + + @protected + 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 != 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]), + ); + } + + @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 + BigInt dco_decode_u_64(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + + @protected + int dco_decode_u_8(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return raw as int; + } + + @protected + 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 + 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 + var inner = sse_decode_String(deserializer); + return AnyhowException(inner); + } + + @protected + BindingBreezServices + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BindingBreezServices + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BindingBreezServices + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(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 + 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 + 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)); + } + + @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 + BigInt sse_decode_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return (sse_decode_u_64(deserializer)); + } + + @protected + 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 + ConnectError sse_decode_connect_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_err = sse_decode_String(deserializer); + return ConnectError_Generic(err: var_err); + case 1: + var var_err = sse_decode_String(deserializer); + return ConnectError_RestoreOnly(err: var_err); + case 2: + var var_err = sse_decode_String(deserializer); + return ConnectError_ServiceConnectivity(err: var_err); + default: + throw UnimplementedError(''); + } + } + + @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 + PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getPlatformInt64(); + } + + @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_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); + 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, + lnurlPayComment: var_lnurlPayComment, + 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 + 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)) { + 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 + BigInt? sse_decode_opt_box_autoadd_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + if (sse_decode_bool(deserializer)) { + return (sse_decode_box_autoadd_u_64(deserializer)); + } else { + return null; + } + } + + @protected + 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); + var var_label = sse_decode_opt_String(deserializer); + return PaymentFailedData(error: var_error, nodeId: var_nodeId, invoice: var_invoice, label: var_label); + } + + @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 + BigInt sse_decode_u_64(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); + } + + @protected + int sse_decode_u_8(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getUint8(); + } + + @protected + 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 + 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_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(move: true); + } + + @protected + int cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(move: false); + } + + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + + @protected + bool cst_encode_bool(bool raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw; + } + + @protected + int cst_encode_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 + sse_encode_String(self.message, serializer); + } + + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: true), serializer); + } + + @protected + void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: false), serializer); + } + + @protected + void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + + @protected + void sse_encode_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(PlatformInt64 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(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_u_64(self, serializer); + } + + @protected + void sse_encode_box_autoadd_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_error(ConnectError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case ConnectError_Generic(err: final err): + sse_encode_i_32(0, serializer); + sse_encode_String(err, serializer); + case ConnectError_RestoreOnly(err: final err): + sse_encode_i_32(1, serializer); + sse_encode_String(err, serializer); + case ConnectError_ServiceConnectivity(err: final err): + sse_encode_i_32(2, serializer); + sse_encode_String(err, 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(PlatformInt64 self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putPlatformInt64(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.lnurlPayComment, 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(PlatformInt64? 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(BigInt? self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + sse_encode_bool(self != null, serializer); + if (self != null) { + sse_encode_box_autoadd_u_64(self, serializer); + } + } + + @protected + void sse_encode_opt_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); + sse_encode_opt_String(self.label, 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(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } + + @protected + void sse_encode_u_8(int self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putUint8(self); + } + + @protected + void sse_encode_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); + } + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } +} 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..23ff2cfa4 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -0,0 +1,7560 @@ +// This file is automatically generated, so please do not edit it. +// 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 + +import 'binding.dart'; +import 'breez_services.dart'; +import 'chain.dart'; +import 'dart:async'; +import 'dart:convert'; +import 'dart:ffi' as ffi; +import 'error.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_io.dart'; + +abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl { + BreezSdkBindingsApiImplPlatform({ + required super.handler, + required super.wire, + required super.generalizedFrbRustBinding, + required super.portManager, + }); + + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_BindingBreezServicesPtr => wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr; + + @protected + AnyhowException dco_decode_AnyhowException(dynamic raw); + + @protected + BindingBreezServices + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw); + + @protected + BindingBreezServices + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw); + + @protected + BindingBreezServices + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + 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 + PlatformInt64 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 + BigInt 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 + ConnectError dco_decode_connect_error(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 + PlatformInt64 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 + PlatformInt64? 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 + BigInt? 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 + BigInt 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 + BigInt dco_decode_usize(dynamic raw); + + @protected + AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer); + + @protected + BindingBreezServices + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer); + + @protected + BindingBreezServices + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer); + + @protected + BindingBreezServices + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + 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 + PlatformInt64 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 + BigInt 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 + ConnectError sse_decode_connect_error(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 + PlatformInt64 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 + PlatformInt64? 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 + BigInt? 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 + BigInt 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 + BigInt sse_decode_usize(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(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)); + } + + @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(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return wire.cst_new_box_autoadd_u_64(cst_encode_u_64(raw)); + } + + @protected + ffi.Pointer cst_encode_box_autoadd_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(PlatformInt64 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(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); + } + + @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(BigInt? raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw == null ? ffi.nullptr : cst_encode_box_autoadd_u_64(raw); + } + + @protected + ffi.Pointer cst_encode_opt_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(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toSigned(64).toInt(); + } + + @protected + int cst_encode_usize(BigInt raw) { + // Codec=Cst (C-struct based), see doc to use other codecs + return raw.toSigned(64).toInt(); + } + + @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_error(ConnectError apiObj, wire_cst_connect_error wireObj) { + if (apiObj is ConnectError_Generic) { + var pre_err = cst_encode_String(apiObj.err); + wireObj.tag = 0; + wireObj.kind.Generic.err = pre_err; + return; + } + if (apiObj is ConnectError_RestoreOnly) { + var pre_err = cst_encode_String(apiObj.err); + wireObj.tag = 1; + wireObj.kind.RestoreOnly.err = pre_err; + return; + } + if (apiObj is ConnectError_ServiceConnectivity) { + var pre_err = cst_encode_String(apiObj.err); + wireObj.tag = 2; + wireObj.kind.ServiceConnectivity.err = pre_err; + return; + } + } + + @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.lnurl_pay_comment = cst_encode_opt_String(apiObj.lnurlPayComment); + 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); + wireObj.label = cst_encode_opt_String(apiObj.label); + } + + @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 + int cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw); + + @protected + int cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw); + + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw); + + @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_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer); + + @protected + void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer); + + @protected + void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices 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(PlatformInt64 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(BigInt 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_error(ConnectError 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(PlatformInt64 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(PlatformInt64? 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(BigInt? 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(BigInt 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); + + @protected + void sse_encode_usize(BigInt 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__crate__binding__BindingBreezServices_backup( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_backup( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_backupPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup'); + late final _wire__crate__binding__BindingBreezServices_backup = + _wire__crate__binding__BindingBreezServices_backupPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_backup_status( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_backup_status( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_backup_statusPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status'); + late final _wire__crate__binding__BindingBreezServices_backup_status = + _wire__crate__binding__BindingBreezServices_backup_statusPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_buy_bitcoin( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_buy_bitcoin( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_buy_bitcoinPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin'); + late final _wire__crate__binding__BindingBreezServices_buy_bitcoin = + _wire__crate__binding__BindingBreezServices_buy_bitcoinPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_check_message( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_check_message( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_check_messagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message'); + late final _wire__crate__binding__BindingBreezServices_check_message = + _wire__crate__binding__BindingBreezServices_check_messagePtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_close_lsp_channels( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_close_lsp_channels( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_close_lsp_channelsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels'); + late final _wire__crate__binding__BindingBreezServices_close_lsp_channels = + _wire__crate__binding__BindingBreezServices_close_lsp_channelsPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_configure_node( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_configure_node( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_configure_nodePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node'); + late final _wire__crate__binding__BindingBreezServices_configure_node = + _wire__crate__binding__BindingBreezServices_configure_nodePtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_connect_lsp( + int port_, + int that, + ffi.Pointer lsp_id, + ) { + return _wire__crate__binding__BindingBreezServices_connect_lsp( + port_, + that, + lsp_id, + ); + } + + late final _wire__crate__binding__BindingBreezServices_connect_lspPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp'); + late final _wire__crate__binding__BindingBreezServices_connect_lsp = + _wire__crate__binding__BindingBreezServices_connect_lspPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_disconnect( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_disconnect( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_disconnectPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect'); + late final _wire__crate__binding__BindingBreezServices_disconnect = + _wire__crate__binding__BindingBreezServices_disconnectPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_execute_command( + int port_, + int that, + ffi.Pointer command, + ) { + return _wire__crate__binding__BindingBreezServices_execute_command( + port_, + that, + command, + ); + } + + late final _wire__crate__binding__BindingBreezServices_execute_commandPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command'); + late final _wire__crate__binding__BindingBreezServices_execute_command = + _wire__crate__binding__BindingBreezServices_execute_commandPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_fetch_fiat_rates( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_fetch_fiat_rates( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_fetch_fiat_ratesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates'); + late final _wire__crate__binding__BindingBreezServices_fetch_fiat_rates = + _wire__crate__binding__BindingBreezServices_fetch_fiat_ratesPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_fetch_lsp_info( + int port_, + int that, + ffi.Pointer id, + ) { + return _wire__crate__binding__BindingBreezServices_fetch_lsp_info( + port_, + that, + id, + ); + } + + late final _wire__crate__binding__BindingBreezServices_fetch_lsp_infoPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info'); + late final _wire__crate__binding__BindingBreezServices_fetch_lsp_info = + _wire__crate__binding__BindingBreezServices_fetch_lsp_infoPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_feesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees'); + late final _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees = + _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_feesPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_generate_diagnostic_data( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_generate_diagnostic_data( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_generate_diagnostic_dataPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data'); + late final _wire__crate__binding__BindingBreezServices_generate_diagnostic_data = + _wire__crate__binding__BindingBreezServices_generate_diagnostic_dataPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_in_progress_onchain_paymentsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments'); + late final _wire__crate__binding__BindingBreezServices_in_progress_onchain_payments = + _wire__crate__binding__BindingBreezServices_in_progress_onchain_paymentsPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_in_progress_reverse_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps'); + late final _wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps = + _wire__crate__binding__BindingBreezServices_in_progress_reverse_swapsPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_in_progress_swap( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_in_progress_swap( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_in_progress_swapPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap'); + late final _wire__crate__binding__BindingBreezServices_in_progress_swap = + _wire__crate__binding__BindingBreezServices_in_progress_swapPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_list_fiat_currencies( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_list_fiat_currencies( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_list_fiat_currenciesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies'); + late final _wire__crate__binding__BindingBreezServices_list_fiat_currencies = + _wire__crate__binding__BindingBreezServices_list_fiat_currenciesPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_list_lsps( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_list_lsps( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_list_lspsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps'); + late final _wire__crate__binding__BindingBreezServices_list_lsps = + _wire__crate__binding__BindingBreezServices_list_lspsPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_list_payments( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_list_payments( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_list_paymentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments'); + late final _wire__crate__binding__BindingBreezServices_list_payments = + _wire__crate__binding__BindingBreezServices_list_paymentsPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_list_refundables( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_list_refundables( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_list_refundablesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables'); + late final _wire__crate__binding__BindingBreezServices_list_refundables = + _wire__crate__binding__BindingBreezServices_list_refundablesPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_lnurl_auth( + int port_, + int that, + ffi.Pointer req_data, + ) { + return _wire__crate__binding__BindingBreezServices_lnurl_auth( + port_, + that, + req_data, + ); + } + + late final _wire__crate__binding__BindingBreezServices_lnurl_authPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth'); + late final _wire__crate__binding__BindingBreezServices_lnurl_auth = + _wire__crate__binding__BindingBreezServices_lnurl_authPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_lnurl_pay( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_lnurl_pay( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_lnurl_payPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay'); + late final _wire__crate__binding__BindingBreezServices_lnurl_pay = + _wire__crate__binding__BindingBreezServices_lnurl_payPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_lnurl_withdraw( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_lnurl_withdraw( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_lnurl_withdrawPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw'); + late final _wire__crate__binding__BindingBreezServices_lnurl_withdraw = + _wire__crate__binding__BindingBreezServices_lnurl_withdrawPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_lsp_id( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_lsp_id( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_lsp_idPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id'); + late final _wire__crate__binding__BindingBreezServices_lsp_id = + _wire__crate__binding__BindingBreezServices_lsp_idPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_lsp_info( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_lsp_info( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_lsp_infoPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info'); + late final _wire__crate__binding__BindingBreezServices_lsp_info = + _wire__crate__binding__BindingBreezServices_lsp_infoPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_max_reverse_swap_amountPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount'); + late final _wire__crate__binding__BindingBreezServices_max_reverse_swap_amount = + _wire__crate__binding__BindingBreezServices_max_reverse_swap_amountPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_node_credentials( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_node_credentials( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_node_credentialsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials'); + late final _wire__crate__binding__BindingBreezServices_node_credentials = + _wire__crate__binding__BindingBreezServices_node_credentialsPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_node_info( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_node_info( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_node_infoPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info'); + late final _wire__crate__binding__BindingBreezServices_node_info = + _wire__crate__binding__BindingBreezServices_node_infoPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_onchain_payment_limits( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_onchain_payment_limits( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_onchain_payment_limitsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits'); + late final _wire__crate__binding__BindingBreezServices_onchain_payment_limits = + _wire__crate__binding__BindingBreezServices_onchain_payment_limitsPtr + .asFunction(); + + void wire__crate__binding__BindingBreezServices_open_channel_fee( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_open_channel_fee( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_open_channel_feePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee'); + late final _wire__crate__binding__BindingBreezServices_open_channel_fee = + _wire__crate__binding__BindingBreezServices_open_channel_feePtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_pay_onchain( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_pay_onchain( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_pay_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain'); + late final _wire__crate__binding__BindingBreezServices_pay_onchain = + _wire__crate__binding__BindingBreezServices_pay_onchainPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_payment_by_hash( + int port_, + int that, + ffi.Pointer hash, + ) { + return _wire__crate__binding__BindingBreezServices_payment_by_hash( + port_, + that, + hash, + ); + } + + late final _wire__crate__binding__BindingBreezServices_payment_by_hashPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash'); + late final _wire__crate__binding__BindingBreezServices_payment_by_hash = + _wire__crate__binding__BindingBreezServices_payment_by_hashPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_prepare_onchain_payment( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_prepare_onchain_payment( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_prepare_onchain_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment'); + late final _wire__crate__binding__BindingBreezServices_prepare_onchain_payment = + _wire__crate__binding__BindingBreezServices_prepare_onchain_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_fundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds'); + late final _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds = + _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_fundsPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_prepare_refund( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_prepare_refund( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_prepare_refundPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund'); + late final _wire__crate__binding__BindingBreezServices_prepare_refund = + _wire__crate__binding__BindingBreezServices_prepare_refundPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_receive_onchain( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_receive_onchain( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_receive_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain'); + late final _wire__crate__binding__BindingBreezServices_receive_onchain = + _wire__crate__binding__BindingBreezServices_receive_onchainPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_receive_payment( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_receive_payment( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_receive_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment'); + late final _wire__crate__binding__BindingBreezServices_receive_payment = + _wire__crate__binding__BindingBreezServices_receive_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_recommended_fees( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_recommended_fees( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_recommended_feesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees'); + late final _wire__crate__binding__BindingBreezServices_recommended_fees = + _wire__crate__binding__BindingBreezServices_recommended_feesPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_redeem_onchain_funds( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_redeem_onchain_funds( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_redeem_onchain_fundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds'); + late final _wire__crate__binding__BindingBreezServices_redeem_onchain_funds = + _wire__crate__binding__BindingBreezServices_redeem_onchain_fundsPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_redeem_swap( + int port_, + int that, + ffi.Pointer swap_address, + ) { + return _wire__crate__binding__BindingBreezServices_redeem_swap( + port_, + that, + swap_address, + ); + } + + late final _wire__crate__binding__BindingBreezServices_redeem_swapPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap'); + late final _wire__crate__binding__BindingBreezServices_redeem_swap = + _wire__crate__binding__BindingBreezServices_redeem_swapPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_refund( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_refund( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_refundPtr = _lookup< + ffi + .NativeFunction)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund'); + late final _wire__crate__binding__BindingBreezServices_refund = + _wire__crate__binding__BindingBreezServices_refundPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_register_webhook( + int port_, + int that, + ffi.Pointer webhook_url, + ) { + return _wire__crate__binding__BindingBreezServices_register_webhook( + port_, + that, + webhook_url, + ); + } + + late final _wire__crate__binding__BindingBreezServices_register_webhookPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook'); + late final _wire__crate__binding__BindingBreezServices_register_webhook = + _wire__crate__binding__BindingBreezServices_register_webhookPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_report_issue( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_report_issue( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_report_issuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue'); + late final _wire__crate__binding__BindingBreezServices_report_issue = + _wire__crate__binding__BindingBreezServices_report_issuePtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_rescan_swaps( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_rescan_swaps( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_rescan_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps'); + late final _wire__crate__binding__BindingBreezServices_rescan_swaps = + _wire__crate__binding__BindingBreezServices_rescan_swapsPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_send_onchain( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_send_onchain( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_send_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain'); + late final _wire__crate__binding__BindingBreezServices_send_onchain = + _wire__crate__binding__BindingBreezServices_send_onchainPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_send_payment( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_send_payment( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_send_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment'); + late final _wire__crate__binding__BindingBreezServices_send_payment = + _wire__crate__binding__BindingBreezServices_send_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_send_spontaneous_payment( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_send_spontaneous_payment( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_send_spontaneous_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment'); + late final _wire__crate__binding__BindingBreezServices_send_spontaneous_payment = + _wire__crate__binding__BindingBreezServices_send_spontaneous_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_set_payment_metadata( + int port_, + int that, + ffi.Pointer hash, + ffi.Pointer metadata, + ) { + return _wire__crate__binding__BindingBreezServices_set_payment_metadata( + port_, + that, + hash, + metadata, + ); + } + + late final _wire__crate__binding__BindingBreezServices_set_payment_metadataPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer, + ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata'); + late final _wire__crate__binding__BindingBreezServices_set_payment_metadata = + _wire__crate__binding__BindingBreezServices_set_payment_metadataPtr.asFunction< + void Function(int, int, ffi.Pointer, + ffi.Pointer)>(); + + void wire__crate__binding__BindingBreezServices_sign_message( + int port_, + int that, + ffi.Pointer req, + ) { + return _wire__crate__binding__BindingBreezServices_sign_message( + port_, + that, + req, + ); + } + + late final _wire__crate__binding__BindingBreezServices_sign_messagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message'); + late final _wire__crate__binding__BindingBreezServices_sign_message = + _wire__crate__binding__BindingBreezServices_sign_messagePtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_sync( + int port_, + int that, + ) { + return _wire__crate__binding__BindingBreezServices_sync( + port_, + that, + ); + } + + late final _wire__crate__binding__BindingBreezServices_syncPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync'); + late final _wire__crate__binding__BindingBreezServices_sync = + _wire__crate__binding__BindingBreezServices_syncPtr.asFunction(); + + void wire__crate__binding__BindingBreezServices_unregister_webhook( + int port_, + int that, + ffi.Pointer webhook_url, + ) { + return _wire__crate__binding__BindingBreezServices_unregister_webhook( + port_, + that, + webhook_url, + ); + } + + late final _wire__crate__binding__BindingBreezServices_unregister_webhookPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook'); + late final _wire__crate__binding__BindingBreezServices_unregister_webhook = + _wire__crate__binding__BindingBreezServices_unregister_webhookPtr + .asFunction)>(); + + void wire__crate__binding__breez_events_stream( + int port_, + ffi.Pointer s, + ) { + return _wire__crate__binding__breez_events_stream( + port_, + s, + ); + } + + late final _wire__crate__binding__breez_events_streamPtr = + _lookup)>>( + '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__crate__binding__breez_log_stream( + int port_, + ffi.Pointer s, + ) { + return _wire__crate__binding__breez_log_stream( + port_, + s, + ); + } + + late final _wire__crate__binding__breez_log_streamPtr = + _lookup)>>( + '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__crate__binding__connect( + int port_, + ffi.Pointer req, + ) { + return _wire__crate__binding__connect( + port_, + req, + ); + } + + late final _wire__crate__binding__connectPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__connect'); + late final _wire__crate__binding__connect = _wire__crate__binding__connectPtr + .asFunction)>(); + + void wire__crate__binding__default_config( + int port_, + int env_type, + ffi.Pointer api_key, + ffi.Pointer node_config, + ) { + return _wire__crate__binding__default_config( + port_, + env_type, + api_key, + node_config, + ); + } + + 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__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__crate__binding__mnemonic_to_seed( + int port_, + ffi.Pointer phrase, + ) { + return _wire__crate__binding__mnemonic_to_seed( + port_, + phrase, + ); + } + + late final _wire__crate__binding__mnemonic_to_seedPtr = + _lookup)>>( + '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__crate__binding__parse_input( + int port_, + ffi.Pointer input, + ) { + return _wire__crate__binding__parse_input( + port_, + input, + ); + } + + late final _wire__crate__binding__parse_inputPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__parse_input'); + late final _wire__crate__binding__parse_input = _wire__crate__binding__parse_inputPtr + .asFunction)>(); + + void wire__crate__binding__parse_invoice( + int port_, + ffi.Pointer invoice, + ) { + return _wire__crate__binding__parse_invoice( + port_, + invoice, + ); + } + + late final _wire__crate__binding__parse_invoicePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__parse_invoice'); + late final _wire__crate__binding__parse_invoice = _wire__crate__binding__parse_invoicePtr + .asFunction)>(); + + void wire__crate__binding__service_health_check( + int port_, + ffi.Pointer api_key, + ) { + return _wire__crate__binding__service_health_check( + port_, + api_key, + ); + } + + late final _wire__crate__binding__service_health_checkPtr = + _lookup)>>( + '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__crate__binding__static_backup( + int port_, + ffi.Pointer req, + ) { + return _wire__crate__binding__static_backup( + port_, + req, + ); + } + + late final _wire__crate__binding__static_backupPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__static_backup'); + late final _wire__crate__binding__static_backup = _wire__crate__binding__static_backupPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr + .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_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_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_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 lnurl_pay_comment; + + 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; + + external ffi.Pointer label; +} + +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_ConnectError_Generic extends ffi.Struct { + external ffi.Pointer err; +} + +final class wire_cst_ConnectError_RestoreOnly extends ffi.Struct { + external ffi.Pointer err; +} + +final class wire_cst_ConnectError_ServiceConnectivity extends ffi.Struct { + external ffi.Pointer err; +} + +final class ConnectErrorKind extends ffi.Union { + external wire_cst_ConnectError_Generic Generic; + + external wire_cst_ConnectError_RestoreOnly RestoreOnly; + + external wire_cst_ConnectError_ServiceConnectivity ServiceConnectivity; +} + +final class wire_cst_connect_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external ConnectErrorKind kind; +} + +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..1f16f57ac --- /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.36. + +// 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 new file mode 100644 index 000000000..85966dc4b --- /dev/null +++ b/libs/sdk-flutter/lib/generated/input_parser.freezed.dart @@ -0,0 +1,1463 @@ +// 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..86d563b77 --- /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.36. + +// 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/generated/lnurl/pay/model.dart b/libs/sdk-flutter/lib/generated/lnurl/pay/model.dart new file mode 100644 index 000000000..b4cae1ec0 --- /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.36. + +// 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..c5887f5fa --- /dev/null +++ b/libs/sdk-flutter/lib/generated/lnurl/pay/model.freezed.dart @@ -0,0 +1,1343 @@ +// 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..09379d413 --- /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.36. + +// 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 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; + + /// 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 PlatformInt64 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..da93a18b3 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -0,0 +1,1960 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// 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 BigInt? 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 BigInt 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 PlatformInt64? fromTimestamp; + + /// Epoch time, in seconds + final PlatformInt64? 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 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, + }); + + @override + int get hashCode => + paymentHash.hashCode ^ + label.hashCode ^ + destinationPubkey.hashCode ^ + paymentPreimage.hashCode ^ + keysend.hashCode ^ + bolt11.hashCode ^ + openChannelBolt11.hashCode ^ + lnurlSuccessAction.hashCode ^ + lnurlPayDomain.hashCode ^ + lnurlPayComment.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 && + lnurlPayComment == other.lnurlPayComment && + 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 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; + 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 BigInt 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 BigInt channelsBalanceMsat; + final BigInt onchainBalanceMsat; + final BigInt pendingOnchainBalanceMsat; + final List utxos; + final BigInt maxPayableMsat; + final BigInt maxReceivableMsat; + final BigInt maxSinglePaymentAmountMsat; + final BigInt maxChanReserveMsats; + final List connectedPeers; + final BigInt 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 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 BigInt 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 BigInt? 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 BigInt? 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 BigInt 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 PlatformInt64 paymentTime; + final BigInt amountMsat; + final BigInt 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 BigInt 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 BigInt feesLockup; + final BigInt feesClaim; + final BigInt senderAmountSat; + final BigInt recipientAmountSat; + final BigInt 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 BigInt txWeight; + final BigInt 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 BigInt 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 BigInt 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 BigInt? 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 BigInt? 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 BigInt 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 BigInt min; + + /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions + final BigInt 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 BigInt feesLockup; + + /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. + final BigInt 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 BigInt? 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 BigInt 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 BigInt? 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 BigInt 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 PlatformInt64 createdAt; + + /// Relative time lock for the timeout for the script to be redeemed before swap fails. + final PlatformInt64 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 BigInt paidMsat; + + /// Total amount 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. + final BigInt confirmedSats; + + /// Unconfirmed sats waiting to be confirmed onchain. + final BigInt 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 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 PlatformInt64 maxAllowedDeposit; + + /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. + final PlatformInt64 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 BigInt 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 BigInt 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..f056ff34b --- /dev/null +++ b/libs/sdk-flutter/lib/generated/models.freezed.dart @@ -0,0 +1,1590 @@ +// 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/lib/native_toolkit.dart b/libs/sdk-flutter/lib/native_toolkit.dart index fcb21c89e..8c0dc7161 100644 --- a/libs/sdk-flutter/lib/native_toolkit.dart +++ b/libs/sdk-flutter/lib/native_toolkit.dart @@ -1,29 +1,28 @@ -import 'dart:ffi'; import 'dart:io'; -import 'bridge_generated.dart'; -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; -class UnsupportedPlatform implements Exception { - UnsupportedPlatform(String s); -} +const _libName = "breez_sdk_bindings"; +const _iosLibName = "breez_sdkFFI"; -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!'); + throw UnsupportedError('${Platform.operatingSystem} is not yet supported!'); } } return _breezSDK!; 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'; diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index ccc60167c..33f0e2e47 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,8 +12,9 @@ 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.36 + mkdir -p ./lib/generated + flutter_rust_bridge_codegen generate ios: $(SOURCES) flutter_rust_bridge make -C ../sdk-bindings bindings-swift @@ -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/ diff --git a/libs/sdk-flutter/pubspec.lock b/libs/sdk-flutter/pubspec.lock index 6ca549a4d..72ec7b8de 100644 --- a/libs/sdk-flutter/pubspec.lock +++ b/libs/sdk-flutter/pubspec.lock @@ -17,14 +17,6 @@ packages: url: "https://pub.dev" source: hosted version: "6.4.1" - archive: - dependency: transitive - description: - name: archive - sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265 - url: "https://pub.dev" - source: hosted - version: "3.5.1" args: dependency: transitive description: @@ -77,10 +69,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -93,10 +85,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + sha256: "1414d6d733a85d8ad2f1dfcb3ea7945759e35a123cb99ccfac75d0758f75edfa" url: "https://pub.dev" source: hosted - version: "2.4.9" + version: "2.4.10" build_runner_core: dependency: transitive description: @@ -213,10 +205,10 @@ 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: @@ -250,17 +242,17 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: "02720226035257ad0b571c1256f43df3e1556a499f6bcb004849a0faaa0e87f0" + sha256: efb018e387c5e844095e35e9d6c6bd1610c49f25de109f4988b7c45aeca60a9a url: "https://pub.dev" source: hosted - version: "1.82.6" + version: "2.0.0-dev.36" 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.1" - http: - dependency: transitive - description: - name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" - url: "https://pub.dev" - source: hosted - version: "1.2.1" 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: @@ -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,14 +443,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.3" - puppeteer: - dependency: transitive - description: - name: puppeteer - sha256: "37293a2379ec5d022b7af6e5967304e74c69ebf7b72925b965a3c1ff9ccd9a4c" - url: "https://pub.dev" - source: hosted - version: "3.10.0" quiver: dependency: transitive 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: "814e9e88f21a176ae1359149021870e87f7cddaf633ab678a5d2b0bff7fd1ba8" - url: "https://pub.dev" - source: hosted - version: "4.4.0" vector_math: dependency: transitive description: @@ -656,14 +592,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "217f49b5213796cb508d6a942a5dc604ce1cb6a0a6b3d8cb3f0c314f0ecea712" + url: "https://pub.dev" + source: hosted + version: "0.1.4" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.0" yaml: dependency: transitive description: @@ -681,5 +625,5 @@ packages: source: hosted version: "2.2.1" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" flutter: ">=3.19.0" diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 56b28f3bf..fc5e57bea 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.4.7 + flutter_rust_bridge: ">=2.0.0-dev.34 <=2.0.0-dev.36" freezed_annotation: ^2.4.1 ### rxdart: ^0.27.7 @@ -21,11 +20,19 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^3.0.1 + + # 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: ^3.0.2 + # The following dependencies are required by flutter_rust_bridge_codegen to # be defined under dev_dependencies to generate Dart files - build_runner: ^2.4.8 - ffigen: <10.0.0 # flutter_rust_bridge requirement + build_runner: ^2.4.9 + 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 diff --git a/tools/sdk-cli/Cargo.lock b/tools/sdk-cli/Cargo.lock index 45d1797ee..10709e378 100644 --- a/tools/sdk-cli/Cargo.lock +++ b/tools/sdk-cli/Cargo.lock @@ -80,14 +80,13 @@ dependencies = [ [[package]] name = "allo-isolate" -version = "0.1.20" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56b7997817c178b853573e8bdfb6c3afe02810b43f17d766d6703560074b0c3" +checksum = "f2f5a5fd28223e6f3cafb7d9cd685f51eafdd71d33ca1229f8316925d5957240" dependencies = [ "anyhow", "atomic", "backtrace", - "chrono", ] [[package]] @@ -96,6 +95,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" @@ -519,6 +536,12 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.4.0" @@ -787,20 +810,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-parser" version = "8.2.0" @@ -1009,35 +1053,41 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "1.82.6" +version = "2.0.0-dev.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a5a7a1cd030cd63f53eafe2496eb4e40f520800e6e9b78cae6f3f3ba7f3c2b" +checksum = "dbafb8df6b5ec843e2b7f19f33f5b682d6bd028bf86aef2c5e02ff3e4ea37b03" 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", "threadpool", + "tokio", "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", ] [[package]] name = "flutter_rust_bridge_macros" -version = "1.77.1" +version = "2.0.0-dev.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a493ab6d382cb8ab292dd073f564d66b66edb7051bcb8215a6407b8716b9b992" +checksum = "04366488e32ac18f07982356d62860e145cc7ae28e16070f240082fe1c8ed5c9" +dependencies = [ + "hex", + "quote", + "syn 2.0.48", +] [[package]] name = "fnv" @@ -1077,9 +1127,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1092,9 +1142,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1102,15 +1152,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1119,15 +1169,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", @@ -1136,21 +1186,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.28" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1433,7 +1483,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1605,9 +1655,9 @@ checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "js-sys" -version = "0.3.63" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f37a4a5928311ac501dee68b3c7613a1037d0edb30c8e5427bd832d55d1b790" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1982,6 +2032,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" @@ -2067,9 +2128,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2816,6 +2877,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3019,11 +3090,11 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -3031,7 +3102,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.6", "tokio-macros", "windows-sys 0.48.0", ] @@ -3048,9 +3119,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", @@ -3441,9 +3512,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3451,9 +3522,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", @@ -3466,9 +3537,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.36" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d1985d03709c53167ce907ff394f5316aa22cb4e12761295c5dc57dacb6297e" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3478,9 +3549,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3488,9 +3559,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", @@ -3501,9 +3572,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" @@ -3618,6 +3689,15 @@ dependencies = [ "windows-targets 0.48.0", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -3648,6 +3728,22 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3660,6 +3756,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -3672,6 +3774,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -3684,6 +3792,18 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -3696,6 +3816,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -3708,6 +3834,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -3720,6 +3852,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -3732,6 +3870,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + [[package]] name = "winreg" version = "0.50.0"