diff --git a/cli/Cargo.lock b/cli/Cargo.lock index 9e375eb2f..7e7b9cd4b 100644 --- a/cli/Cargo.lock +++ b/cli/Cargo.lock @@ -1027,9 +1027,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033e831e28f1077ceae3490fb6d093dfdefefd09c5c6e8544c6579effe7e814f" +checksum = "5db18c05aac3922abfe24282af9128947d2b27856f3d6a4f30888bffa976855a" dependencies = [ "allo-isolate", "android_logger", @@ -1055,9 +1055,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0217fc4b7131b52578be60bbe38c76b3edfc2f9fecab46d9f930510f40ef9023" +checksum = "f83de8013ddf893c420794e8a722f941eeca7f4939b46434282d66b676a0997c" dependencies = [ "hex", "md-5", diff --git a/lib/Cargo.lock b/lib/Cargo.lock index 8f6596f5e..e4ab5dfa9 100644 --- a/lib/Cargo.lock +++ b/lib/Cargo.lock @@ -1191,9 +1191,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "033e831e28f1077ceae3490fb6d093dfdefefd09c5c6e8544c6579effe7e814f" +checksum = "5db18c05aac3922abfe24282af9128947d2b27856f3d6a4f30888bffa976855a" dependencies = [ "allo-isolate", "android_logger", @@ -1219,9 +1219,9 @@ dependencies = [ [[package]] name = "flutter_rust_bridge_macros" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0217fc4b7131b52578be60bbe38c76b3edfc2f9fecab46d9f930510f40ef9023" +checksum = "f83de8013ddf893c420794e8a722f941eeca7f4939b46434282d66b676a0997c" dependencies = [ "hex", "md-5", diff --git a/lib/bindings/langs/flutter/justfile b/lib/bindings/langs/flutter/justfile index 290e08479..a27762198 100644 --- a/lib/bindings/langs/flutter/justfile +++ b/lib/bindings/langs/flutter/justfile @@ -21,7 +21,7 @@ bootstrap frb='true' build='false': # Install flutter_rust_bridge_codegen dependencies frb: cargo install cargo-expand - cargo install flutter_rust_bridge_codegen --version 2.0.0 + cargo install flutter_rust_bridge_codegen --version 2.2.0 dart pub global activate ffigen dart pub global activate ffi cargo install cargo-xcode diff --git a/lib/core/Cargo.toml b/lib/core/Cargo.toml index 31fd25fa3..ca66e8964 100644 --- a/lib/core/Cargo.toml +++ b/lib/core/Cargo.toml @@ -17,7 +17,7 @@ bip39 = "2.0.0" boltz-client = { git = "https://github.com/dangeross/boltz-rust", branch = "savage-breez-latest" } chrono = "0.4" env_logger = "0.11" -flutter_rust_bridge = { version = "=2.0.0", features = ["chrono"], optional = true } +flutter_rust_bridge = { version = "=2.2.0", features = ["chrono"], optional = true } log = { workspace = true } lwk_common = "0.7.0" lwk_signer = "0.7.0" diff --git a/lib/core/src/bindings.rs b/lib/core/src/bindings.rs index 00af95601..6e50cd72e 100644 --- a/lib/core/src/bindings.rs +++ b/lib/core/src/bindings.rs @@ -238,6 +238,7 @@ impl BindingLiquidSdk { self.sdk.rescan_onchain_swaps().await } + #[frb(name = "sync")] pub async fn sync(&self) -> Result<(), SdkError> { self.sdk.sync().await.map_err(Into::into) } diff --git a/lib/core/src/frb_generated.rs b/lib/core/src/frb_generated.rs index 45e2ade6f..ed748b788 100644 --- a/lib/core/src/frb_generated.rs +++ b/lib/core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. #![allow( non_camel_case_types, @@ -38,7 +38,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.2.0"; pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -119028624; // Section: executor @@ -6578,7 +6578,4143 @@ impl SseEncode for usize { } #[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; +mod io { + // This file is automatically generated, so please do not edit it. + // Generated by `flutter_rust_bridge`@ 2.2.0. + + // Section: imports + + use super::*; + use crate::bindings::*; + use crate::model::EventListener; + use flutter_rust_bridge::for_generated::byteorder::{ + NativeEndian, ReadBytesExt, WriteBytesExt, + }; + use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; + use flutter_rust_bridge::{Handler, IntoIntoDart}; + + // Section: boilerplate + + flutter_rust_bridge::frb_generated_boilerplate_io!(); + + // Section: dart2rust + + impl CstDecode + for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() + } + } + impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> BindingLiquidSdk { + 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> + 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::bindings::AesSuccessActionDataDecrypted { + crate::bindings::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::bindings::AesSuccessActionDataResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Decrypted }; + crate::bindings::AesSuccessActionDataResult::Decrypted { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::bindings::AesSuccessActionDataResult::ErrorStatus { + reason: ans.reason.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::BackupRequest { + crate::model::BackupRequest { + backup_path: self.backup_path.cst_decode(), + } + } + } + impl CstDecode for wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::BindingEventListener { + crate::bindings::BindingEventListener { + stream: self.stream.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::bindings::BitcoinAddressData { + crate::bindings::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::bindings::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::bindings::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_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::BackupRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::BindingEventListener { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::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::model::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_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::ConnectRequest { + 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_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::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::bindings::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_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::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::bindings::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::bindings::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::bindings::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::bindings::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::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::bindings::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::bindings::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::bindings::duplicates::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_message_success_action_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::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_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::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::model::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_prepare_buy_bitcoin_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareBuyBitcoinRequest { + 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_pay_onchain_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PreparePayOnchainRequest { + 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_receive_onchain_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceiveOnchainRequest { + 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_receive_onchain_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceiveOnchainResponse { + 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_receive_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceivePaymentRequest { + 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::model::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_prepare_send_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareSendRequest { + 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_send_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareSendResponse { + 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::model::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_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::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_restore_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::RestoreRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_sdk_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::SdkEvent { + 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::bindings::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_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::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::bindings::UrlSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::BuyBitcoinRequest { + crate::model::BuyBitcoinRequest { + prepare_res: self.prepare_res.cst_decode(), + redirect_url: self.redirect_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::Config { + crate::model::Config { + liquid_electrum_url: self.liquid_electrum_url.cst_decode(), + bitcoin_electrum_url: self.bitcoin_electrum_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(), + zero_conf_min_fee_rate_msat: self.zero_conf_min_fee_rate_msat.cst_decode(), + zero_conf_max_amount_sat: self.zero_conf_max_amount_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::ConnectRequest { + crate::model::ConnectRequest { + mnemonic: self.mnemonic.cst_decode(), + config: self.config.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::bindings::CurrencyInfo { + crate::bindings::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::bindings::FiatCurrency { + crate::bindings::FiatCurrency { + id: self.id.cst_decode(), + info: self.info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_get_info_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::GetInfoResponse { + crate::model::GetInfoResponse { + balance_sat: self.balance_sat.cst_decode(), + pending_send_sat: self.pending_send_sat.cst_decode(), + pending_receive_sat: self.pending_receive_sat.cst_decode(), + pubkey: self.pubkey.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::bindings::InputType { + match self.tag { + 0 => { + let ans = unsafe { self.kind.BitcoinAddress }; + crate::bindings::InputType::BitcoinAddress { + address: ans.address.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Bolt11 }; + crate::bindings::InputType::Bolt11 { + invoice: ans.invoice.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.NodeId }; + crate::bindings::InputType::NodeId { + node_id: ans.node_id.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Url }; + crate::bindings::InputType::Url { + url: ans.url.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.LnUrlPay }; + crate::bindings::InputType::LnUrlPay { + data: ans.data.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.LnUrlWithdraw }; + crate::bindings::InputType::LnUrlWithdraw { + data: ans.data.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.LnUrlAuth }; + crate::bindings::InputType::LnUrlAuth { + data: ans.data.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.LnUrlError }; + crate::bindings::InputType::LnUrlError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode + for wire_cst_lightning_payment_limits_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::LightningPaymentLimitsResponse { + crate::model::LightningPaymentLimitsResponse { + send: self.send.cst_decode(), + receive: self.receive.cst_decode(), + } + } + } + impl CstDecode for wire_cst_limits { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::Limits { + crate::model::Limits { + min_sat: self.min_sat.cst_decode(), + max_sat: self.max_sat.cst_decode(), + max_zero_conf_sat: self.max_zero_conf_sat.cst_decode(), + } + } + } + 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_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 { + // 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::model::ListPaymentsRequest { + crate::model::ListPaymentsRequest { + filters: self.filters.cst_decode(), + from_timestamp: self.from_timestamp.cst_decode(), + to_timestamp: self.to_timestamp.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_refundable_swap { + // 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 wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::LNInvoice { + crate::bindings::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_url_auth_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::duplicates::LnUrlAuthError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Generic }; + crate::bindings::duplicates::LnUrlAuthError::Generic { + err: ans.err.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvalidUri }; + crate::bindings::duplicates::LnUrlAuthError::InvalidUri { + err: ans.err.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::bindings::duplicates::LnUrlAuthError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + 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::bindings::LnUrlAuthRequestData { + crate::bindings::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::bindings::duplicates::LnUrlCallbackStatus { + match self.tag { + 0 => crate::bindings::duplicates::LnUrlCallbackStatus::Ok, + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::bindings::duplicates::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::bindings::LnUrlErrorData { + crate::bindings::LnUrlErrorData { + reason: self.reason.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::duplicates::LnUrlPayError { + match self.tag { + 0 => crate::bindings::duplicates::LnUrlPayError::AlreadyPaid, + 1 => { + let ans = unsafe { self.kind.Generic }; + crate::bindings::duplicates::LnUrlPayError::Generic { + err: ans.err.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.InvalidAmount }; + crate::bindings::duplicates::LnUrlPayError::InvalidAmount { + err: ans.err.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.InvalidInvoice }; + crate::bindings::duplicates::LnUrlPayError::InvalidInvoice { + err: ans.err.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.InvalidNetwork }; + crate::bindings::duplicates::LnUrlPayError::InvalidNetwork { + err: ans.err.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.InvalidUri }; + crate::bindings::duplicates::LnUrlPayError::InvalidUri { + err: ans.err.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.InvoiceExpired }; + crate::bindings::duplicates::LnUrlPayError::InvoiceExpired { + err: ans.err.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.PaymentFailed }; + crate::bindings::duplicates::LnUrlPayError::PaymentFailed { + err: ans.err.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.PaymentTimeout }; + crate::bindings::duplicates::LnUrlPayError::PaymentTimeout { + err: ans.err.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.RouteNotFound }; + crate::bindings::duplicates::LnUrlPayError::RouteNotFound { + err: ans.err.cst_decode(), + } + } + 10 => { + let ans = unsafe { self.kind.RouteTooExpensive }; + crate::bindings::duplicates::LnUrlPayError::RouteTooExpensive { + err: ans.err.cst_decode(), + } + } + 11 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::bindings::duplicates::LnUrlPayError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + 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::bindings::LnUrlPayErrorData { + crate::bindings::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::bindings::LnUrlPayRequest { + crate::bindings::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(), + validate_success_action_url: self.validate_success_action_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::LnUrlPayRequestData { + crate::bindings::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::model::LnUrlPayResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EndpointSuccess }; + crate::model::LnUrlPayResult::EndpointSuccess { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.EndpointError }; + crate::model::LnUrlPayResult::EndpointError { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PayError }; + crate::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::model::LnUrlPaySuccessData { + crate::model::LnUrlPaySuccessData { + payment: self.payment.cst_decode(), + success_action: self.success_action.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::duplicates::LnUrlWithdrawError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Generic }; + crate::bindings::duplicates::LnUrlWithdrawError::Generic { + err: ans.err.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvalidAmount }; + crate::bindings::duplicates::LnUrlWithdrawError::InvalidAmount { + err: ans.err.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.InvalidInvoice }; + crate::bindings::duplicates::LnUrlWithdrawError::InvalidInvoice { + err: ans.err.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.InvalidUri }; + crate::bindings::duplicates::LnUrlWithdrawError::InvalidUri { + err: ans.err.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.InvoiceNoRoutingHints }; + crate::bindings::duplicates::LnUrlWithdrawError::InvoiceNoRoutingHints { + err: ans.err.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::bindings::duplicates::LnUrlWithdrawError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + 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::bindings::LnUrlWithdrawRequest { + crate::bindings::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::bindings::LnUrlWithdrawRequestData { + crate::bindings::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::bindings::duplicates::LnUrlWithdrawResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ok }; + crate::bindings::duplicates::LnUrlWithdrawResult::Ok { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Timeout }; + crate::bindings::duplicates::LnUrlWithdrawResult::Timeout { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::bindings::duplicates::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::bindings::duplicates::LnUrlWithdrawSuccessData { + crate::bindings::duplicates::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::bindings::LocaleOverrides { + crate::bindings::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::bindings::LocalizedName { + crate::bindings::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::model::LogEntry { + crate::model::LogEntry { + line: self.line.cst_decode(), + level: self.level.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::bindings::MessageSuccessActionData { + crate::bindings::MessageSuccessActionData { + message: self.message.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::model::OnchainPaymentLimitsResponse { + crate::model::OnchainPaymentLimitsResponse { + send: self.send.cst_decode(), + receive: self.receive.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::model::PayOnchainRequest { + crate::model::PayOnchainRequest { + address: self.address.cst_decode(), + prepare_res: self.prepare_res.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::Payment { + crate::model::Payment { + tx_id: self.tx_id.cst_decode(), + swap_id: self.swap_id.cst_decode(), + timestamp: self.timestamp.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + fees_sat: self.fees_sat.cst_decode(), + preimage: self.preimage.cst_decode(), + bolt11: self.bolt11.cst_decode(), + description: self.description.cst_decode(), + refund_tx_id: self.refund_tx_id.cst_decode(), + refund_tx_amount_sat: self.refund_tx_amount_sat.cst_decode(), + payment_type: self.payment_type.cst_decode(), + status: self.status.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::error::PaymentError { + match self.tag { + 0 => crate::error::PaymentError::AlreadyClaimed, + 1 => crate::error::PaymentError::AlreadyPaid, + 2 => crate::error::PaymentError::PaymentInProgress, + 3 => crate::error::PaymentError::AmountOutOfRange, + 4 => { + let ans = unsafe { self.kind.Generic }; + crate::error::PaymentError::Generic { + err: ans.err.cst_decode(), + } + } + 5 => crate::error::PaymentError::InvalidOrExpiredFees, + 6 => crate::error::PaymentError::InsufficientFunds, + 7 => { + let ans = unsafe { self.kind.InvalidInvoice }; + crate::error::PaymentError::InvalidInvoice { + err: ans.err.cst_decode(), + } + } + 8 => crate::error::PaymentError::InvalidPreimage, + 9 => { + let ans = unsafe { self.kind.LwkError }; + crate::error::PaymentError::LwkError { + err: ans.err.cst_decode(), + } + } + 10 => crate::error::PaymentError::PairsNotFound, + 11 => crate::error::PaymentError::PaymentTimeout, + 12 => crate::error::PaymentError::PersistError, + 13 => { + let ans = unsafe { self.kind.ReceiveError }; + crate::error::PaymentError::ReceiveError { + err: ans.err.cst_decode(), + } + } + 14 => { + let ans = unsafe { self.kind.Refunded }; + crate::error::PaymentError::Refunded { + err: ans.err.cst_decode(), + refund_tx_id: ans.refund_tx_id.cst_decode(), + } + } + 15 => crate::error::PaymentError::SelfTransferNotSupported, + 16 => { + let ans = unsafe { self.kind.SendError }; + crate::error::PaymentError::SendError { + err: ans.err.cst_decode(), + } + } + 17 => { + let ans = unsafe { self.kind.SignerError }; + crate::error::PaymentError::SignerError { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_prepare_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareBuyBitcoinRequest { + crate::model::PrepareBuyBitcoinRequest { + provider: self.provider.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_buy_bitcoin_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareBuyBitcoinResponse { + crate::model::PrepareBuyBitcoinResponse { + provider: self.provider.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + fees_sat: self.fees_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PreparePayOnchainRequest { + crate::model::PreparePayOnchainRequest { + receiver_amount_sat: self.receiver_amount_sat.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_pay_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PreparePayOnchainResponse { + crate::model::PreparePayOnchainResponse { + receiver_amount_sat: self.receiver_amount_sat.cst_decode(), + claim_fees_sat: self.claim_fees_sat.cst_decode(), + total_fees_sat: self.total_fees_sat.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_receive_onchain_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceiveOnchainRequest { + crate::model::PrepareReceiveOnchainRequest { + payer_amount_sat: self.payer_amount_sat.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_receive_onchain_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceiveOnchainResponse { + crate::model::PrepareReceiveOnchainResponse { + payer_amount_sat: self.payer_amount_sat.cst_decode(), + fees_sat: self.fees_sat.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_receive_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceivePaymentRequest { + crate::model::PrepareReceivePaymentRequest { + payer_amount_sat: self.payer_amount_sat.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_receive_payment_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareReceivePaymentResponse { + crate::model::PrepareReceivePaymentResponse { + payer_amount_sat: self.payer_amount_sat.cst_decode(), + fees_sat: self.fees_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::model::PrepareRefundRequest { + crate::model::PrepareRefundRequest { + swap_address: self.swap_address.cst_decode(), + refund_address: self.refund_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::model::PrepareRefundResponse { + crate::model::PrepareRefundResponse { + tx_vsize: self.tx_vsize.cst_decode(), + tx_fee_sat: self.tx_fee_sat.cst_decode(), + refund_tx_id: self.refund_tx_id.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_send_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareSendRequest { + crate::model::PrepareSendRequest { + invoice: self.invoice.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_send_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::PrepareSendResponse { + crate::model::PrepareSendResponse { + invoice: self.invoice.cst_decode(), + fees_sat: self.fees_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::bindings::Rate { + crate::bindings::Rate { + coin: self.coin.cst_decode(), + value: self.value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::ReceiveOnchainResponse { + crate::model::ReceiveOnchainResponse { + address: self.address.cst_decode(), + bip21: self.bip21.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::model::ReceivePaymentRequest { + crate::model::ReceivePaymentRequest { + description: self.description.cst_decode(), + prepare_res: self.prepare_res.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::model::ReceivePaymentResponse { + crate::model::ReceivePaymentResponse { + id: self.id.cst_decode(), + invoice: self.invoice.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::model::RecommendedFees { + crate::model::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_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::RefundRequest { + crate::model::RefundRequest { + swap_address: self.swap_address.cst_decode(), + refund_address: self.refund_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::model::RefundResponse { + crate::model::RefundResponse { + refund_tx_id: self.refund_tx_id.cst_decode(), + } + } + } + impl CstDecode for wire_cst_refundable_swap { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::RefundableSwap { + crate::model::RefundableSwap { + swap_address: self.swap_address.cst_decode(), + timestamp: self.timestamp.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_restore_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::RestoreRequest { + crate::model::RestoreRequest { + backup_path: self.backup_path.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::bindings::RouteHint { + crate::bindings::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::bindings::RouteHintHop { + crate::bindings::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_sdk_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::error::SdkError { + match self.tag { + 0 => crate::error::SdkError::AlreadyStarted, + 1 => { + let ans = unsafe { self.kind.Generic }; + crate::error::SdkError::Generic { + err: ans.err.cst_decode(), + } + } + 2 => crate::error::SdkError::NotStarted, + 3 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::error::SdkError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_sdk_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::SdkEvent { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PaymentFailed }; + crate::model::SdkEvent::PaymentFailed { + details: ans.details.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.PaymentPending }; + crate::model::SdkEvent::PaymentPending { + details: ans.details.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PaymentRefunded }; + crate::model::SdkEvent::PaymentRefunded { + details: ans.details.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.PaymentRefundPending }; + crate::model::SdkEvent::PaymentRefundPending { + details: ans.details.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.PaymentSucceeded }; + crate::model::SdkEvent::PaymentSucceeded { + details: ans.details.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.PaymentWaitingConfirmation }; + crate::model::SdkEvent::PaymentWaitingConfirmation { + details: ans.details.cst_decode(), + } + } + 6 => crate::model::SdkEvent::Synced, + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_send_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::model::SendPaymentResponse { + crate::model::SendPaymentResponse { + payment: self.payment.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::bindings::SuccessActionProcessed { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Aes }; + crate::bindings::SuccessActionProcessed::Aes { + result: ans.result.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Message }; + crate::bindings::SuccessActionProcessed::Message { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Url }; + crate::bindings::SuccessActionProcessed::Url { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::Symbol { + crate::bindings::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_url_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::bindings::UrlSuccessActionData { + crate::bindings::UrlSuccessActionData { + description: self.description.cst_decode(), + url: self.url.cst_decode(), + matches_callback_domain: self.matches_callback_domain.cst_decode(), + } + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_decrypted { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + plaintext: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_aes_success_action_data_decrypted { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AesSuccessActionDataResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_aes_success_action_data_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_backup_request { + fn new_with_null_ptr() -> Self { + Self { + backup_path: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_backup_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_binding_event_listener { + fn new_with_null_ptr() -> Self { + Self { + stream: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_binding_event_listener { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_bitcoin_address_data { + fn new_with_null_ptr() -> Self { + Self { + address: core::ptr::null_mut(), + network: Default::default(), + amount_sat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_bitcoin_address_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_buy_bitcoin_request { + fn new_with_null_ptr() -> Self { + Self { + prepare_res: Default::default(), + redirect_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_buy_bitcoin_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_config { + fn new_with_null_ptr() -> Self { + Self { + liquid_electrum_url: core::ptr::null_mut(), + bitcoin_electrum_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(), + zero_conf_min_fee_rate_msat: Default::default(), + zero_conf_max_amount_sat: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_connect_request { + fn new_with_null_ptr() -> Self { + Self { + mnemonic: core::ptr::null_mut(), + config: Default::default(), + } + } + } + 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_get_info_response { + fn new_with_null_ptr() -> Self { + Self { + balance_sat: Default::default(), + pending_send_sat: Default::default(), + pending_receive_sat: Default::default(), + pubkey: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_get_info_response { + 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_lightning_payment_limits_response { + fn new_with_null_ptr() -> Self { + Self { + send: Default::default(), + receive: Default::default(), + } + } + } + impl Default for wire_cst_lightning_payment_limits_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_limits { + fn new_with_null_ptr() -> Self { + Self { + min_sat: Default::default(), + max_sat: Default::default(), + max_zero_conf_sat: Default::default(), + } + } + } + impl Default for wire_cst_limits { + 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(), + from_timestamp: core::ptr::null_mut(), + to_timestamp: 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_url_auth_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlAuthErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_auth_error { + 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 { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_pay_error { + 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(), + validate_success_action_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + min_sendable: Default::default(), + max_sendable: Default::default(), + metadata_str: core::ptr::null_mut(), + comment_allowed: Default::default(), + domain: core::ptr::null_mut(), + allows_nostr: Default::default(), + nostr_pubkey: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_pay_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + success_action: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlWithdrawErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_withdraw_error { + 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_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_onchain_payment_limits_response { + fn new_with_null_ptr() -> Self { + Self { + send: Default::default(), + receive: Default::default(), + } + } + } + impl Default for wire_cst_onchain_payment_limits_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_pay_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + 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_payment { + fn new_with_null_ptr() -> Self { + Self { + tx_id: core::ptr::null_mut(), + swap_id: core::ptr::null_mut(), + timestamp: Default::default(), + amount_sat: Default::default(), + fees_sat: Default::default(), + preimage: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + description: core::ptr::null_mut(), + refund_tx_id: core::ptr::null_mut(), + refund_tx_amount_sat: core::ptr::null_mut(), + payment_type: Default::default(), + status: Default::default(), + } + } + } + impl Default for wire_cst_payment { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PaymentErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_payment_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_buy_bitcoin_request { + fn new_with_null_ptr() -> Self { + Self { + provider: Default::default(), + amount_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_buy_bitcoin_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_buy_bitcoin_response { + fn new_with_null_ptr() -> Self { + Self { + provider: Default::default(), + amount_sat: Default::default(), + fees_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_buy_bitcoin_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_pay_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + receiver_amount_sat: Default::default(), + sat_per_vbyte: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_prepare_pay_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_pay_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + receiver_amount_sat: Default::default(), + claim_fees_sat: Default::default(), + total_fees_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_pay_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_receive_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + payer_amount_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_receive_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_receive_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + payer_amount_sat: Default::default(), + fees_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_receive_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_receive_payment_request { + fn new_with_null_ptr() -> Self { + Self { + payer_amount_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_receive_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_receive_payment_response { + fn new_with_null_ptr() -> Self { + Self { + payer_amount_sat: Default::default(), + fees_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_receive_payment_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(), + refund_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 { + tx_vsize: Default::default(), + tx_fee_sat: Default::default(), + refund_tx_id: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_prepare_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_send_request { + fn new_with_null_ptr() -> Self { + Self { + invoice: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_prepare_send_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_send_response { + fn new_with_null_ptr() -> Self { + Self { + invoice: core::ptr::null_mut(), + fees_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_send_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_response { + fn new_with_null_ptr() -> Self { + Self { + address: core::ptr::null_mut(), + bip21: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_payment_request { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + prepare_res: Default::default(), + } + } + } + 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 { + id: core::ptr::null_mut(), + invoice: 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_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + refund_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_refundable_swap { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + timestamp: Default::default(), + amount_sat: Default::default(), + } + } + } + impl Default for wire_cst_refundable_swap { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_restore_request { + fn new_with_null_ptr() -> Self { + Self { + backup_path: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_restore_request { + 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_sdk_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SdkErrorKind { nil__: () }, + } + } + } + impl Default for wire_cst_sdk_error { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sdk_event { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SdkEventKind { nil__: () }, + } + } + } + impl Default for wire_cst_sdk_event { + 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_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_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_url_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + url: core::ptr::null_mut(), + matches_callback_domain: Default::default(), + } + } + } + impl Default for wire_cst_url_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_add_event_listener( + port_: i64, + that: usize, + listener: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__bindings__BindingLiquidSdk_add_event_listener_impl(port_, that, listener) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_backup( + that: usize, + req: *mut wire_cst_backup_request, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__bindings__BindingLiquidSdk_backup_impl(that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_buy_bitcoin( + port_: i64, + that: usize, + req: *mut wire_cst_buy_bitcoin_request, + ) { + wire__crate__bindings__BindingLiquidSdk_buy_bitcoin_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_disconnect( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_disconnect_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_empty_wallet_cache( + that: usize, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__bindings__BindingLiquidSdk_empty_wallet_cache_impl(that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_get_info( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_get_info_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_payments( + port_: i64, + that: usize, + req: *mut wire_cst_list_payments_request, + ) { + wire__crate__bindings__BindingLiquidSdk_list_payments_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_refundables( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_list_refundables_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_auth( + port_: i64, + that: usize, + req_data: *mut wire_cst_ln_url_auth_request_data, + ) { + wire__crate__bindings__BindingLiquidSdk_lnurl_auth_impl(port_, that, req_data) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_pay( + port_: i64, + that: usize, + req: *mut wire_cst_ln_url_pay_request, + ) { + wire__crate__bindings__BindingLiquidSdk_lnurl_pay_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_withdraw( + port_: i64, + that: usize, + req: *mut wire_cst_ln_url_withdraw_request, + ) { + wire__crate__bindings__BindingLiquidSdk_lnurl_withdraw_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_pay_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_pay_onchain_request, + ) { + wire__crate__bindings__BindingLiquidSdk_pay_onchain_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_buy_bitcoin( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_buy_bitcoin_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_buy_bitcoin_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_pay_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_pay_onchain_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_pay_onchain_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_receive_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_receive_onchain_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_receive_onchain_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_receive_payment( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_receive_payment_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_receive_payment_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_refund( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_refund_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_refund_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_send_payment( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_send_request, + ) { + wire__crate__bindings__BindingLiquidSdk_prepare_send_payment_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_receive_onchain( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_receive_onchain_response, + ) { + wire__crate__bindings__BindingLiquidSdk_receive_onchain_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_receive_payment( + port_: i64, + that: usize, + req: *mut wire_cst_receive_payment_request, + ) { + wire__crate__bindings__BindingLiquidSdk_receive_payment_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_recommended_fees( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_recommended_fees_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_refund( + port_: i64, + that: usize, + req: *mut wire_cst_refund_request, + ) { + wire__crate__bindings__BindingLiquidSdk_refund_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_rescan_onchain_swaps( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_rescan_onchain_swaps_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_restore( + that: usize, + req: *mut wire_cst_restore_request, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__bindings__BindingLiquidSdk_restore_impl(that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_send_payment( + port_: i64, + that: usize, + req: *mut wire_cst_prepare_send_response, + ) { + wire__crate__bindings__BindingLiquidSdk_send_payment_impl(port_, that, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_sync( + port_: i64, + that: usize, + ) { + wire__crate__bindings__BindingLiquidSdk_sync_impl(port_, that) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__binding_event_listener_on_event( + port_: i64, + that: *mut wire_cst_binding_event_listener, + e: *mut wire_cst_sdk_event, + ) { + wire__crate__bindings__binding_event_listener_on_event_impl(port_, that, e) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__breez_log_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__bindings__breez_log_stream_impl(port_, s) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__connect( + port_: i64, + req: *mut wire_cst_connect_request, + ) { + wire__crate__bindings__connect_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__default_config( + network: i32, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__bindings__default_config_impl(network) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__parse( + port_: i64, + input: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__bindings__parse_impl(port_, input) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__parse_invoice( + input: *mut wire_cst_list_prim_u_8_strict, + ) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco { + wire__crate__bindings__parse_invoice_impl(input) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk( + ptr: *const std::ffi::c_void, + ) { + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_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_liquid_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_liquid_cst_new_box_autoadd_backup_request( + ) -> *mut wire_cst_backup_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_backup_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_binding_event_listener( + ) -> *mut wire_cst_binding_event_listener { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_binding_event_listener::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_cst_new_box_autoadd_prepare_buy_bitcoin_request( + ) -> *mut wire_cst_prepare_buy_bitcoin_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_buy_bitcoin_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_pay_onchain_request( + ) -> *mut wire_cst_prepare_pay_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_pay_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_receive_onchain_request( + ) -> *mut wire_cst_prepare_receive_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_receive_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_receive_onchain_response( + ) -> *mut wire_cst_prepare_receive_onchain_response { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_receive_onchain_response::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_receive_payment_request( + ) -> *mut wire_cst_prepare_receive_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_receive_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_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_liquid_cst_new_box_autoadd_prepare_send_request( + ) -> *mut wire_cst_prepare_send_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_send_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_send_response( + ) -> *mut wire_cst_prepare_send_response { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_send_response::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_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_liquid_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_liquid_cst_new_box_autoadd_restore_request( + ) -> *mut wire_cst_restore_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_restore_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_sdk_event() -> *mut wire_cst_sdk_event + { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_sdk_event::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_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_liquid_cst_new_list_payment_type( + len: i32, + ) -> *mut wire_cst_list_payment_type { + let wrap = wire_cst_list_payment_type { + 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_liquid_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_liquid_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_liquid_cst_new_list_refundable_swap( + len: i32, + ) -> *mut wire_cst_list_refundable_swap { + let wrap = wire_cst_list_refundable_swap { + 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_liquid_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_liquid_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) + } + + #[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_request { + backup_path: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_binding_event_listener { + stream: *mut wire_cst_list_prim_u_8_strict, + } + #[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_buy_bitcoin_request { + prepare_res: wire_cst_prepare_buy_bitcoin_response, + redirect_url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_config { + liquid_electrum_url: *mut wire_cst_list_prim_u_8_strict, + bitcoin_electrum_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: u64, + zero_conf_min_fee_rate_msat: u32, + zero_conf_max_amount_sat: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_connect_request { + mnemonic: *mut wire_cst_list_prim_u_8_strict, + config: wire_cst_config, + } + #[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_get_info_response { + balance_sat: u64, + pending_send_sat: u64, + pending_receive_sat: u64, + pubkey: *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_lightning_payment_limits_response { + send: wire_cst_limits, + receive: wire_cst_limits, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_limits { + min_sat: u64, + max_sat: u64, + max_zero_conf_sat: u64, + } + #[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_payment { + ptr: *mut wire_cst_payment, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payment_type { + ptr: *mut i32, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payments_request { + filters: *mut wire_cst_list_payment_type, + from_timestamp: *mut i64, + to_timestamp: *mut i64, + 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_refundable_swap { + ptr: *mut wire_cst_refundable_swap, + 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_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_url_auth_error { + tag: i32, + kind: LnUrlAuthErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlAuthErrorKind { + Generic: wire_cst_LnUrlAuthError_Generic, + InvalidUri: wire_cst_LnUrlAuthError_InvalidUri, + ServiceConnectivity: wire_cst_LnUrlAuthError_ServiceConnectivity, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlAuthError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlAuthError_InvalidUri { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlAuthError_ServiceConnectivity { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[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 { + tag: i32, + kind: LnUrlPayErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlPayErrorKind { + Generic: wire_cst_LnUrlPayError_Generic, + InvalidAmount: wire_cst_LnUrlPayError_InvalidAmount, + InvalidInvoice: wire_cst_LnUrlPayError_InvalidInvoice, + InvalidNetwork: wire_cst_LnUrlPayError_InvalidNetwork, + InvalidUri: wire_cst_LnUrlPayError_InvalidUri, + InvoiceExpired: wire_cst_LnUrlPayError_InvoiceExpired, + PaymentFailed: wire_cst_LnUrlPayError_PaymentFailed, + PaymentTimeout: wire_cst_LnUrlPayError_PaymentTimeout, + RouteNotFound: wire_cst_LnUrlPayError_RouteNotFound, + RouteTooExpensive: wire_cst_LnUrlPayError_RouteTooExpensive, + ServiceConnectivity: wire_cst_LnUrlPayError_ServiceConnectivity, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_InvalidAmount { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_InvalidInvoice { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_InvalidNetwork { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_InvalidUri { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_InvoiceExpired { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_PaymentFailed { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_PaymentTimeout { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_RouteNotFound { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_RouteTooExpensive { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayError_ServiceConnectivity { + err: *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, + validate_success_action_url: *mut bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + min_sendable: u64, + max_sendable: u64, + metadata_str: *mut wire_cst_list_prim_u_8_strict, + comment_allowed: u16, + domain: *mut wire_cst_list_prim_u_8_strict, + allows_nostr: bool, + nostr_pubkey: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_result { + tag: i32, + kind: LnUrlPayResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlPayResultKind { + EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, + EndpointError: wire_cst_LnUrlPayResult_EndpointError, + PayError: wire_cst_LnUrlPayResult_PayError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointSuccess { + data: *mut wire_cst_ln_url_pay_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointError { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_PayError { + data: *mut wire_cst_ln_url_pay_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_success_data { + payment: wire_cst_payment, + success_action: *mut wire_cst_success_action_processed, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_error { + tag: i32, + kind: LnUrlWithdrawErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlWithdrawErrorKind { + Generic: wire_cst_LnUrlWithdrawError_Generic, + InvalidAmount: wire_cst_LnUrlWithdrawError_InvalidAmount, + InvalidInvoice: wire_cst_LnUrlWithdrawError_InvalidInvoice, + InvalidUri: wire_cst_LnUrlWithdrawError_InvalidUri, + InvoiceNoRoutingHints: wire_cst_LnUrlWithdrawError_InvoiceNoRoutingHints, + ServiceConnectivity: wire_cst_LnUrlWithdrawError_ServiceConnectivity, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_InvalidAmount { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_InvalidInvoice { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_InvalidUri { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_InvoiceNoRoutingHints { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawError_ServiceConnectivity { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request { + data: wire_cst_ln_url_withdraw_request_data, + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + k1: *mut wire_cst_list_prim_u_8_strict, + default_description: *mut wire_cst_list_prim_u_8_strict, + min_withdrawable: u64, + max_withdrawable: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_result { + tag: i32, + kind: LnUrlWithdrawResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlWithdrawResultKind { + Ok: wire_cst_LnUrlWithdrawResult_Ok, + Timeout: wire_cst_LnUrlWithdrawResult_Timeout, + ErrorStatus: wire_cst_LnUrlWithdrawResult_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Ok { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Timeout { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_success_data { + invoice: wire_cst_ln_invoice, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_locale_overrides { + locale: *mut wire_cst_list_prim_u_8_strict, + spacing: *mut u32, + symbol: wire_cst_symbol, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_localized_name { + locale: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_log_entry { + line: *mut wire_cst_list_prim_u_8_strict, + level: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_message_success_action_data { + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_onchain_payment_limits_response { + send: wire_cst_limits, + receive: wire_cst_limits, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_pay_onchain_request { + address: *mut wire_cst_list_prim_u_8_strict, + prepare_res: wire_cst_prepare_pay_onchain_response, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment { + tx_id: *mut wire_cst_list_prim_u_8_strict, + swap_id: *mut wire_cst_list_prim_u_8_strict, + timestamp: u32, + amount_sat: u64, + fees_sat: u64, + preimage: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, + refund_tx_amount_sat: *mut u64, + payment_type: i32, + status: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment_error { + tag: i32, + kind: PaymentErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union PaymentErrorKind { + Generic: wire_cst_PaymentError_Generic, + InvalidInvoice: wire_cst_PaymentError_InvalidInvoice, + LwkError: wire_cst_PaymentError_LwkError, + ReceiveError: wire_cst_PaymentError_ReceiveError, + Refunded: wire_cst_PaymentError_Refunded, + SendError: wire_cst_PaymentError_SendError, + SignerError: wire_cst_PaymentError_SignerError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_InvalidInvoice { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_LwkError { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_ReceiveError { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_Refunded { + err: *mut wire_cst_list_prim_u_8_strict, + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_SendError { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentError_SignerError { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_buy_bitcoin_request { + provider: i32, + amount_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_buy_bitcoin_response { + provider: i32, + amount_sat: u64, + fees_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_pay_onchain_request { + receiver_amount_sat: u64, + sat_per_vbyte: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_pay_onchain_response { + receiver_amount_sat: u64, + claim_fees_sat: u64, + total_fees_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_receive_onchain_request { + payer_amount_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_receive_onchain_response { + payer_amount_sat: u64, + fees_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_receive_payment_request { + payer_amount_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_receive_payment_response { + payer_amount_sat: u64, + fees_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + refund_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 { + tx_vsize: u32, + tx_fee_sat: u64, + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_send_request { + invoice: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_send_response { + invoice: *mut wire_cst_list_prim_u_8_strict, + fees_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_response { + address: *mut wire_cst_list_prim_u_8_strict, + bip21: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_request { + description: *mut wire_cst_list_prim_u_8_strict, + prepare_res: wire_cst_prepare_receive_payment_response, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_response { + id: *mut wire_cst_list_prim_u_8_strict, + invoice: *mut wire_cst_list_prim_u_8_strict, + } + #[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_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + refund_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_refundable_swap { + swap_address: *mut wire_cst_list_prim_u_8_strict, + timestamp: u32, + amount_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_restore_request { + backup_path: *mut wire_cst_list_prim_u_8_strict, + } + #[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_sdk_error { + tag: i32, + kind: SdkErrorKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SdkErrorKind { + Generic: wire_cst_SdkError_Generic, + ServiceConnectivity: wire_cst_SdkError_ServiceConnectivity, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkError_ServiceConnectivity { + err: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sdk_event { + tag: i32, + kind: SdkEventKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SdkEventKind { + PaymentFailed: wire_cst_SdkEvent_PaymentFailed, + PaymentPending: wire_cst_SdkEvent_PaymentPending, + PaymentRefunded: wire_cst_SdkEvent_PaymentRefunded, + PaymentRefundPending: wire_cst_SdkEvent_PaymentRefundPending, + PaymentSucceeded: wire_cst_SdkEvent_PaymentSucceeded, + PaymentWaitingConfirmation: wire_cst_SdkEvent_PaymentWaitingConfirmation, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentFailed { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentPending { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentRefunded { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentRefundPending { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentSucceeded { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SdkEvent_PaymentWaitingConfirmation { + details: *mut wire_cst_payment, + } + #[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_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_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_url_success_action_data { + description: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, + matches_callback_domain: bool, + } +} #[cfg(not(target_family = "wasm"))] pub use io::*; diff --git a/packages/dart/lib/src/bindings.dart b/packages/dart/lib/src/bindings.dart index c1a78b6a4..b8cbc9a07 100644 --- a/packages/dart/lib/src/bindings.dart +++ b/packages/dart/lib/src/bindings.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/packages/dart/lib/src/bindings/duplicates.dart b/packages/dart/lib/src/bindings/duplicates.dart index 07f98533f..068664ec9 100644 --- a/packages/dart/lib/src/bindings/duplicates.dart +++ b/packages/dart/lib/src/bindings/duplicates.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/packages/dart/lib/src/error.dart b/packages/dart/lib/src/error.dart index cfc2f95c3..71a3a3c93 100644 --- a/packages/dart/lib/src/error.dart +++ b/packages/dart/lib/src/error.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/packages/dart/lib/src/frb_generated.dart b/packages/dart/lib/src/frb_generated.dart index 8cd039e3a..17e38c2a9 100644 --- a/packages/dart/lib/src/frb_generated.dart +++ b/packages/dart/lib/src/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -52,7 +52,7 @@ class RustLib extends BaseEntrypoint { ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0'; + String get codegenVersion => '2.2.0'; @override int get rustContentHash => -119028624; diff --git a/packages/dart/lib/src/frb_generated.io.dart b/packages/dart/lib/src/frb_generated.io.dart index 4830c6d21..60885844f 100644 --- a/packages/dart/lib/src/frb_generated.io.dart +++ b/packages/dart/lib/src/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field diff --git a/packages/dart/lib/src/model.dart b/packages/dart/lib/src/model.dart index 701979592..eed1fb400 100644 --- a/packages/dart/lib/src/model.dart +++ b/packages/dart/lib/src/model.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// Generated by `flutter_rust_bridge`@ 2.2.0. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/packages/dart/pubspec.yaml b/packages/dart/pubspec.yaml index feb304ec6..1f94c3e30 100644 --- a/packages/dart/pubspec.yaml +++ b/packages/dart/pubspec.yaml @@ -24,6 +24,6 @@ dev_dependencies: test: ^1.25.5 dependencies: ffi: ^2.1.2 - flutter_rust_bridge: 2.0.0 + flutter_rust_bridge: 2.2.0 freezed_annotation: ^2.4.1 meta: ^1.12.0 # meta is pinned to version 1.12.0 by integration_test from the flutter SDK. diff --git a/packages/flutter/example/pubspec.lock b/packages/flutter/example/pubspec.lock index 4375ad956..99ecdc8ac 100644 --- a/packages/flutter/example/pubspec.lock +++ b/packages/flutter/example/pubspec.lock @@ -108,10 +108,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" ffigen: dependency: transitive description: @@ -152,10 +152,10 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: f703c4b50e253e53efc604d50281bbaefe82d615856f8ae1e7625518ae252e98 + sha256: "7beb9cb4690916a6c4fd151d91dba53555ea258dbc029dd5f1bfba2e7bd32b86" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.2.0" flutter_secure_storage: dependency: "direct main" description: @@ -543,10 +543,10 @@ packages: dependency: transitive description: name: win32 - sha256: "015002c060f1ae9f41a818f2d5640389cc05283e368be19dc8d77cecb43c40c9" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.5.3" + version: "5.5.4" xdg_directories: dependency: transitive description: diff --git a/packages/flutter/example/pubspec.yaml b/packages/flutter/example/pubspec.yaml index 6a4b550e8..d25634b12 100644 --- a/packages/flutter/example/pubspec.yaml +++ b/packages/flutter/example/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: flutter: sdk: flutter - flutter_rust_bridge: 2.0.0 + flutter_rust_bridge: 2.2.0 flutter_breez_liquid: git: url: https://github.com/breez/breez-sdk-liquid-flutter