diff --git a/libs/Cargo.toml b/libs/Cargo.toml index eee2c9fe5..4a97f2f78 100644 --- a/libs/Cargo.toml +++ b/libs/Cargo.toml @@ -21,7 +21,7 @@ aes = "0.8" anyhow = { version = "1.0.79", features = ["backtrace"] } base64 = "0.13.0" bitcoin = "=0.29.2" # Same version as used in gl-client -flutter_rust_bridge = "=2.0.0" +flutter_rust_bridge = ">=2.0.0, =2.5.1" # Pin the reqwest dependency until macOS linker issue is fixed: https://github.com/seanmonstar/reqwest/issues/2006 hex = "0.4" lightning = "=0.0.118" # Same version as used in gl-client diff --git a/libs/sdk-core/Cargo.toml b/libs/sdk-core/Cargo.toml index c55b66d26..627794ea0 100644 --- a/libs/sdk-core/Cargo.toml +++ b/libs/sdk-core/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["staticlib", "cdylib", "lib"] [dependencies] aes = { workspace = true } anyhow = { workspace = true } -flutter_rust_bridge = { workspace = true } +flutter_rust_bridge = "=2.5.1" hex = { workspace = true } gl-client = { git = "https://github.com/Blockstream/greenlight.git", features = [ "permissive", diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index b1c858f5d..0f84ef23c 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -209,6 +209,7 @@ pub struct _MessageSuccessActionData { pub struct _UrlSuccessActionData { pub description: String, pub url: String, + pub matches_callback_domain: bool, } #[frb(mirror(LnUrlPayErrorData))] diff --git a/libs/sdk-core/src/bridge_generated.io.rs b/libs/sdk-core/src/bridge_generated.io.rs deleted file mode 100644 index f67df9ca1..000000000 --- a/libs/sdk-core/src/bridge_generated.io.rs +++ /dev/null @@ -1,2099 +0,0 @@ -use super::*; -// Section: wire functions - -#[no_mangle] -pub extern "C" fn wire_connect(port_: i64, req: *mut wire_ConnectRequest) { - wire_connect_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_is_initialized(port_: i64) { - wire_is_initialized_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_sync(port_: i64) { - wire_sync_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_node_credentials(port_: i64) { - wire_node_credentials_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_node_info(port_: i64) { - wire_node_info_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_configure_node(port_: i64, req: *mut wire_ConfigureNodeRequest) { - wire_configure_node_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_disconnect(port_: i64) { - wire_disconnect_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_sign_message(port_: i64, req: *mut wire_SignMessageRequest) { - wire_sign_message_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_check_message(port_: i64, req: *mut wire_CheckMessageRequest) { - wire_check_message_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_mnemonic_to_seed(port_: i64, phrase: *mut wire_uint_8_list) { - wire_mnemonic_to_seed_impl(port_, phrase) -} - -#[no_mangle] -pub extern "C" fn wire_default_config( - port_: i64, - env_type: i32, - api_key: *mut wire_uint_8_list, - node_config: *mut wire_NodeConfig, -) { - wire_default_config_impl(port_, env_type, api_key, node_config) -} - -#[no_mangle] -pub extern "C" fn wire_static_backup(port_: i64, req: *mut wire_StaticBackupRequest) { - wire_static_backup_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_service_health_check(port_: i64, api_key: *mut wire_uint_8_list) { - wire_service_health_check_impl(port_, api_key) -} - -#[no_mangle] -pub extern "C" fn wire_breez_events_stream(port_: i64) { - wire_breez_events_stream_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_breez_log_stream(port_: i64) { - wire_breez_log_stream_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_list_lsps(port_: i64) { - wire_list_lsps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_connect_lsp(port_: i64, lsp_id: *mut wire_uint_8_list) { - wire_connect_lsp_impl(port_, lsp_id) -} - -#[no_mangle] -pub extern "C" fn wire_lsp_id(port_: i64) { - wire_lsp_id_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_lsp_info(port_: i64, id: *mut wire_uint_8_list) { - wire_fetch_lsp_info_impl(port_, id) -} - -#[no_mangle] -pub extern "C" fn wire_lsp_info(port_: i64) { - wire_lsp_info_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_close_lsp_channels(port_: i64) { - wire_close_lsp_channels_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_register_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) { - wire_register_webhook_impl(port_, webhook_url) -} - -#[no_mangle] -pub extern "C" fn wire_unregister_webhook(port_: i64, webhook_url: *mut wire_uint_8_list) { - wire_unregister_webhook_impl(port_, webhook_url) -} - -#[no_mangle] -pub extern "C" fn wire_backup(port_: i64) { - wire_backup_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_backup_status(port_: i64) { - wire_backup_status_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_parse_invoice(port_: i64, invoice: *mut wire_uint_8_list) { - wire_parse_invoice_impl(port_, invoice) -} - -#[no_mangle] -pub extern "C" fn wire_parse_input(port_: i64, input: *mut wire_uint_8_list) { - wire_parse_input_impl(port_, input) -} - -#[no_mangle] -pub extern "C" fn wire_list_payments(port_: i64, req: *mut wire_ListPaymentsRequest) { - wire_list_payments_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_payment_by_hash(port_: i64, hash: *mut wire_uint_8_list) { - wire_payment_by_hash_impl(port_, hash) -} - -#[no_mangle] -pub extern "C" fn wire_set_payment_metadata( - port_: i64, - hash: *mut wire_uint_8_list, - metadata: *mut wire_uint_8_list, -) { - wire_set_payment_metadata_impl(port_, hash, metadata) -} - -#[no_mangle] -pub extern "C" fn wire_send_payment(port_: i64, req: *mut wire_SendPaymentRequest) { - wire_send_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_send_spontaneous_payment( - port_: i64, - req: *mut wire_SendSpontaneousPaymentRequest, -) { - wire_send_spontaneous_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_receive_payment(port_: i64, req: *mut wire_ReceivePaymentRequest) { - wire_receive_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_pay(port_: i64, req: *mut wire_LnUrlPayRequest) { - wire_lnurl_pay_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_withdraw(port_: i64, req: *mut wire_LnUrlWithdrawRequest) { - wire_lnurl_withdraw_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_lnurl_auth(port_: i64, req_data: *mut wire_LnUrlAuthRequestData) { - wire_lnurl_auth_impl(port_, req_data) -} - -#[no_mangle] -pub extern "C" fn wire_report_issue(port_: i64, req: *mut wire_ReportIssueRequest) { - wire_report_issue_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_fiat_rates(port_: i64) { - wire_fetch_fiat_rates_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_list_fiat_currencies(port_: i64) { - wire_list_fiat_currencies_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_max_reverse_swap_amount(port_: i64) { - wire_max_reverse_swap_amount_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_send_onchain(port_: i64, req: *mut wire_SendOnchainRequest) { - wire_send_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_pay_onchain(port_: i64, req: *mut wire_PayOnchainRequest) { - wire_pay_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_receive_onchain(port_: i64, req: *mut wire_ReceiveOnchainRequest) { - wire_receive_onchain_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_buy_bitcoin(port_: i64, req: *mut wire_BuyBitcoinRequest) { - wire_buy_bitcoin_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_redeem_onchain_funds(port_: i64, req: *mut wire_RedeemOnchainFundsRequest) { - wire_redeem_onchain_funds_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_redeem_onchain_funds( - port_: i64, - req: *mut wire_PrepareRedeemOnchainFundsRequest, -) { - wire_prepare_redeem_onchain_funds_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_list_refundables(port_: i64) { - wire_list_refundables_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_refund(port_: i64, req: *mut wire_PrepareRefundRequest) { - wire_prepare_refund_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_refund(port_: i64, req: *mut wire_RefundRequest) { - wire_refund_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_rescan_swaps(port_: i64) { - wire_rescan_swaps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_redeem_swap(port_: i64, swap_address: *mut wire_uint_8_list) { - wire_redeem_swap_impl(port_, swap_address) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_swap(port_: i64) { - wire_in_progress_swap_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_reverse_swaps(port_: i64) { - wire_in_progress_reverse_swaps_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_claim_reverse_swap(port_: i64, lockup_address: *mut wire_uint_8_list) { - wire_claim_reverse_swap_impl(port_, lockup_address) -} - -#[no_mangle] -pub extern "C" fn wire_open_channel_fee(port_: i64, req: *mut wire_OpenChannelFeeRequest) { - wire_open_channel_fee_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_fetch_reverse_swap_fees(port_: i64, req: *mut wire_ReverseSwapFeesRequest) { - wire_fetch_reverse_swap_fees_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_onchain_payment_limits(port_: i64) { - wire_onchain_payment_limits_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_prepare_onchain_payment( - port_: i64, - req: *mut wire_PrepareOnchainPaymentRequest, -) { - wire_prepare_onchain_payment_impl(port_, req) -} - -#[no_mangle] -pub extern "C" fn wire_in_progress_onchain_payments(port_: i64) { - wire_in_progress_onchain_payments_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_recommended_fees(port_: i64) { - wire_recommended_fees_impl(port_) -} - -#[no_mangle] -pub extern "C" fn wire_execute_command(port_: i64, command: *mut wire_uint_8_list) { - wire_execute_command_impl(port_, command) -} - -#[no_mangle] -pub extern "C" fn wire_generate_diagnostic_data(port_: i64) { - wire_generate_diagnostic_data_impl(port_) -} - -// Section: allocate functions - -#[no_mangle] -pub extern "C" fn new_box_autoadd_bool_0(value: bool) -> *mut bool { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_buy_bitcoin_request_0() -> *mut wire_BuyBitcoinRequest { - support::new_leak_box_ptr(wire_BuyBitcoinRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_check_message_request_0() -> *mut wire_CheckMessageRequest { - support::new_leak_box_ptr(wire_CheckMessageRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_configure_node_request_0() -> *mut wire_ConfigureNodeRequest { - support::new_leak_box_ptr(wire_ConfigureNodeRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_connect_request_0() -> *mut wire_ConnectRequest { - support::new_leak_box_ptr(wire_ConnectRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_greenlight_credentials_0() -> *mut wire_GreenlightCredentials { - support::new_leak_box_ptr(wire_GreenlightCredentials::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_greenlight_node_config_0() -> *mut wire_GreenlightNodeConfig { - support::new_leak_box_ptr(wire_GreenlightNodeConfig::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_i64_0(value: i64) -> *mut i64 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_list_payments_request_0() -> *mut wire_ListPaymentsRequest { - support::new_leak_box_ptr(wire_ListPaymentsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_auth_request_data_0() -> *mut wire_LnUrlAuthRequestData { - support::new_leak_box_ptr(wire_LnUrlAuthRequestData::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_pay_request_0() -> *mut wire_LnUrlPayRequest { - support::new_leak_box_ptr(wire_LnUrlPayRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_ln_url_withdraw_request_0() -> *mut wire_LnUrlWithdrawRequest { - support::new_leak_box_ptr(wire_LnUrlWithdrawRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_node_config_0() -> *mut wire_NodeConfig { - support::new_leak_box_ptr(wire_NodeConfig::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_open_channel_fee_request_0() -> *mut wire_OpenChannelFeeRequest { - support::new_leak_box_ptr(wire_OpenChannelFeeRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_opening_fee_params_0() -> *mut wire_OpeningFeeParams { - support::new_leak_box_ptr(wire_OpeningFeeParams::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_pay_onchain_request_0() -> *mut wire_PayOnchainRequest { - support::new_leak_box_ptr(wire_PayOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_onchain_payment_request_0( -) -> *mut wire_PrepareOnchainPaymentRequest { - support::new_leak_box_ptr(wire_PrepareOnchainPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_redeem_onchain_funds_request_0( -) -> *mut wire_PrepareRedeemOnchainFundsRequest { - support::new_leak_box_ptr(wire_PrepareRedeemOnchainFundsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_prepare_refund_request_0() -> *mut wire_PrepareRefundRequest { - support::new_leak_box_ptr(wire_PrepareRefundRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_receive_onchain_request_0() -> *mut wire_ReceiveOnchainRequest { - support::new_leak_box_ptr(wire_ReceiveOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_receive_payment_request_0() -> *mut wire_ReceivePaymentRequest { - support::new_leak_box_ptr(wire_ReceivePaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_redeem_onchain_funds_request_0( -) -> *mut wire_RedeemOnchainFundsRequest { - support::new_leak_box_ptr(wire_RedeemOnchainFundsRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_refund_request_0() -> *mut wire_RefundRequest { - support::new_leak_box_ptr(wire_RefundRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_report_issue_request_0() -> *mut wire_ReportIssueRequest { - support::new_leak_box_ptr(wire_ReportIssueRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_report_payment_failure_details_0( -) -> *mut wire_ReportPaymentFailureDetails { - support::new_leak_box_ptr(wire_ReportPaymentFailureDetails::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_reverse_swap_fees_request_0() -> *mut wire_ReverseSwapFeesRequest -{ - support::new_leak_box_ptr(wire_ReverseSwapFeesRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_onchain_request_0() -> *mut wire_SendOnchainRequest { - support::new_leak_box_ptr(wire_SendOnchainRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_payment_request_0() -> *mut wire_SendPaymentRequest { - support::new_leak_box_ptr(wire_SendPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_send_spontaneous_payment_request_0( -) -> *mut wire_SendSpontaneousPaymentRequest { - support::new_leak_box_ptr(wire_SendSpontaneousPaymentRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_sign_message_request_0() -> *mut wire_SignMessageRequest { - support::new_leak_box_ptr(wire_SignMessageRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_static_backup_request_0() -> *mut wire_StaticBackupRequest { - support::new_leak_box_ptr(wire_StaticBackupRequest::new_with_null_ptr()) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_u32_0(value: u32) -> *mut u32 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_box_autoadd_u64_0(value: u64) -> *mut u64 { - support::new_leak_box_ptr(value) -} - -#[no_mangle] -pub extern "C" fn new_list_metadata_filter_0(len: i32) -> *mut wire_list_metadata_filter { - let wrap = wire_list_metadata_filter { - ptr: support::new_leak_vec_ptr(::new_with_null_ptr(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_list_payment_type_filter_0(len: i32) -> *mut wire_list_payment_type_filter { - let wrap = wire_list_payment_type_filter { - ptr: support::new_leak_vec_ptr(Default::default(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_list_tlv_entry_0(len: i32) -> *mut wire_list_tlv_entry { - let wrap = wire_list_tlv_entry { - ptr: support::new_leak_vec_ptr(::new_with_null_ptr(), len), - len, - }; - support::new_leak_box_ptr(wrap) -} - -#[no_mangle] -pub extern "C" fn new_uint_8_list_0(len: i32) -> *mut wire_uint_8_list { - let ans = wire_uint_8_list { - ptr: support::new_leak_vec_ptr(Default::default(), len), - len, - }; - support::new_leak_box_ptr(ans) -} - -// Section: related functions - -// Section: impl Wire2Api - -impl Wire2Api for *mut wire_uint_8_list { - fn wire2api(self) -> String { - let vec: Vec = self.wire2api(); - String::from_utf8_lossy(&vec).into_owned() - } -} - -impl Wire2Api for *mut bool { - fn wire2api(self) -> bool { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut wire_BuyBitcoinRequest { - fn wire2api(self) -> BuyBitcoinRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_CheckMessageRequest { - fn wire2api(self) -> CheckMessageRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ConfigureNodeRequest { - fn wire2api(self) -> ConfigureNodeRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ConnectRequest { - fn wire2api(self) -> ConnectRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_GreenlightCredentials { - fn wire2api(self) -> GreenlightCredentials { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_GreenlightNodeConfig { - fn wire2api(self) -> GreenlightNodeConfig { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut i64 { - fn wire2api(self) -> i64 { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut wire_ListPaymentsRequest { - fn wire2api(self) -> ListPaymentsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlAuthRequestData { - fn wire2api(self) -> LnUrlAuthRequestData { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlPayRequest { - fn wire2api(self) -> LnUrlPayRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_LnUrlWithdrawRequest { - fn wire2api(self) -> LnUrlWithdrawRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_NodeConfig { - fn wire2api(self) -> NodeConfig { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_OpenChannelFeeRequest { - fn wire2api(self) -> OpenChannelFeeRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_OpeningFeeParams { - fn wire2api(self) -> OpeningFeeParams { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PayOnchainRequest { - fn wire2api(self) -> PayOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareOnchainPaymentRequest { - fn wire2api(self) -> PrepareOnchainPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareRedeemOnchainFundsRequest { - fn wire2api(self) -> PrepareRedeemOnchainFundsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_PrepareRefundRequest { - fn wire2api(self) -> PrepareRefundRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReceiveOnchainRequest { - fn wire2api(self) -> ReceiveOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReceivePaymentRequest { - fn wire2api(self) -> ReceivePaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_RedeemOnchainFundsRequest { - fn wire2api(self) -> RedeemOnchainFundsRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_RefundRequest { - fn wire2api(self) -> RefundRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReportIssueRequest { - fn wire2api(self) -> ReportIssueRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReportPaymentFailureDetails { - fn wire2api(self) -> ReportPaymentFailureDetails { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_ReverseSwapFeesRequest { - fn wire2api(self) -> ReverseSwapFeesRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendOnchainRequest { - fn wire2api(self) -> SendOnchainRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendPaymentRequest { - fn wire2api(self) -> SendPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SendSpontaneousPaymentRequest { - fn wire2api(self) -> SendSpontaneousPaymentRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_SignMessageRequest { - fn wire2api(self) -> SignMessageRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut wire_StaticBackupRequest { - fn wire2api(self) -> StaticBackupRequest { - let wrap = unsafe { support::box_from_leak_ptr(self) }; - Wire2Api::::wire2api(*wrap).into() - } -} -impl Wire2Api for *mut u32 { - fn wire2api(self) -> u32 { - unsafe { *support::box_from_leak_ptr(self) } - } -} -impl Wire2Api for *mut u64 { - fn wire2api(self) -> u64 { - unsafe { *support::box_from_leak_ptr(self) } - } -} - -impl Wire2Api for wire_BuyBitcoinRequest { - fn wire2api(self) -> BuyBitcoinRequest { - BuyBitcoinRequest { - provider: self.provider.wire2api(), - opening_fee_params: self.opening_fee_params.wire2api(), - redirect_url: self.redirect_url.wire2api(), - } - } -} -impl Wire2Api for wire_CheckMessageRequest { - fn wire2api(self) -> CheckMessageRequest { - CheckMessageRequest { - message: self.message.wire2api(), - pubkey: self.pubkey.wire2api(), - signature: self.signature.wire2api(), - } - } -} -impl Wire2Api for wire_Config { - fn wire2api(self) -> Config { - Config { - breezserver: self.breezserver.wire2api(), - chainnotifier_url: self.chainnotifier_url.wire2api(), - mempoolspace_url: self.mempoolspace_url.wire2api(), - working_dir: self.working_dir.wire2api(), - network: self.network.wire2api(), - payment_timeout_sec: self.payment_timeout_sec.wire2api(), - default_lsp_id: self.default_lsp_id.wire2api(), - api_key: self.api_key.wire2api(), - maxfee_percent: self.maxfee_percent.wire2api(), - exemptfee_msat: self.exemptfee_msat.wire2api(), - node_config: self.node_config.wire2api(), - } - } -} -impl Wire2Api for wire_ConfigureNodeRequest { - fn wire2api(self) -> ConfigureNodeRequest { - ConfigureNodeRequest { - close_to_address: self.close_to_address.wire2api(), - } - } -} -impl Wire2Api for wire_ConnectRequest { - fn wire2api(self) -> ConnectRequest { - ConnectRequest { - config: self.config.wire2api(), - seed: self.seed.wire2api(), - restore_only: self.restore_only.wire2api(), - } - } -} - -impl Wire2Api for wire_GreenlightCredentials { - fn wire2api(self) -> GreenlightCredentials { - GreenlightCredentials { - developer_key: self.developer_key.wire2api(), - developer_cert: self.developer_cert.wire2api(), - } - } -} -impl Wire2Api for wire_GreenlightNodeConfig { - fn wire2api(self) -> GreenlightNodeConfig { - GreenlightNodeConfig { - partner_credentials: self.partner_credentials.wire2api(), - invite_code: self.invite_code.wire2api(), - } - } -} - -impl Wire2Api> for *mut wire_list_metadata_filter { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api> for *mut wire_list_payment_type_filter { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api for wire_ListPaymentsRequest { - fn wire2api(self) -> ListPaymentsRequest { - ListPaymentsRequest { - filters: self.filters.wire2api(), - metadata_filters: self.metadata_filters.wire2api(), - from_timestamp: self.from_timestamp.wire2api(), - to_timestamp: self.to_timestamp.wire2api(), - include_failures: self.include_failures.wire2api(), - offset: self.offset.wire2api(), - limit: self.limit.wire2api(), - } - } -} -impl Wire2Api> for *mut wire_list_tlv_entry { - fn wire2api(self) -> Vec { - let vec = unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - }; - vec.into_iter().map(Wire2Api::wire2api).collect() - } -} -impl Wire2Api for wire_LnUrlAuthRequestData { - fn wire2api(self) -> LnUrlAuthRequestData { - LnUrlAuthRequestData { - k1: self.k1.wire2api(), - action: self.action.wire2api(), - domain: self.domain.wire2api(), - url: self.url.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlPayRequest { - fn wire2api(self) -> LnUrlPayRequest { - LnUrlPayRequest { - data: self.data.wire2api(), - amount_msat: self.amount_msat.wire2api(), - use_trampoline: self.use_trampoline.wire2api(), - comment: self.comment.wire2api(), - payment_label: self.payment_label.wire2api(), - validate_success_action_url: self.validate_success_action_url.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlPayRequestData { - fn wire2api(self) -> LnUrlPayRequestData { - LnUrlPayRequestData { - callback: self.callback.wire2api(), - min_sendable: self.min_sendable.wire2api(), - max_sendable: self.max_sendable.wire2api(), - metadata_str: self.metadata_str.wire2api(), - comment_allowed: self.comment_allowed.wire2api(), - domain: self.domain.wire2api(), - allows_nostr: self.allows_nostr.wire2api(), - nostr_pubkey: self.nostr_pubkey.wire2api(), - ln_address: self.ln_address.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlWithdrawRequest { - fn wire2api(self) -> LnUrlWithdrawRequest { - LnUrlWithdrawRequest { - data: self.data.wire2api(), - amount_msat: self.amount_msat.wire2api(), - description: self.description.wire2api(), - } - } -} -impl Wire2Api for wire_LnUrlWithdrawRequestData { - fn wire2api(self) -> LnUrlWithdrawRequestData { - LnUrlWithdrawRequestData { - callback: self.callback.wire2api(), - k1: self.k1.wire2api(), - default_description: self.default_description.wire2api(), - min_withdrawable: self.min_withdrawable.wire2api(), - max_withdrawable: self.max_withdrawable.wire2api(), - } - } -} -impl Wire2Api for wire_MetadataFilter { - fn wire2api(self) -> MetadataFilter { - MetadataFilter { - json_path: self.json_path.wire2api(), - json_value: self.json_value.wire2api(), - } - } -} - -impl Wire2Api for wire_NodeConfig { - fn wire2api(self) -> NodeConfig { - match self.tag { - 0 => unsafe { - let ans = support::box_from_leak_ptr(self.kind); - let ans = support::box_from_leak_ptr(ans.Greenlight); - NodeConfig::Greenlight { - config: ans.config.wire2api(), - } - }, - _ => unreachable!(), - } - } -} -impl Wire2Api for wire_OpenChannelFeeRequest { - fn wire2api(self) -> OpenChannelFeeRequest { - OpenChannelFeeRequest { - amount_msat: self.amount_msat.wire2api(), - expiry: self.expiry.wire2api(), - } - } -} -impl Wire2Api for wire_OpeningFeeParams { - fn wire2api(self) -> OpeningFeeParams { - OpeningFeeParams { - min_msat: self.min_msat.wire2api(), - proportional: self.proportional.wire2api(), - valid_until: self.valid_until.wire2api(), - max_idle_time: self.max_idle_time.wire2api(), - max_client_to_self_delay: self.max_client_to_self_delay.wire2api(), - promise: self.promise.wire2api(), - } - } -} - -impl Wire2Api for wire_PayOnchainRequest { - fn wire2api(self) -> PayOnchainRequest { - PayOnchainRequest { - recipient_address: self.recipient_address.wire2api(), - prepare_res: self.prepare_res.wire2api(), - } - } -} - -impl Wire2Api for wire_PrepareOnchainPaymentRequest { - fn wire2api(self) -> PrepareOnchainPaymentRequest { - PrepareOnchainPaymentRequest { - amount_sat: self.amount_sat.wire2api(), - amount_type: self.amount_type.wire2api(), - claim_tx_feerate: self.claim_tx_feerate.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareOnchainPaymentResponse { - fn wire2api(self) -> PrepareOnchainPaymentResponse { - PrepareOnchainPaymentResponse { - fees_hash: self.fees_hash.wire2api(), - fees_percentage: self.fees_percentage.wire2api(), - fees_lockup: self.fees_lockup.wire2api(), - fees_claim: self.fees_claim.wire2api(), - sender_amount_sat: self.sender_amount_sat.wire2api(), - recipient_amount_sat: self.recipient_amount_sat.wire2api(), - total_fees: self.total_fees.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareRedeemOnchainFundsRequest { - fn wire2api(self) -> PrepareRedeemOnchainFundsRequest { - PrepareRedeemOnchainFundsRequest { - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_PrepareRefundRequest { - fn wire2api(self) -> PrepareRefundRequest { - PrepareRefundRequest { - swap_address: self.swap_address.wire2api(), - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_ReceiveOnchainRequest { - fn wire2api(self) -> ReceiveOnchainRequest { - ReceiveOnchainRequest { - opening_fee_params: self.opening_fee_params.wire2api(), - } - } -} -impl Wire2Api for wire_ReceivePaymentRequest { - fn wire2api(self) -> ReceivePaymentRequest { - ReceivePaymentRequest { - amount_msat: self.amount_msat.wire2api(), - description: self.description.wire2api(), - preimage: self.preimage.wire2api(), - opening_fee_params: self.opening_fee_params.wire2api(), - use_description_hash: self.use_description_hash.wire2api(), - expiry: self.expiry.wire2api(), - cltv: self.cltv.wire2api(), - } - } -} -impl Wire2Api for wire_RedeemOnchainFundsRequest { - fn wire2api(self) -> RedeemOnchainFundsRequest { - RedeemOnchainFundsRequest { - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_RefundRequest { - fn wire2api(self) -> RefundRequest { - RefundRequest { - swap_address: self.swap_address.wire2api(), - to_address: self.to_address.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_ReportIssueRequest { - fn wire2api(self) -> ReportIssueRequest { - match self.tag { - 0 => unsafe { - let ans = support::box_from_leak_ptr(self.kind); - let ans = support::box_from_leak_ptr(ans.PaymentFailure); - ReportIssueRequest::PaymentFailure { - data: ans.data.wire2api(), - } - }, - _ => unreachable!(), - } - } -} -impl Wire2Api for wire_ReportPaymentFailureDetails { - fn wire2api(self) -> ReportPaymentFailureDetails { - ReportPaymentFailureDetails { - payment_hash: self.payment_hash.wire2api(), - comment: self.comment.wire2api(), - } - } -} -impl Wire2Api for wire_ReverseSwapFeesRequest { - fn wire2api(self) -> ReverseSwapFeesRequest { - ReverseSwapFeesRequest { - send_amount_sat: self.send_amount_sat.wire2api(), - claim_tx_feerate: self.claim_tx_feerate.wire2api(), - } - } -} -impl Wire2Api for wire_SendOnchainRequest { - fn wire2api(self) -> SendOnchainRequest { - SendOnchainRequest { - amount_sat: self.amount_sat.wire2api(), - onchain_recipient_address: self.onchain_recipient_address.wire2api(), - pair_hash: self.pair_hash.wire2api(), - sat_per_vbyte: self.sat_per_vbyte.wire2api(), - } - } -} -impl Wire2Api for wire_SendPaymentRequest { - fn wire2api(self) -> SendPaymentRequest { - SendPaymentRequest { - bolt11: self.bolt11.wire2api(), - use_trampoline: self.use_trampoline.wire2api(), - amount_msat: self.amount_msat.wire2api(), - label: self.label.wire2api(), - } - } -} -impl Wire2Api for wire_SendSpontaneousPaymentRequest { - fn wire2api(self) -> SendSpontaneousPaymentRequest { - SendSpontaneousPaymentRequest { - node_id: self.node_id.wire2api(), - amount_msat: self.amount_msat.wire2api(), - extra_tlvs: self.extra_tlvs.wire2api(), - label: self.label.wire2api(), - } - } -} -impl Wire2Api for wire_SignMessageRequest { - fn wire2api(self) -> SignMessageRequest { - SignMessageRequest { - message: self.message.wire2api(), - } - } -} -impl Wire2Api for wire_StaticBackupRequest { - fn wire2api(self) -> StaticBackupRequest { - StaticBackupRequest { - working_dir: self.working_dir.wire2api(), - } - } -} - -impl Wire2Api for wire_TlvEntry { - fn wire2api(self) -> TlvEntry { - TlvEntry { - field_number: self.field_number.wire2api(), - value: self.value.wire2api(), - } - } -} - -impl Wire2Api> for *mut wire_uint_8_list { - fn wire2api(self) -> Vec { - unsafe { - let wrap = support::box_from_leak_ptr(self); - support::vec_from_leak_ptr(wrap.ptr, wrap.len) - } - } -} -// Section: wire structs - -#[repr(C)] -#[derive(Clone)] -pub struct wire_BuyBitcoinRequest { - provider: i32, - opening_fee_params: *mut wire_OpeningFeeParams, - redirect_url: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_CheckMessageRequest { - message: *mut wire_uint_8_list, - pubkey: *mut wire_uint_8_list, - signature: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_Config { - breezserver: *mut wire_uint_8_list, - chainnotifier_url: *mut wire_uint_8_list, - mempoolspace_url: *mut wire_uint_8_list, - working_dir: *mut wire_uint_8_list, - network: i32, - payment_timeout_sec: u32, - default_lsp_id: *mut wire_uint_8_list, - api_key: *mut wire_uint_8_list, - maxfee_percent: f64, - exemptfee_msat: u64, - node_config: wire_NodeConfig, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ConfigureNodeRequest { - close_to_address: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ConnectRequest { - config: wire_Config, - seed: *mut wire_uint_8_list, - restore_only: *mut bool, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_GreenlightCredentials { - developer_key: *mut wire_uint_8_list, - developer_cert: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_GreenlightNodeConfig { - partner_credentials: *mut wire_GreenlightCredentials, - invite_code: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_metadata_filter { - ptr: *mut wire_MetadataFilter, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_payment_type_filter { - ptr: *mut i32, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ListPaymentsRequest { - filters: *mut wire_list_payment_type_filter, - metadata_filters: *mut wire_list_metadata_filter, - from_timestamp: *mut i64, - to_timestamp: *mut i64, - include_failures: *mut bool, - offset: *mut u32, - limit: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_list_tlv_entry { - ptr: *mut wire_TlvEntry, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlAuthRequestData { - k1: *mut wire_uint_8_list, - action: *mut wire_uint_8_list, - domain: *mut wire_uint_8_list, - url: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlPayRequest { - data: wire_LnUrlPayRequestData, - amount_msat: u64, - use_trampoline: bool, - comment: *mut wire_uint_8_list, - payment_label: *mut wire_uint_8_list, - validate_success_action_url: *mut bool, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlPayRequestData { - callback: *mut wire_uint_8_list, - min_sendable: u64, - max_sendable: u64, - metadata_str: *mut wire_uint_8_list, - comment_allowed: u16, - domain: *mut wire_uint_8_list, - allows_nostr: bool, - nostr_pubkey: *mut wire_uint_8_list, - ln_address: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlWithdrawRequest { - data: wire_LnUrlWithdrawRequestData, - amount_msat: u64, - description: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_LnUrlWithdrawRequestData { - callback: *mut wire_uint_8_list, - k1: *mut wire_uint_8_list, - default_description: *mut wire_uint_8_list, - min_withdrawable: u64, - max_withdrawable: u64, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_MetadataFilter { - json_path: *mut wire_uint_8_list, - json_value: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_OpenChannelFeeRequest { - amount_msat: *mut u64, - expiry: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_OpeningFeeParams { - min_msat: u64, - proportional: u32, - valid_until: *mut wire_uint_8_list, - max_idle_time: u32, - max_client_to_self_delay: u32, - promise: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PayOnchainRequest { - recipient_address: *mut wire_uint_8_list, - prepare_res: wire_PrepareOnchainPaymentResponse, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareOnchainPaymentRequest { - amount_sat: u64, - amount_type: i32, - claim_tx_feerate: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareOnchainPaymentResponse { - fees_hash: *mut wire_uint_8_list, - fees_percentage: f64, - fees_lockup: u64, - fees_claim: u64, - sender_amount_sat: u64, - recipient_amount_sat: u64, - total_fees: u64, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareRedeemOnchainFundsRequest { - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_PrepareRefundRequest { - swap_address: *mut wire_uint_8_list, - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReceiveOnchainRequest { - opening_fee_params: *mut wire_OpeningFeeParams, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReceivePaymentRequest { - amount_msat: u64, - description: *mut wire_uint_8_list, - preimage: *mut wire_uint_8_list, - opening_fee_params: *mut wire_OpeningFeeParams, - use_description_hash: *mut bool, - expiry: *mut u32, - cltv: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_RedeemOnchainFundsRequest { - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_RefundRequest { - swap_address: *mut wire_uint_8_list, - to_address: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportPaymentFailureDetails { - payment_hash: *mut wire_uint_8_list, - comment: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReverseSwapFeesRequest { - send_amount_sat: *mut u64, - claim_tx_feerate: *mut u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendOnchainRequest { - amount_sat: u64, - onchain_recipient_address: *mut wire_uint_8_list, - pair_hash: *mut wire_uint_8_list, - sat_per_vbyte: u32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendPaymentRequest { - bolt11: *mut wire_uint_8_list, - use_trampoline: bool, - amount_msat: *mut u64, - label: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SendSpontaneousPaymentRequest { - node_id: *mut wire_uint_8_list, - amount_msat: u64, - extra_tlvs: *mut wire_list_tlv_entry, - label: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_SignMessageRequest { - message: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_StaticBackupRequest { - working_dir: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_TlvEntry { - field_number: u64, - value: *mut wire_uint_8_list, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_uint_8_list { - ptr: *mut u8, - len: i32, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_NodeConfig { - tag: i32, - kind: *mut NodeConfigKind, -} - -#[repr(C)] -pub union NodeConfigKind { - Greenlight: *mut wire_NodeConfig_Greenlight, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_NodeConfig_Greenlight { - config: *mut wire_GreenlightNodeConfig, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportIssueRequest { - tag: i32, - kind: *mut ReportIssueRequestKind, -} - -#[repr(C)] -pub union ReportIssueRequestKind { - PaymentFailure: *mut wire_ReportIssueRequest_PaymentFailure, -} - -#[repr(C)] -#[derive(Clone)] -pub struct wire_ReportIssueRequest_PaymentFailure { - data: *mut wire_ReportPaymentFailureDetails, -} - -// Section: impl NewWithNullPtr - -pub trait NewWithNullPtr { - fn new_with_null_ptr() -> Self; -} - -impl NewWithNullPtr for *mut T { - fn new_with_null_ptr() -> Self { - std::ptr::null_mut() - } -} - -impl NewWithNullPtr for wire_BuyBitcoinRequest { - fn new_with_null_ptr() -> Self { - Self { - provider: Default::default(), - opening_fee_params: core::ptr::null_mut(), - redirect_url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_BuyBitcoinRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_CheckMessageRequest { - fn new_with_null_ptr() -> Self { - Self { - message: core::ptr::null_mut(), - pubkey: core::ptr::null_mut(), - signature: core::ptr::null_mut(), - } - } -} - -impl Default for wire_CheckMessageRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_Config { - fn new_with_null_ptr() -> Self { - Self { - breezserver: core::ptr::null_mut(), - chainnotifier_url: core::ptr::null_mut(), - mempoolspace_url: core::ptr::null_mut(), - working_dir: core::ptr::null_mut(), - network: Default::default(), - payment_timeout_sec: Default::default(), - default_lsp_id: core::ptr::null_mut(), - api_key: core::ptr::null_mut(), - maxfee_percent: Default::default(), - exemptfee_msat: Default::default(), - node_config: Default::default(), - } - } -} - -impl Default for wire_Config { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ConfigureNodeRequest { - fn new_with_null_ptr() -> Self { - Self { - close_to_address: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ConfigureNodeRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ConnectRequest { - fn new_with_null_ptr() -> Self { - Self { - config: Default::default(), - seed: core::ptr::null_mut(), - restore_only: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ConnectRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_GreenlightCredentials { - fn new_with_null_ptr() -> Self { - Self { - developer_key: core::ptr::null_mut(), - developer_cert: core::ptr::null_mut(), - } - } -} - -impl Default for wire_GreenlightCredentials { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_GreenlightNodeConfig { - fn new_with_null_ptr() -> Self { - Self { - partner_credentials: core::ptr::null_mut(), - invite_code: core::ptr::null_mut(), - } - } -} - -impl Default for wire_GreenlightNodeConfig { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ListPaymentsRequest { - fn new_with_null_ptr() -> Self { - Self { - filters: core::ptr::null_mut(), - metadata_filters: core::ptr::null_mut(), - from_timestamp: core::ptr::null_mut(), - to_timestamp: core::ptr::null_mut(), - include_failures: core::ptr::null_mut(), - offset: core::ptr::null_mut(), - limit: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ListPaymentsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlAuthRequestData { - fn new_with_null_ptr() -> Self { - Self { - k1: core::ptr::null_mut(), - action: core::ptr::null_mut(), - domain: core::ptr::null_mut(), - url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlAuthRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlPayRequest { - fn new_with_null_ptr() -> Self { - Self { - data: Default::default(), - amount_msat: Default::default(), - use_trampoline: Default::default(), - comment: core::ptr::null_mut(), - payment_label: core::ptr::null_mut(), - validate_success_action_url: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlPayRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlPayRequestData { - fn new_with_null_ptr() -> Self { - Self { - callback: core::ptr::null_mut(), - min_sendable: Default::default(), - max_sendable: Default::default(), - metadata_str: core::ptr::null_mut(), - comment_allowed: Default::default(), - domain: core::ptr::null_mut(), - allows_nostr: Default::default(), - nostr_pubkey: core::ptr::null_mut(), - ln_address: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlPayRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlWithdrawRequest { - fn new_with_null_ptr() -> Self { - Self { - data: Default::default(), - amount_msat: Default::default(), - description: core::ptr::null_mut(), - } - } -} - -impl Default for wire_LnUrlWithdrawRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_LnUrlWithdrawRequestData { - fn new_with_null_ptr() -> Self { - Self { - callback: core::ptr::null_mut(), - k1: core::ptr::null_mut(), - default_description: core::ptr::null_mut(), - min_withdrawable: Default::default(), - max_withdrawable: Default::default(), - } - } -} - -impl Default for wire_LnUrlWithdrawRequestData { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_MetadataFilter { - fn new_with_null_ptr() -> Self { - Self { - json_path: core::ptr::null_mut(), - json_value: core::ptr::null_mut(), - } - } -} - -impl Default for wire_MetadataFilter { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl Default for wire_NodeConfig { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_NodeConfig { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: core::ptr::null_mut(), - } - } -} - -#[no_mangle] -pub extern "C" fn inflate_NodeConfig_Greenlight() -> *mut NodeConfigKind { - support::new_leak_box_ptr(NodeConfigKind { - Greenlight: support::new_leak_box_ptr(wire_NodeConfig_Greenlight { - config: core::ptr::null_mut(), - }), - }) -} - -impl NewWithNullPtr for wire_OpenChannelFeeRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_msat: core::ptr::null_mut(), - expiry: core::ptr::null_mut(), - } - } -} - -impl Default for wire_OpenChannelFeeRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_OpeningFeeParams { - fn new_with_null_ptr() -> Self { - Self { - min_msat: Default::default(), - proportional: Default::default(), - valid_until: core::ptr::null_mut(), - max_idle_time: Default::default(), - max_client_to_self_delay: Default::default(), - promise: core::ptr::null_mut(), - } - } -} - -impl Default for wire_OpeningFeeParams { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PayOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - recipient_address: core::ptr::null_mut(), - prepare_res: Default::default(), - } - } -} - -impl Default for wire_PayOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareOnchainPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_sat: Default::default(), - amount_type: Default::default(), - claim_tx_feerate: Default::default(), - } - } -} - -impl Default for wire_PrepareOnchainPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareOnchainPaymentResponse { - fn new_with_null_ptr() -> Self { - Self { - fees_hash: core::ptr::null_mut(), - fees_percentage: Default::default(), - fees_lockup: Default::default(), - fees_claim: Default::default(), - sender_amount_sat: Default::default(), - recipient_amount_sat: Default::default(), - total_fees: Default::default(), - } - } -} - -impl Default for wire_PrepareOnchainPaymentResponse { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareRedeemOnchainFundsRequest { - fn new_with_null_ptr() -> Self { - Self { - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_PrepareRedeemOnchainFundsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_PrepareRefundRequest { - fn new_with_null_ptr() -> Self { - Self { - swap_address: core::ptr::null_mut(), - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_PrepareRefundRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReceiveOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - opening_fee_params: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReceiveOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReceivePaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_msat: Default::default(), - description: core::ptr::null_mut(), - preimage: core::ptr::null_mut(), - opening_fee_params: core::ptr::null_mut(), - use_description_hash: core::ptr::null_mut(), - expiry: core::ptr::null_mut(), - cltv: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReceivePaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_RedeemOnchainFundsRequest { - fn new_with_null_ptr() -> Self { - Self { - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_RedeemOnchainFundsRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_RefundRequest { - fn new_with_null_ptr() -> Self { - Self { - swap_address: core::ptr::null_mut(), - to_address: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_RefundRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl Default for wire_ReportIssueRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReportIssueRequest { - fn new_with_null_ptr() -> Self { - Self { - tag: -1, - kind: core::ptr::null_mut(), - } - } -} - -#[no_mangle] -pub extern "C" fn inflate_ReportIssueRequest_PaymentFailure() -> *mut ReportIssueRequestKind { - support::new_leak_box_ptr(ReportIssueRequestKind { - PaymentFailure: support::new_leak_box_ptr(wire_ReportIssueRequest_PaymentFailure { - data: core::ptr::null_mut(), - }), - }) -} - -impl NewWithNullPtr for wire_ReportPaymentFailureDetails { - fn new_with_null_ptr() -> Self { - Self { - payment_hash: core::ptr::null_mut(), - comment: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReportPaymentFailureDetails { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_ReverseSwapFeesRequest { - fn new_with_null_ptr() -> Self { - Self { - send_amount_sat: core::ptr::null_mut(), - claim_tx_feerate: core::ptr::null_mut(), - } - } -} - -impl Default for wire_ReverseSwapFeesRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendOnchainRequest { - fn new_with_null_ptr() -> Self { - Self { - amount_sat: Default::default(), - onchain_recipient_address: core::ptr::null_mut(), - pair_hash: core::ptr::null_mut(), - sat_per_vbyte: Default::default(), - } - } -} - -impl Default for wire_SendOnchainRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - bolt11: core::ptr::null_mut(), - use_trampoline: Default::default(), - amount_msat: core::ptr::null_mut(), - label: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SendPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SendSpontaneousPaymentRequest { - fn new_with_null_ptr() -> Self { - Self { - node_id: core::ptr::null_mut(), - amount_msat: Default::default(), - extra_tlvs: core::ptr::null_mut(), - label: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SendSpontaneousPaymentRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_SignMessageRequest { - fn new_with_null_ptr() -> Self { - Self { - message: core::ptr::null_mut(), - } - } -} - -impl Default for wire_SignMessageRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_StaticBackupRequest { - fn new_with_null_ptr() -> Self { - Self { - working_dir: core::ptr::null_mut(), - } - } -} - -impl Default for wire_StaticBackupRequest { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -impl NewWithNullPtr for wire_TlvEntry { - fn new_with_null_ptr() -> Self { - Self { - field_number: Default::default(), - value: core::ptr::null_mut(), - } - } -} - -impl Default for wire_TlvEntry { - fn default() -> Self { - Self::new_with_null_ptr() - } -} - -// Section: sync execution mode utility - -#[no_mangle] -pub extern "C" fn free_WireSyncReturn(ptr: support::WireSyncReturn) { - unsafe { - let _ = support::box_from_leak_ptr(ptr); - }; -} diff --git a/libs/sdk-core/src/bridge_generated.rs b/libs/sdk-core/src/bridge_generated.rs deleted file mode 100644 index 5d6c32529..000000000 --- a/libs/sdk-core/src/bridge_generated.rs +++ /dev/null @@ -1,2678 +0,0 @@ -#![allow( - non_camel_case_types, - unused, - clippy::redundant_closure, - clippy::useless_conversion, - clippy::unit_arg, - clippy::double_parens, - non_snake_case, - clippy::too_many_arguments -)] -// AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.6. - -use crate::binding::*; -use core::panic::UnwindSafe; -use flutter_rust_bridge::rust2dart::IntoIntoDart; -use flutter_rust_bridge::*; -use std::ffi::c_void; -use std::sync::Arc; - -// Section: imports - -use crate::breez_services::BackupFailedData; -use crate::breez_services::BreezEvent; -use crate::breez_services::CheckMessageRequest; -use crate::breez_services::CheckMessageResponse; -use crate::breez_services::InvoicePaidDetails; -use crate::breez_services::PaymentFailedData; -use crate::breez_services::SignMessageRequest; -use crate::breez_services::SignMessageResponse; -use crate::chain::RecommendedFees; -use crate::lnurl::pay::LnUrlPayResult; -use crate::lnurl::pay::LnUrlPaySuccessData; -use crate::lsp::LspInformation; -use crate::models::BackupStatus; -use crate::models::BuyBitcoinProvider; -use crate::models::BuyBitcoinRequest; -use crate::models::BuyBitcoinResponse; -use crate::models::ChannelState; -use crate::models::ClosedChannelPaymentDetails; -use crate::models::Config; -use crate::models::ConfigureNodeRequest; -use crate::models::ConnectRequest; -use crate::models::EnvironmentType; -use crate::models::GreenlightCredentials; -use crate::models::GreenlightDeviceCredentials; -use crate::models::GreenlightNodeConfig; -use crate::models::HealthCheckStatus; -use crate::models::ListPaymentsRequest; -use crate::models::LnPaymentDetails; -use crate::models::LogEntry; -use crate::models::MaxReverseSwapAmountResponse; -use crate::models::MetadataFilter; -use crate::models::NodeConfig; -use crate::models::NodeCredentials; -use crate::models::NodeState; -use crate::models::OnchainPaymentLimitsResponse; -use crate::models::OpenChannelFeeRequest; -use crate::models::OpenChannelFeeResponse; -use crate::models::OpeningFeeParams; -use crate::models::OpeningFeeParamsMenu; -use crate::models::PayOnchainRequest; -use crate::models::PayOnchainResponse; -use crate::models::Payment; -use crate::models::PaymentDetails; -use crate::models::PaymentStatus; -use crate::models::PaymentType; -use crate::models::PaymentTypeFilter; -use crate::models::PrepareOnchainPaymentRequest; -use crate::models::PrepareOnchainPaymentResponse; -use crate::models::PrepareRedeemOnchainFundsRequest; -use crate::models::PrepareRedeemOnchainFundsResponse; -use crate::models::PrepareRefundRequest; -use crate::models::PrepareRefundResponse; -use crate::models::ReceiveOnchainRequest; -use crate::models::ReceivePaymentRequest; -use crate::models::ReceivePaymentResponse; -use crate::models::RedeemOnchainFundsRequest; -use crate::models::RedeemOnchainFundsResponse; -use crate::models::RefundRequest; -use crate::models::RefundResponse; -use crate::models::ReportIssueRequest; -use crate::models::ReportPaymentFailureDetails; -use crate::models::ReverseSwapFeesRequest; -use crate::models::ReverseSwapInfo; -use crate::models::ReverseSwapPairInfo; -use crate::models::ReverseSwapStatus; -use crate::models::SendOnchainRequest; -use crate::models::SendOnchainResponse; -use crate::models::SendPaymentRequest; -use crate::models::SendPaymentResponse; -use crate::models::SendSpontaneousPaymentRequest; -use crate::models::ServiceHealthCheckResponse; -use crate::models::StaticBackupRequest; -use crate::models::StaticBackupResponse; -use crate::models::SwapAmountType; -use crate::models::SwapInfo; -use crate::models::SwapStatus; -use crate::models::TlvEntry; -use crate::models::UnspentTransactionOutput; - -// Section: wire functions - -fn wire_connect_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "connect", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| connect(api_req) - }, - ) -} -fn wire_is_initialized_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, bool, _>( - WrapInfo { - debug_name: "is_initialized", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| Result::<_, ()>::Ok(is_initialized()), - ) -} -fn wire_sync_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "sync", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| sync(), - ) -} -fn wire_node_credentials_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "node_credentials", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| node_credentials(), - ) -} -fn wire_node_info_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, NodeState, _>( - WrapInfo { - debug_name: "node_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| node_info(), - ) -} -fn wire_configure_node_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "configure_node", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| configure_node(api_req) - }, - ) -} -fn wire_disconnect_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "disconnect", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| disconnect(), - ) -} -fn wire_sign_message_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SignMessageResponse, _>( - WrapInfo { - debug_name: "sign_message", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| sign_message(api_req) - }, - ) -} -fn wire_check_message_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, CheckMessageResponse, _>( - WrapInfo { - debug_name: "check_message", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| check_message(api_req) - }, - ) -} -fn wire_mnemonic_to_seed_impl(port_: MessagePort, phrase: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "mnemonic_to_seed", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_phrase = phrase.wire2api(); - move |task_callback| mnemonic_to_seed(api_phrase) - }, - ) -} -fn wire_default_config_impl( - port_: MessagePort, - env_type: impl Wire2Api + UnwindSafe, - api_key: impl Wire2Api + UnwindSafe, - node_config: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Config, _>( - WrapInfo { - debug_name: "default_config", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_env_type = env_type.wire2api(); - let api_api_key = api_key.wire2api(); - let api_node_config = node_config.wire2api(); - move |task_callback| { - Result::<_, ()>::Ok(default_config(api_env_type, api_api_key, api_node_config)) - } - }, - ) -} -fn wire_static_backup_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, StaticBackupResponse, _>( - WrapInfo { - debug_name: "static_backup", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| static_backup(api_req) - }, - ) -} -fn wire_service_health_check_impl(port_: MessagePort, api_key: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ServiceHealthCheckResponse, _>( - WrapInfo { - debug_name: "service_health_check", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_api_key = api_key.wire2api(); - move |task_callback| service_health_check(api_api_key) - }, - ) -} -fn wire_breez_events_stream_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "breez_events_stream", - port: Some(port_), - mode: FfiCallMode::Stream, - }, - move || { - move |task_callback| breez_events_stream(task_callback.stream_sink::<_, BreezEvent>()) - }, - ) -} -fn wire_breez_log_stream_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "breez_log_stream", - port: Some(port_), - mode: FfiCallMode::Stream, - }, - move || move |task_callback| breez_log_stream(task_callback.stream_sink::<_, LogEntry>()), - ) -} -fn wire_list_lsps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_lsps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_lsps(), - ) -} -fn wire_connect_lsp_impl(port_: MessagePort, lsp_id: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "connect_lsp", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_lsp_id = lsp_id.wire2api(); - move |task_callback| connect_lsp(api_lsp_id) - }, - ) -} -fn wire_lsp_id_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "lsp_id", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| lsp_id(), - ) -} -fn wire_fetch_lsp_info_impl(port_: MessagePort, id: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "fetch_lsp_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_id = id.wire2api(); - move |task_callback| fetch_lsp_info(api_id) - }, - ) -} -fn wire_lsp_info_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LspInformation, _>( - WrapInfo { - debug_name: "lsp_info", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| lsp_info(), - ) -} -fn wire_close_lsp_channels_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "close_lsp_channels", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| close_lsp_channels(), - ) -} -fn wire_register_webhook_impl(port_: MessagePort, webhook_url: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "register_webhook", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_webhook_url = webhook_url.wire2api(); - move |task_callback| register_webhook(api_webhook_url) - }, - ) -} -fn wire_unregister_webhook_impl( - port_: MessagePort, - webhook_url: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "unregister_webhook", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_webhook_url = webhook_url.wire2api(); - move |task_callback| unregister_webhook(api_webhook_url) - }, - ) -} -fn wire_backup_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "backup", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| backup(), - ) -} -fn wire_backup_status_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BackupStatus, _>( - WrapInfo { - debug_name: "backup_status", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| backup_status(), - ) -} -fn wire_parse_invoice_impl(port_: MessagePort, invoice: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LNInvoice, _>( - WrapInfo { - debug_name: "parse_invoice", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_invoice = invoice.wire2api(); - move |task_callback| parse_invoice(api_invoice) - }, - ) -} -fn wire_parse_input_impl(port_: MessagePort, input: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_InputType, _>( - WrapInfo { - debug_name: "parse_input", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_input = input.wire2api(); - move |task_callback| parse_input(api_input) - }, - ) -} -fn wire_list_payments_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_payments", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| list_payments(api_req) - }, - ) -} -fn wire_payment_by_hash_impl(port_: MessagePort, hash: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "payment_by_hash", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_hash = hash.wire2api(); - move |task_callback| payment_by_hash(api_hash) - }, - ) -} -fn wire_set_payment_metadata_impl( - port_: MessagePort, - hash: impl Wire2Api + UnwindSafe, - metadata: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "set_payment_metadata", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_hash = hash.wire2api(); - let api_metadata = metadata.wire2api(); - move |task_callback| set_payment_metadata(api_hash, api_metadata) - }, - ) -} -fn wire_send_payment_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>( - WrapInfo { - debug_name: "send_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_payment(api_req) - }, - ) -} -fn wire_send_spontaneous_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>( - WrapInfo { - debug_name: "send_spontaneous_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_spontaneous_payment(api_req) - }, - ) -} -fn wire_receive_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReceivePaymentResponse, _>( - WrapInfo { - debug_name: "receive_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| receive_payment(api_req) - }, - ) -} -fn wire_lnurl_pay_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LnUrlPayResult, _>( - WrapInfo { - debug_name: "lnurl_pay", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| lnurl_pay(api_req) - }, - ) -} -fn wire_lnurl_withdraw_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlWithdrawResult, _>( - WrapInfo { - debug_name: "lnurl_withdraw", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| lnurl_withdraw(api_req) - }, - ) -} -fn wire_lnurl_auth_impl( - port_: MessagePort, - req_data: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlCallbackStatus, _>( - WrapInfo { - debug_name: "lnurl_auth", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req_data = req_data.wire2api(); - move |task_callback| lnurl_auth(api_req_data) - }, - ) -} -fn wire_report_issue_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "report_issue", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| report_issue(api_req) - }, - ) -} -fn wire_fetch_fiat_rates_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "fetch_fiat_rates", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| fetch_fiat_rates(), - ) -} -fn wire_list_fiat_currencies_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_fiat_currencies", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_fiat_currencies(), - ) -} -fn wire_max_reverse_swap_amount_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, MaxReverseSwapAmountResponse, _>( - WrapInfo { - debug_name: "max_reverse_swap_amount", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| max_reverse_swap_amount(), - ) -} -fn wire_send_onchain_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendOnchainResponse, _>( - WrapInfo { - debug_name: "send_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| send_onchain(api_req) - }, - ) -} -fn wire_pay_onchain_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PayOnchainResponse, _>( - WrapInfo { - debug_name: "pay_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| pay_onchain(api_req) - }, - ) -} -fn wire_receive_onchain_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SwapInfo, _>( - WrapInfo { - debug_name: "receive_onchain", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| receive_onchain(api_req) - }, - ) -} -fn wire_buy_bitcoin_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BuyBitcoinResponse, _>( - WrapInfo { - debug_name: "buy_bitcoin", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| buy_bitcoin(api_req) - }, - ) -} -fn wire_redeem_onchain_funds_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RedeemOnchainFundsResponse, _>( - WrapInfo { - debug_name: "redeem_onchain_funds", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| redeem_onchain_funds(api_req) - }, - ) -} -fn wire_prepare_redeem_onchain_funds_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRedeemOnchainFundsResponse, _>( - WrapInfo { - debug_name: "prepare_redeem_onchain_funds", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_redeem_onchain_funds(api_req) - }, - ) -} -fn wire_list_refundables_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "list_refundables", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| list_refundables(), - ) -} -fn wire_prepare_refund_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRefundResponse, _>( - WrapInfo { - debug_name: "prepare_refund", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_refund(api_req) - }, - ) -} -fn wire_refund_impl(port_: MessagePort, req: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RefundResponse, _>( - WrapInfo { - debug_name: "refund", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| refund(api_req) - }, - ) -} -fn wire_rescan_swaps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "rescan_swaps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| rescan_swaps(), - ) -} -fn wire_redeem_swap_impl(port_: MessagePort, swap_address: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "redeem_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_swap_address = swap_address.wire2api(); - move |task_callback| redeem_swap(api_swap_address) - }, - ) -} -fn wire_in_progress_swap_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( - WrapInfo { - debug_name: "in_progress_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_swap(), - ) -} -fn wire_in_progress_reverse_swaps_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "in_progress_reverse_swaps", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_reverse_swaps(), - ) -} -fn wire_claim_reverse_swap_impl( - port_: MessagePort, - lockup_address: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>( - WrapInfo { - debug_name: "claim_reverse_swap", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_lockup_address = lockup_address.wire2api(); - move |task_callback| claim_reverse_swap(api_lockup_address) - }, - ) -} -fn wire_open_channel_fee_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OpenChannelFeeResponse, _>( - WrapInfo { - debug_name: "open_channel_fee", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| open_channel_fee(api_req) - }, - ) -} -fn wire_fetch_reverse_swap_fees_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReverseSwapPairInfo, _>( - WrapInfo { - debug_name: "fetch_reverse_swap_fees", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| fetch_reverse_swap_fees(api_req) - }, - ) -} -fn wire_onchain_payment_limits_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OnchainPaymentLimitsResponse, _>( - WrapInfo { - debug_name: "onchain_payment_limits", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| onchain_payment_limits(), - ) -} -fn wire_prepare_onchain_payment_impl( - port_: MessagePort, - req: impl Wire2Api + UnwindSafe, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareOnchainPaymentResponse, _>( - WrapInfo { - debug_name: "prepare_onchain_payment", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_req = req.wire2api(); - move |task_callback| prepare_onchain_payment(api_req) - }, - ) -} -fn wire_in_progress_onchain_payments_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec, _>( - WrapInfo { - debug_name: "in_progress_onchain_payments", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| in_progress_onchain_payments(), - ) -} -fn wire_recommended_fees_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RecommendedFees, _>( - WrapInfo { - debug_name: "recommended_fees", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| recommended_fees(), - ) -} -fn wire_execute_command_impl(port_: MessagePort, command: impl Wire2Api + UnwindSafe) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>( - WrapInfo { - debug_name: "execute_command", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || { - let api_command = command.wire2api(); - move |task_callback| execute_command(api_command) - }, - ) -} -fn wire_generate_diagnostic_data_impl(port_: MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>( - WrapInfo { - debug_name: "generate_diagnostic_data", - port: Some(port_), - mode: FfiCallMode::Normal, - }, - move || move |task_callback| generate_diagnostic_data(), - ) -} -// Section: wrapper structs - -#[derive(Clone)] -pub struct mirror_AesSuccessActionDataDecrypted(AesSuccessActionDataDecrypted); - -#[derive(Clone)] -pub struct mirror_AesSuccessActionDataResult(AesSuccessActionDataResult); - -#[derive(Clone)] -pub struct mirror_BitcoinAddressData(BitcoinAddressData); - -#[derive(Clone)] -pub struct mirror_CurrencyInfo(CurrencyInfo); - -#[derive(Clone)] -pub struct mirror_FiatCurrency(FiatCurrency); - -#[derive(Clone)] -pub struct mirror_InputType(InputType); - -#[derive(Clone)] -pub struct mirror_LNInvoice(LNInvoice); - -#[derive(Clone)] -pub struct mirror_LnUrlAuthRequestData(LnUrlAuthRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlCallbackStatus(LnUrlCallbackStatus); - -#[derive(Clone)] -pub struct mirror_LnUrlErrorData(LnUrlErrorData); - -#[derive(Clone)] -pub struct mirror_LnUrlPayErrorData(LnUrlPayErrorData); - -#[derive(Clone)] -pub struct mirror_LnUrlPayRequestData(LnUrlPayRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawRequestData(LnUrlWithdrawRequestData); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawResult(LnUrlWithdrawResult); - -#[derive(Clone)] -pub struct mirror_LnUrlWithdrawSuccessData(LnUrlWithdrawSuccessData); - -#[derive(Clone)] -pub struct mirror_LocaleOverrides(LocaleOverrides); - -#[derive(Clone)] -pub struct mirror_LocalizedName(LocalizedName); - -#[derive(Clone)] -pub struct mirror_MessageSuccessActionData(MessageSuccessActionData); - -#[derive(Clone)] -pub struct mirror_Network(Network); - -#[derive(Clone)] -pub struct mirror_Rate(Rate); - -#[derive(Clone)] -pub struct mirror_RouteHint(RouteHint); - -#[derive(Clone)] -pub struct mirror_RouteHintHop(RouteHintHop); - -#[derive(Clone)] -pub struct mirror_SuccessActionProcessed(SuccessActionProcessed); - -#[derive(Clone)] -pub struct mirror_Symbol(Symbol); - -#[derive(Clone)] -pub struct mirror_UrlSuccessActionData(UrlSuccessActionData); - -// Section: static checks - -const _: fn() = || { - { - let AesSuccessActionDataDecrypted = None::.unwrap(); - let _: String = AesSuccessActionDataDecrypted.description; - let _: String = AesSuccessActionDataDecrypted.plaintext; - } - match None::.unwrap() { - AesSuccessActionDataResult::Decrypted { data } => { - let _: AesSuccessActionDataDecrypted = data; - } - AesSuccessActionDataResult::ErrorStatus { reason } => { - let _: String = reason; - } - } - { - let BitcoinAddressData = None::.unwrap(); - let _: String = BitcoinAddressData.address; - let _: Network = BitcoinAddressData.network; - let _: Option = BitcoinAddressData.amount_sat; - let _: Option = BitcoinAddressData.label; - let _: Option = BitcoinAddressData.message; - } - { - let CurrencyInfo = None::.unwrap(); - let _: String = CurrencyInfo.name; - let _: u32 = CurrencyInfo.fraction_size; - let _: Option = CurrencyInfo.spacing; - let _: Option = CurrencyInfo.symbol; - let _: Option = CurrencyInfo.uniq_symbol; - let _: Vec = CurrencyInfo.localized_name; - let _: Vec = CurrencyInfo.locale_overrides; - } - { - let FiatCurrency = None::.unwrap(); - let _: String = FiatCurrency.id; - let _: CurrencyInfo = FiatCurrency.info; - } - match None::.unwrap() { - InputType::BitcoinAddress { address } => { - let _: BitcoinAddressData = address; - } - InputType::Bolt11 { invoice } => { - let _: LNInvoice = invoice; - } - InputType::NodeId { node_id } => { - let _: String = node_id; - } - InputType::Url { url } => { - let _: String = url; - } - InputType::LnUrlPay { data } => { - let _: LnUrlPayRequestData = data; - } - InputType::LnUrlWithdraw { data } => { - let _: LnUrlWithdrawRequestData = data; - } - InputType::LnUrlAuth { data } => { - let _: LnUrlAuthRequestData = data; - } - InputType::LnUrlError { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LNInvoice = None::.unwrap(); - let _: String = LNInvoice.bolt11; - let _: Network = LNInvoice.network; - let _: String = LNInvoice.payee_pubkey; - let _: String = LNInvoice.payment_hash; - let _: Option = LNInvoice.description; - let _: Option = LNInvoice.description_hash; - let _: Option = LNInvoice.amount_msat; - let _: u64 = LNInvoice.timestamp; - let _: u64 = LNInvoice.expiry; - let _: Vec = LNInvoice.routing_hints; - let _: Vec = LNInvoice.payment_secret; - let _: u64 = LNInvoice.min_final_cltv_expiry_delta; - } - { - let LnUrlAuthRequestData = None::.unwrap(); - let _: String = LnUrlAuthRequestData.k1; - let _: Option = LnUrlAuthRequestData.action; - let _: String = LnUrlAuthRequestData.domain; - let _: String = LnUrlAuthRequestData.url; - } - match None::.unwrap() { - LnUrlCallbackStatus::Ok => {} - LnUrlCallbackStatus::ErrorStatus { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LnUrlErrorData = None::.unwrap(); - let _: String = LnUrlErrorData.reason; - } - { - let LnUrlPayErrorData = None::.unwrap(); - let _: String = LnUrlPayErrorData.payment_hash; - let _: String = LnUrlPayErrorData.reason; - } - { - let LnUrlPayRequestData = None::.unwrap(); - let _: String = LnUrlPayRequestData.callback; - let _: u64 = LnUrlPayRequestData.min_sendable; - let _: u64 = LnUrlPayRequestData.max_sendable; - let _: String = LnUrlPayRequestData.metadata_str; - let _: u16 = LnUrlPayRequestData.comment_allowed; - let _: String = LnUrlPayRequestData.domain; - let _: bool = LnUrlPayRequestData.allows_nostr; - let _: Option = LnUrlPayRequestData.nostr_pubkey; - let _: Option = LnUrlPayRequestData.ln_address; - } - { - let LnUrlWithdrawRequestData = None::.unwrap(); - let _: String = LnUrlWithdrawRequestData.callback; - let _: String = LnUrlWithdrawRequestData.k1; - let _: String = LnUrlWithdrawRequestData.default_description; - let _: u64 = LnUrlWithdrawRequestData.min_withdrawable; - let _: u64 = LnUrlWithdrawRequestData.max_withdrawable; - } - match None::.unwrap() { - LnUrlWithdrawResult::Ok { data } => { - let _: LnUrlWithdrawSuccessData = data; - } - LnUrlWithdrawResult::Timeout { data } => { - let _: LnUrlWithdrawSuccessData = data; - } - LnUrlWithdrawResult::ErrorStatus { data } => { - let _: LnUrlErrorData = data; - } - } - { - let LnUrlWithdrawSuccessData = None::.unwrap(); - let _: LNInvoice = LnUrlWithdrawSuccessData.invoice; - } - { - let LocaleOverrides = None::.unwrap(); - let _: String = LocaleOverrides.locale; - let _: Option = LocaleOverrides.spacing; - let _: Symbol = LocaleOverrides.symbol; - } - { - let LocalizedName = None::.unwrap(); - let _: String = LocalizedName.locale; - let _: String = LocalizedName.name; - } - { - let MessageSuccessActionData = None::.unwrap(); - let _: String = MessageSuccessActionData.message; - } - match None::.unwrap() { - Network::Bitcoin => {} - Network::Testnet => {} - Network::Signet => {} - Network::Regtest => {} - } - { - let Rate = None::.unwrap(); - let _: String = Rate.coin; - let _: f64 = Rate.value; - } - { - let RouteHint = None::.unwrap(); - let _: Vec = RouteHint.hops; - } - { - let RouteHintHop = None::.unwrap(); - let _: String = RouteHintHop.src_node_id; - let _: String = RouteHintHop.short_channel_id; - let _: u32 = RouteHintHop.fees_base_msat; - let _: u32 = RouteHintHop.fees_proportional_millionths; - let _: u64 = RouteHintHop.cltv_expiry_delta; - let _: Option = RouteHintHop.htlc_minimum_msat; - let _: Option = RouteHintHop.htlc_maximum_msat; - } - match None::.unwrap() { - SuccessActionProcessed::Aes { result } => { - let _: AesSuccessActionDataResult = result; - } - SuccessActionProcessed::Message { data } => { - let _: MessageSuccessActionData = data; - } - SuccessActionProcessed::Url { data } => { - let _: UrlSuccessActionData = data; - } - } - { - let Symbol = None::.unwrap(); - let _: Option = Symbol.grapheme; - let _: Option = Symbol.template; - let _: Option = Symbol.rtl; - let _: Option = Symbol.position; - } - { - let UrlSuccessActionData = None::.unwrap(); - let _: String = UrlSuccessActionData.description; - let _: String = UrlSuccessActionData.url; - } -}; -// Section: allocate functions - -// Section: related functions - -// Section: impl Wire2Api - -pub trait Wire2Api { - fn wire2api(self) -> T; -} - -impl Wire2Api> for *mut S -where - *mut S: Wire2Api, -{ - fn wire2api(self) -> Option { - (!self.is_null()).then(|| self.wire2api()) - } -} - -impl Wire2Api for bool { - fn wire2api(self) -> bool { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> BuyBitcoinProvider { - match self { - 0 => BuyBitcoinProvider::Moonpay, - _ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> EnvironmentType { - match self { - 0 => EnvironmentType::Production, - 1 => EnvironmentType::Staging, - _ => unreachable!("Invalid variant for EnvironmentType: {}", self), - } - } -} -impl Wire2Api for f64 { - fn wire2api(self) -> f64 { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> i32 { - self - } -} -impl Wire2Api for i64 { - fn wire2api(self) -> i64 { - self - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> Network { - match self { - 0 => Network::Bitcoin, - 1 => Network::Testnet, - 2 => Network::Signet, - 3 => Network::Regtest, - _ => unreachable!("Invalid variant for Network: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> PaymentTypeFilter { - match self { - 0 => PaymentTypeFilter::Sent, - 1 => PaymentTypeFilter::Received, - 2 => PaymentTypeFilter::ClosedChannel, - _ => unreachable!("Invalid variant for PaymentTypeFilter: {}", self), - } - } -} - -impl Wire2Api for i32 { - fn wire2api(self) -> SwapAmountType { - match self { - 0 => SwapAmountType::Send, - 1 => SwapAmountType::Receive, - _ => unreachable!("Invalid variant for SwapAmountType: {}", self), - } - } -} - -impl Wire2Api for u16 { - fn wire2api(self) -> u16 { - self - } -} -impl Wire2Api for u32 { - fn wire2api(self) -> u32 { - self - } -} -impl Wire2Api for u64 { - fn wire2api(self) -> u64 { - self - } -} -impl Wire2Api for u8 { - fn wire2api(self) -> u8 { - self - } -} - -// Section: impl IntoDart - -impl support::IntoDart for mirror_AesSuccessActionDataDecrypted { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.description.into_into_dart().into_dart(), - self.0.plaintext.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataDecrypted {} -impl rust2dart::IntoIntoDart - for AesSuccessActionDataDecrypted -{ - fn into_into_dart(self) -> mirror_AesSuccessActionDataDecrypted { - mirror_AesSuccessActionDataDecrypted(self) - } -} - -impl support::IntoDart for mirror_AesSuccessActionDataResult { - fn into_dart(self) -> support::DartAbi { - match self.0 { - AesSuccessActionDataResult::Decrypted { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - AesSuccessActionDataResult::ErrorStatus { reason } => { - vec![1.into_dart(), reason.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataResult {} -impl rust2dart::IntoIntoDart for AesSuccessActionDataResult { - fn into_into_dart(self) -> mirror_AesSuccessActionDataResult { - mirror_AesSuccessActionDataResult(self) - } -} - -impl support::IntoDart for BackupFailedData { - fn into_dart(self) -> support::DartAbi { - vec![self.error.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for BackupFailedData {} -impl rust2dart::IntoIntoDart for BackupFailedData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for BackupStatus { - fn into_dart(self) -> support::DartAbi { - vec![ - self.backed_up.into_into_dart().into_dart(), - self.last_backup_time.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BackupStatus {} -impl rust2dart::IntoIntoDart for BackupStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_BitcoinAddressData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.address.into_into_dart().into_dart(), - self.0.network.into_into_dart().into_dart(), - self.0.amount_sat.into_dart(), - self.0.label.into_dart(), - self.0.message.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_BitcoinAddressData {} -impl rust2dart::IntoIntoDart for BitcoinAddressData { - fn into_into_dart(self) -> mirror_BitcoinAddressData { - mirror_BitcoinAddressData(self) - } -} - -impl support::IntoDart for BreezEvent { - fn into_dart(self) -> support::DartAbi { - match self { - Self::NewBlock { block } => vec![0.into_dart(), block.into_into_dart().into_dart()], - Self::InvoicePaid { details } => { - vec![1.into_dart(), details.into_into_dart().into_dart()] - } - Self::Synced => vec![2.into_dart()], - Self::PaymentSucceed { details } => { - vec![3.into_dart(), details.into_into_dart().into_dart()] - } - Self::PaymentFailed { details } => { - vec![4.into_dart(), details.into_into_dart().into_dart()] - } - Self::BackupStarted => vec![5.into_dart()], - Self::BackupSucceeded => vec![6.into_dart()], - Self::BackupFailed { details } => { - vec![7.into_dart(), details.into_into_dart().into_dart()] - } - Self::ReverseSwapUpdated { details } => { - vec![8.into_dart(), details.into_into_dart().into_dart()] - } - Self::SwapUpdated { details } => { - vec![9.into_dart(), details.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BreezEvent {} -impl rust2dart::IntoIntoDart for BreezEvent { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for BuyBitcoinResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.url.into_into_dart().into_dart(), - self.opening_fee_params.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for BuyBitcoinResponse {} -impl rust2dart::IntoIntoDart for BuyBitcoinResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ChannelState { - fn into_dart(self) -> support::DartAbi { - match self { - Self::PendingOpen => 0, - Self::Opened => 1, - Self::PendingClose => 2, - Self::Closed => 3, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ChannelState {} -impl rust2dart::IntoIntoDart for ChannelState { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for CheckMessageResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.is_valid.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for CheckMessageResponse {} -impl rust2dart::IntoIntoDart for CheckMessageResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ClosedChannelPaymentDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.state.into_into_dart().into_dart(), - self.funding_txid.into_into_dart().into_dart(), - self.short_channel_id.into_dart(), - self.closing_txid.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ClosedChannelPaymentDetails {} -impl rust2dart::IntoIntoDart for ClosedChannelPaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for Config { - fn into_dart(self) -> support::DartAbi { - vec![ - self.breezserver.into_into_dart().into_dart(), - self.chainnotifier_url.into_into_dart().into_dart(), - self.mempoolspace_url.into_dart(), - self.working_dir.into_into_dart().into_dart(), - self.network.into_into_dart().into_dart(), - self.payment_timeout_sec.into_into_dart().into_dart(), - self.default_lsp_id.into_dart(), - self.api_key.into_dart(), - self.maxfee_percent.into_into_dart().into_dart(), - self.exemptfee_msat.into_into_dart().into_dart(), - self.node_config.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for Config {} -impl rust2dart::IntoIntoDart for Config { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_CurrencyInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.name.into_into_dart().into_dart(), - self.0.fraction_size.into_into_dart().into_dart(), - self.0.spacing.into_dart(), - self.0.symbol.map(|v| mirror_Symbol(v)).into_dart(), - self.0.uniq_symbol.map(|v| mirror_Symbol(v)).into_dart(), - self.0.localized_name.into_into_dart().into_dart(), - self.0.locale_overrides.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_CurrencyInfo {} -impl rust2dart::IntoIntoDart for CurrencyInfo { - fn into_into_dart(self) -> mirror_CurrencyInfo { - mirror_CurrencyInfo(self) - } -} - -impl support::IntoDart for mirror_FiatCurrency { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.id.into_into_dart().into_dart(), - self.0.info.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_FiatCurrency {} -impl rust2dart::IntoIntoDart for FiatCurrency { - fn into_into_dart(self) -> mirror_FiatCurrency { - mirror_FiatCurrency(self) - } -} - -impl support::IntoDart for GreenlightCredentials { - fn into_dart(self) -> support::DartAbi { - vec![ - self.developer_key.into_into_dart().into_dart(), - self.developer_cert.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightCredentials {} -impl rust2dart::IntoIntoDart for GreenlightCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for GreenlightDeviceCredentials { - fn into_dart(self) -> support::DartAbi { - vec![self.device.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightDeviceCredentials {} -impl rust2dart::IntoIntoDart for GreenlightDeviceCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for GreenlightNodeConfig { - fn into_dart(self) -> support::DartAbi { - vec![ - self.partner_credentials.into_dart(), - self.invite_code.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for GreenlightNodeConfig {} -impl rust2dart::IntoIntoDart for GreenlightNodeConfig { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for HealthCheckStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Operational => 0, - Self::Maintenance => 1, - Self::ServiceDisruption => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for HealthCheckStatus {} -impl rust2dart::IntoIntoDart for HealthCheckStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_InputType { - fn into_dart(self) -> support::DartAbi { - match self.0 { - InputType::BitcoinAddress { address } => { - vec![0.into_dart(), address.into_into_dart().into_dart()] - } - InputType::Bolt11 { invoice } => { - vec![1.into_dart(), invoice.into_into_dart().into_dart()] - } - InputType::NodeId { node_id } => { - vec![2.into_dart(), node_id.into_into_dart().into_dart()] - } - InputType::Url { url } => vec![3.into_dart(), url.into_into_dart().into_dart()], - InputType::LnUrlPay { data } => vec![4.into_dart(), data.into_into_dart().into_dart()], - InputType::LnUrlWithdraw { data } => { - vec![5.into_dart(), data.into_into_dart().into_dart()] - } - InputType::LnUrlAuth { data } => vec![6.into_dart(), data.into_into_dart().into_dart()], - InputType::LnUrlError { data } => { - vec![7.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_InputType {} -impl rust2dart::IntoIntoDart for InputType { - fn into_into_dart(self) -> mirror_InputType { - mirror_InputType(self) - } -} - -impl support::IntoDart for InvoicePaidDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment_hash.into_into_dart().into_dart(), - self.bolt11.into_into_dart().into_dart(), - self.payment.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for InvoicePaidDetails {} -impl rust2dart::IntoIntoDart for InvoicePaidDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LNInvoice { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.bolt11.into_into_dart().into_dart(), - self.0.network.into_into_dart().into_dart(), - self.0.payee_pubkey.into_into_dart().into_dart(), - self.0.payment_hash.into_into_dart().into_dart(), - self.0.description.into_dart(), - self.0.description_hash.into_dart(), - self.0.amount_msat.into_dart(), - self.0.timestamp.into_into_dart().into_dart(), - self.0.expiry.into_into_dart().into_dart(), - self.0.routing_hints.into_into_dart().into_dart(), - self.0.payment_secret.into_into_dart().into_dart(), - self.0 - .min_final_cltv_expiry_delta - .into_into_dart() - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LNInvoice {} -impl rust2dart::IntoIntoDart for LNInvoice { - fn into_into_dart(self) -> mirror_LNInvoice { - mirror_LNInvoice(self) - } -} - -impl support::IntoDart for LnPaymentDetails { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment_hash.into_into_dart().into_dart(), - self.label.into_into_dart().into_dart(), - self.destination_pubkey.into_into_dart().into_dart(), - self.payment_preimage.into_into_dart().into_dart(), - self.keysend.into_into_dart().into_dart(), - self.bolt11.into_into_dart().into_dart(), - self.open_channel_bolt11.into_dart(), - self.lnurl_success_action - .map(|v| mirror_SuccessActionProcessed(v)) - .into_dart(), - self.lnurl_pay_domain.into_dart(), - self.lnurl_pay_comment.into_dart(), - self.ln_address.into_dart(), - self.lnurl_metadata.into_dart(), - self.lnurl_withdraw_endpoint.into_dart(), - self.swap_info.into_dart(), - self.reverse_swap_info.into_dart(), - self.pending_expiration_block.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnPaymentDetails {} -impl rust2dart::IntoIntoDart for LnPaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LnUrlAuthRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.k1.into_into_dart().into_dart(), - self.0.action.into_dart(), - self.0.domain.into_into_dart().into_dart(), - self.0.url.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlAuthRequestData {} -impl rust2dart::IntoIntoDart for LnUrlAuthRequestData { - fn into_into_dart(self) -> mirror_LnUrlAuthRequestData { - mirror_LnUrlAuthRequestData(self) - } -} - -impl support::IntoDart for mirror_LnUrlCallbackStatus { - fn into_dart(self) -> support::DartAbi { - match self.0 { - LnUrlCallbackStatus::Ok => vec![0.into_dart()], - LnUrlCallbackStatus::ErrorStatus { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlCallbackStatus {} -impl rust2dart::IntoIntoDart for LnUrlCallbackStatus { - fn into_into_dart(self) -> mirror_LnUrlCallbackStatus { - mirror_LnUrlCallbackStatus(self) - } -} - -impl support::IntoDart for mirror_LnUrlErrorData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.reason.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlErrorData {} -impl rust2dart::IntoIntoDart for LnUrlErrorData { - fn into_into_dart(self) -> mirror_LnUrlErrorData { - mirror_LnUrlErrorData(self) - } -} - -impl support::IntoDart for mirror_LnUrlPayErrorData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.payment_hash.into_into_dart().into_dart(), - self.0.reason.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlPayErrorData {} -impl rust2dart::IntoIntoDart for LnUrlPayErrorData { - fn into_into_dart(self) -> mirror_LnUrlPayErrorData { - mirror_LnUrlPayErrorData(self) - } -} - -impl support::IntoDart for mirror_LnUrlPayRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.callback.into_into_dart().into_dart(), - self.0.min_sendable.into_into_dart().into_dart(), - self.0.max_sendable.into_into_dart().into_dart(), - self.0.metadata_str.into_into_dart().into_dart(), - self.0.comment_allowed.into_into_dart().into_dart(), - self.0.domain.into_into_dart().into_dart(), - self.0.allows_nostr.into_into_dart().into_dart(), - self.0.nostr_pubkey.into_dart(), - self.0.ln_address.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlPayRequestData {} -impl rust2dart::IntoIntoDart for LnUrlPayRequestData { - fn into_into_dart(self) -> mirror_LnUrlPayRequestData { - mirror_LnUrlPayRequestData(self) - } -} - -impl support::IntoDart for LnUrlPayResult { - fn into_dart(self) -> support::DartAbi { - match self { - Self::EndpointSuccess { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - Self::EndpointError { data } => vec![1.into_dart(), data.into_into_dart().into_dart()], - Self::PayError { data } => vec![2.into_dart(), data.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnUrlPayResult {} -impl rust2dart::IntoIntoDart for LnUrlPayResult { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for LnUrlPaySuccessData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.payment.into_into_dart().into_dart(), - self.success_action - .map(|v| mirror_SuccessActionProcessed(v)) - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LnUrlPaySuccessData {} -impl rust2dart::IntoIntoDart for LnUrlPaySuccessData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawRequestData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.callback.into_into_dart().into_dart(), - self.0.k1.into_into_dart().into_dart(), - self.0.default_description.into_into_dart().into_dart(), - self.0.min_withdrawable.into_into_dart().into_dart(), - self.0.max_withdrawable.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawRequestData {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawRequestData { - fn into_into_dart(self) -> mirror_LnUrlWithdrawRequestData { - mirror_LnUrlWithdrawRequestData(self) - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawResult { - fn into_dart(self) -> support::DartAbi { - match self.0 { - LnUrlWithdrawResult::Ok { data } => { - vec![0.into_dart(), data.into_into_dart().into_dart()] - } - LnUrlWithdrawResult::Timeout { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - LnUrlWithdrawResult::ErrorStatus { data } => { - vec![2.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawResult {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawResult { - fn into_into_dart(self) -> mirror_LnUrlWithdrawResult { - mirror_LnUrlWithdrawResult(self) - } -} - -impl support::IntoDart for mirror_LnUrlWithdrawSuccessData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.invoice.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawSuccessData {} -impl rust2dart::IntoIntoDart for LnUrlWithdrawSuccessData { - fn into_into_dart(self) -> mirror_LnUrlWithdrawSuccessData { - mirror_LnUrlWithdrawSuccessData(self) - } -} - -impl support::IntoDart for mirror_LocaleOverrides { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.locale.into_into_dart().into_dart(), - self.0.spacing.into_dart(), - self.0.symbol.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LocaleOverrides {} -impl rust2dart::IntoIntoDart for LocaleOverrides { - fn into_into_dart(self) -> mirror_LocaleOverrides { - mirror_LocaleOverrides(self) - } -} - -impl support::IntoDart for mirror_LocalizedName { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.locale.into_into_dart().into_dart(), - self.0.name.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_LocalizedName {} -impl rust2dart::IntoIntoDart for LocalizedName { - fn into_into_dart(self) -> mirror_LocalizedName { - mirror_LocalizedName(self) - } -} - -impl support::IntoDart for LogEntry { - fn into_dart(self) -> support::DartAbi { - vec![ - self.line.into_into_dart().into_dart(), - self.level.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LogEntry {} -impl rust2dart::IntoIntoDart for LogEntry { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for LspInformation { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.name.into_into_dart().into_dart(), - self.widget_url.into_into_dart().into_dart(), - self.pubkey.into_into_dart().into_dart(), - self.host.into_into_dart().into_dart(), - self.base_fee_msat.into_into_dart().into_dart(), - self.fee_rate.into_into_dart().into_dart(), - self.time_lock_delta.into_into_dart().into_dart(), - self.min_htlc_msat.into_into_dart().into_dart(), - self.lsp_pubkey.into_into_dart().into_dart(), - self.opening_fee_params_list.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for LspInformation {} -impl rust2dart::IntoIntoDart for LspInformation { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for MaxReverseSwapAmountResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.total_sat.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for MaxReverseSwapAmountResponse {} -impl rust2dart::IntoIntoDart for MaxReverseSwapAmountResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_MessageSuccessActionData { - fn into_dart(self) -> support::DartAbi { - vec![self.0.message.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_MessageSuccessActionData {} -impl rust2dart::IntoIntoDart for MessageSuccessActionData { - fn into_into_dart(self) -> mirror_MessageSuccessActionData { - mirror_MessageSuccessActionData(self) - } -} - -impl support::IntoDart for mirror_Network { - fn into_dart(self) -> support::DartAbi { - match self.0 { - Network::Bitcoin => 0, - Network::Testnet => 1, - Network::Signet => 2, - Network::Regtest => 3, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Network {} -impl rust2dart::IntoIntoDart for Network { - fn into_into_dart(self) -> mirror_Network { - mirror_Network(self) - } -} - -impl support::IntoDart for NodeConfig { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Greenlight { config } => vec![0.into_dart(), config.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeConfig {} -impl rust2dart::IntoIntoDart for NodeConfig { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for NodeCredentials { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Greenlight { credentials } => { - vec![0.into_dart(), credentials.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeCredentials {} -impl rust2dart::IntoIntoDart for NodeCredentials { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for NodeState { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.block_height.into_into_dart().into_dart(), - self.channels_balance_msat.into_into_dart().into_dart(), - self.onchain_balance_msat.into_into_dart().into_dart(), - self.pending_onchain_balance_msat - .into_into_dart() - .into_dart(), - self.utxos.into_into_dart().into_dart(), - self.max_payable_msat.into_into_dart().into_dart(), - self.max_receivable_msat.into_into_dart().into_dart(), - self.max_single_payment_amount_msat - .into_into_dart() - .into_dart(), - self.max_chan_reserve_msats.into_into_dart().into_dart(), - self.connected_peers.into_into_dart().into_dart(), - self.max_receivable_single_payment_amount_msat - .into_into_dart() - .into_dart(), - self.total_inbound_liquidity_msats - .into_into_dart() - .into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for NodeState {} -impl rust2dart::IntoIntoDart for NodeState { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OnchainPaymentLimitsResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min_sat.into_into_dart().into_dart(), - self.max_sat.into_into_dart().into_dart(), - self.max_payable_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OnchainPaymentLimitsResponse {} -impl rust2dart::IntoIntoDart for OnchainPaymentLimitsResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpenChannelFeeResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fee_msat.into_dart(), - self.fee_params.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpenChannelFeeResponse {} -impl rust2dart::IntoIntoDart for OpenChannelFeeResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpeningFeeParams { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min_msat.into_into_dart().into_dart(), - self.proportional.into_into_dart().into_dart(), - self.valid_until.into_into_dart().into_dart(), - self.max_idle_time.into_into_dart().into_dart(), - self.max_client_to_self_delay.into_into_dart().into_dart(), - self.promise.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpeningFeeParams {} -impl rust2dart::IntoIntoDart for OpeningFeeParams { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for OpeningFeeParamsMenu { - fn into_dart(self) -> support::DartAbi { - vec![self.values.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for OpeningFeeParamsMenu {} -impl rust2dart::IntoIntoDart for OpeningFeeParamsMenu { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PayOnchainResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.reverse_swap_info.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for PayOnchainResponse {} -impl rust2dart::IntoIntoDart for PayOnchainResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for Payment { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.payment_type.into_into_dart().into_dart(), - self.payment_time.into_into_dart().into_dart(), - self.amount_msat.into_into_dart().into_dart(), - self.fee_msat.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - self.error.into_dart(), - self.description.into_dart(), - self.details.into_into_dart().into_dart(), - self.metadata.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for Payment {} -impl rust2dart::IntoIntoDart for Payment { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentDetails { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Ln { data } => vec![0.into_dart(), data.into_into_dart().into_dart()], - Self::ClosedChannel { data } => vec![1.into_dart(), data.into_into_dart().into_dart()], - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentDetails {} -impl rust2dart::IntoIntoDart for PaymentDetails { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentFailedData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.error.into_into_dart().into_dart(), - self.node_id.into_into_dart().into_dart(), - self.invoice.map(|v| mirror_LNInvoice(v)).into_dart(), - self.label.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentFailedData {} -impl rust2dart::IntoIntoDart for PaymentFailedData { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Pending => 0, - Self::Complete => 1, - Self::Failed => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentStatus {} -impl rust2dart::IntoIntoDart for PaymentStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PaymentType { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Sent => 0, - Self::Received => 1, - Self::ClosedChannel => 2, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PaymentType {} -impl rust2dart::IntoIntoDart for PaymentType { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareOnchainPaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fees_hash.into_into_dart().into_dart(), - self.fees_percentage.into_into_dart().into_dart(), - self.fees_lockup.into_into_dart().into_dart(), - self.fees_claim.into_into_dart().into_dart(), - self.sender_amount_sat.into_into_dart().into_dart(), - self.recipient_amount_sat.into_into_dart().into_dart(), - self.total_fees.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareOnchainPaymentResponse {} -impl rust2dart::IntoIntoDart for PrepareOnchainPaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareRedeemOnchainFundsResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.tx_weight.into_into_dart().into_dart(), - self.tx_fee_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareRedeemOnchainFundsResponse {} -impl rust2dart::IntoIntoDart - for PrepareRedeemOnchainFundsResponse -{ - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for PrepareRefundResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.refund_tx_weight.into_into_dart().into_dart(), - self.refund_tx_fee_sat.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for PrepareRefundResponse {} -impl rust2dart::IntoIntoDart for PrepareRefundResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_Rate { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.coin.into_into_dart().into_dart(), - self.0.value.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Rate {} -impl rust2dart::IntoIntoDart for Rate { - fn into_into_dart(self) -> mirror_Rate { - mirror_Rate(self) - } -} - -impl support::IntoDart for ReceivePaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![ - self.ln_invoice.into_into_dart().into_dart(), - self.opening_fee_params.into_dart(), - self.opening_fee_msat.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReceivePaymentResponse {} -impl rust2dart::IntoIntoDart for ReceivePaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RecommendedFees { - fn into_dart(self) -> support::DartAbi { - vec![ - self.fastest_fee.into_into_dart().into_dart(), - self.half_hour_fee.into_into_dart().into_dart(), - self.hour_fee.into_into_dart().into_dart(), - self.economy_fee.into_into_dart().into_dart(), - self.minimum_fee.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for RecommendedFees {} -impl rust2dart::IntoIntoDart for RecommendedFees { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RedeemOnchainFundsResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.txid.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for RedeemOnchainFundsResponse {} -impl rust2dart::IntoIntoDart for RedeemOnchainFundsResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for RefundResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.refund_tx_id.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for RefundResponse {} -impl rust2dart::IntoIntoDart for RefundResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.id.into_into_dart().into_dart(), - self.claim_pubkey.into_into_dart().into_dart(), - self.lockup_txid.into_dart(), - self.claim_txid.into_dart(), - self.onchain_amount_sat.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapInfo {} -impl rust2dart::IntoIntoDart for ReverseSwapInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapPairInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.min.into_into_dart().into_dart(), - self.max.into_into_dart().into_dart(), - self.fees_hash.into_into_dart().into_dart(), - self.fees_percentage.into_into_dart().into_dart(), - self.fees_lockup.into_into_dart().into_dart(), - self.fees_claim.into_into_dart().into_dart(), - self.total_fees.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapPairInfo {} -impl rust2dart::IntoIntoDart for ReverseSwapPairInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ReverseSwapStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Initial => 0, - Self::InProgress => 1, - Self::Cancelled => 2, - Self::CompletedSeen => 3, - Self::CompletedConfirmed => 4, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for ReverseSwapStatus {} -impl rust2dart::IntoIntoDart for ReverseSwapStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_RouteHint { - fn into_dart(self) -> support::DartAbi { - vec![self.0.hops.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_RouteHint {} -impl rust2dart::IntoIntoDart for RouteHint { - fn into_into_dart(self) -> mirror_RouteHint { - mirror_RouteHint(self) - } -} - -impl support::IntoDart for mirror_RouteHintHop { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.src_node_id.into_into_dart().into_dart(), - self.0.short_channel_id.into_into_dart().into_dart(), - self.0.fees_base_msat.into_into_dart().into_dart(), - self.0 - .fees_proportional_millionths - .into_into_dart() - .into_dart(), - self.0.cltv_expiry_delta.into_into_dart().into_dart(), - self.0.htlc_minimum_msat.into_dart(), - self.0.htlc_maximum_msat.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_RouteHintHop {} -impl rust2dart::IntoIntoDart for RouteHintHop { - fn into_into_dart(self) -> mirror_RouteHintHop { - mirror_RouteHintHop(self) - } -} - -impl support::IntoDart for SendOnchainResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.reverse_swap_info.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SendOnchainResponse {} -impl rust2dart::IntoIntoDart for SendOnchainResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SendPaymentResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.payment.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SendPaymentResponse {} -impl rust2dart::IntoIntoDart for SendPaymentResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for ServiceHealthCheckResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.status.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for ServiceHealthCheckResponse {} -impl rust2dart::IntoIntoDart for ServiceHealthCheckResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SignMessageResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.signature.into_into_dart().into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for SignMessageResponse {} -impl rust2dart::IntoIntoDart for SignMessageResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for StaticBackupResponse { - fn into_dart(self) -> support::DartAbi { - vec![self.backup.into_dart()].into_dart() - } -} -impl support::IntoDartExceptPrimitive for StaticBackupResponse {} -impl rust2dart::IntoIntoDart for StaticBackupResponse { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_SuccessActionProcessed { - fn into_dart(self) -> support::DartAbi { - match self.0 { - SuccessActionProcessed::Aes { result } => { - vec![0.into_dart(), result.into_into_dart().into_dart()] - } - SuccessActionProcessed::Message { data } => { - vec![1.into_dart(), data.into_into_dart().into_dart()] - } - SuccessActionProcessed::Url { data } => { - vec![2.into_dart(), data.into_into_dart().into_dart()] - } - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_SuccessActionProcessed {} -impl rust2dart::IntoIntoDart for SuccessActionProcessed { - fn into_into_dart(self) -> mirror_SuccessActionProcessed { - mirror_SuccessActionProcessed(self) - } -} - -impl support::IntoDart for SwapInfo { - fn into_dart(self) -> support::DartAbi { - vec![ - self.bitcoin_address.into_into_dart().into_dart(), - self.created_at.into_into_dart().into_dart(), - self.lock_height.into_into_dart().into_dart(), - self.payment_hash.into_into_dart().into_dart(), - self.preimage.into_into_dart().into_dart(), - self.private_key.into_into_dart().into_dart(), - self.public_key.into_into_dart().into_dart(), - self.swapper_public_key.into_into_dart().into_dart(), - self.script.into_into_dart().into_dart(), - self.bolt11.into_dart(), - self.paid_msat.into_into_dart().into_dart(), - self.total_incoming_txs.into_into_dart().into_dart(), - self.confirmed_sats.into_into_dart().into_dart(), - self.unconfirmed_sats.into_into_dart().into_dart(), - self.status.into_into_dart().into_dart(), - self.refund_tx_ids.into_into_dart().into_dart(), - self.unconfirmed_tx_ids.into_into_dart().into_dart(), - self.confirmed_tx_ids.into_into_dart().into_dart(), - self.min_allowed_deposit.into_into_dart().into_dart(), - self.max_allowed_deposit.into_into_dart().into_dart(), - self.max_swapper_payable.into_into_dart().into_dart(), - self.last_redeem_error.into_dart(), - self.channel_opening_fees.into_dart(), - self.confirmed_at.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for SwapInfo {} -impl rust2dart::IntoIntoDart for SwapInfo { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for SwapStatus { - fn into_dart(self) -> support::DartAbi { - match self { - Self::Initial => 0, - Self::WaitingConfirmation => 1, - Self::Redeemable => 2, - Self::Redeemed => 3, - Self::Refundable => 4, - Self::Completed => 5, - } - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for SwapStatus {} -impl rust2dart::IntoIntoDart for SwapStatus { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_Symbol { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.grapheme.into_dart(), - self.0.template.into_dart(), - self.0.rtl.into_dart(), - self.0.position.into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_Symbol {} -impl rust2dart::IntoIntoDart for Symbol { - fn into_into_dart(self) -> mirror_Symbol { - mirror_Symbol(self) - } -} - -impl support::IntoDart for UnspentTransactionOutput { - fn into_dart(self) -> support::DartAbi { - vec![ - self.txid.into_into_dart().into_dart(), - self.outnum.into_into_dart().into_dart(), - self.amount_millisatoshi.into_into_dart().into_dart(), - self.address.into_into_dart().into_dart(), - self.reserved.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for UnspentTransactionOutput {} -impl rust2dart::IntoIntoDart for UnspentTransactionOutput { - fn into_into_dart(self) -> Self { - self - } -} - -impl support::IntoDart for mirror_UrlSuccessActionData { - fn into_dart(self) -> support::DartAbi { - vec![ - self.0.description.into_into_dart().into_dart(), - self.0.url.into_into_dart().into_dart(), - ] - .into_dart() - } -} -impl support::IntoDartExceptPrimitive for mirror_UrlSuccessActionData {} -impl rust2dart::IntoIntoDart for UrlSuccessActionData { - fn into_into_dart(self) -> mirror_UrlSuccessActionData { - mirror_UrlSuccessActionData(self) - } -} - -// Section: executor - -support::lazy_static! { - pub static ref FLUTTER_RUST_BRIDGE_HANDLER: support::DefaultHandler = Default::default(); -} - -#[cfg(not(target_family = "wasm"))] -#[path = "bridge_generated.io.rs"] -mod io; -#[cfg(not(target_family = "wasm"))] -pub use self::io::*; diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index 9a7d6a83e..ca19bfa19 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. #![allow( non_camel_case_types, @@ -37,8 +37,8 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_opaque = RustOpaqueNom, default_rust_auto_opaque = RustAutoOpaqueNom, ); -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 847148110; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.5.1"; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -488953100; // Section: executor @@ -205,6 +205,29 @@ fn wire__crate__binding__check_message_impl( }, ) } +fn wire__crate__binding__claim_reverse_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + lockup_address: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + flutter_rust_bridge::for_generated::TaskInfo { + debug_name: "claim_reverse_swap", + port: Some(port_), + mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + }, + move || { + let api_lockup_address = lockup_address.cst_decode(); + move |context| { + transform_result_dco::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>( + (move || { + let output_ok = crate::binding::claim_reverse_swap(api_lockup_address)?; + Ok(output_ok) + })(), + ) + } + }, + ) +} fn wire__crate__binding__close_lsp_channels_impl( port_: flutter_rust_bridge::for_generated::MessagePort, ) { @@ -1532,8 +1555,10 @@ const _: fn() = || { let LnUrlPayRequest = None::.unwrap(); let _: crate::binding::LnUrlPayRequestData = LnUrlPayRequest.data; let _: u64 = LnUrlPayRequest.amount_msat; + let _: bool = LnUrlPayRequest.use_trampoline; let _: Option = LnUrlPayRequest.comment; let _: Option = LnUrlPayRequest.payment_label; + let _: Option = LnUrlPayRequest.validate_success_action_url; } { let LnUrlPayRequestData = None::.unwrap(); @@ -1565,6 +1590,9 @@ const _: fn() = || { crate::binding::LnUrlWithdrawResult::Ok { data } => { let _: crate::binding::LnUrlWithdrawSuccessData = data; } + crate::binding::LnUrlWithdrawResult::Timeout { data } => { + let _: crate::binding::LnUrlWithdrawSuccessData = data; + } crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { let _: crate::binding::LnUrlErrorData = data; } @@ -1600,7 +1628,7 @@ const _: fn() = || { { let RouteHintHop = None::.unwrap(); let _: String = RouteHintHop.src_node_id; - let _: u64 = RouteHintHop.short_channel_id; + let _: String = RouteHintHop.short_channel_id; let _: u32 = RouteHintHop.fees_base_msat; let _: u32 = RouteHintHop.fees_proportional_millionths; let _: u64 = RouteHintHop.cltv_expiry_delta; @@ -1629,6 +1657,7 @@ const _: fn() = || { let UrlSuccessActionData = None::.unwrap(); let _: String = UrlSuccessActionData.description; let _: String = UrlSuccessActionData.url; + let _: bool = UrlSuccessActionData.matches_callback_domain; } }; @@ -1975,6 +2004,12 @@ impl SseDecode for crate::breez_services::BreezEvent { }; } 8 => { + let mut var_details = ::sse_decode(deserializer); + return crate::breez_services::BreezEvent::ReverseSwapUpdated { + details: var_details, + }; + } + 9 => { let mut var_details = ::sse_decode(deserializer); return crate::breez_services::BreezEvent::SwapUpdated { details: var_details, @@ -2004,9 +2039,11 @@ impl SseDecode for crate::models::BuyBitcoinRequest { let mut var_provider = ::sse_decode(deserializer); let mut var_openingFeeParams = >::sse_decode(deserializer); + let mut var_redirectUrl = >::sse_decode(deserializer); return crate::models::BuyBitcoinRequest { provider: var_provider, opening_fee_params: var_openingFeeParams, + redirect_url: var_redirectUrl, }; } } @@ -2676,13 +2713,17 @@ impl SseDecode for crate::binding::LnUrlPayRequest { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_data = ::sse_decode(deserializer); let mut var_amountMsat = ::sse_decode(deserializer); + let mut var_useTrampoline = ::sse_decode(deserializer); let mut var_comment = >::sse_decode(deserializer); let mut var_paymentLabel = >::sse_decode(deserializer); + let mut var_validateSuccessActionUrl = >::sse_decode(deserializer); return crate::binding::LnUrlPayRequest { data: var_data, amount_msat: var_amountMsat, + use_trampoline: var_useTrampoline, comment: var_comment, payment_label: var_paymentLabel, + validate_success_action_url: var_validateSuccessActionUrl, }; } } @@ -2794,6 +2835,11 @@ impl SseDecode for crate::binding::LnUrlWithdrawResult { return crate::binding::LnUrlWithdrawResult::Ok { data: var_data }; } 1 => { + let mut var_data = + ::sse_decode(deserializer); + return crate::binding::LnUrlWithdrawResult::Timeout { data: var_data }; + } + 2 => { let mut var_data = ::sse_decode(deserializer); return crate::binding::LnUrlWithdrawResult::ErrorStatus { data: var_data }; } @@ -2980,7 +3026,8 @@ impl SseDecode for crate::models::NodeState { let mut var_maxSinglePaymentAmountMsat = ::sse_decode(deserializer); let mut var_maxChanReserveMsats = ::sse_decode(deserializer); let mut var_connectedPeers = >::sse_decode(deserializer); - let mut var_inboundLiquidityMsats = ::sse_decode(deserializer); + let mut var_maxReceivableSinglePaymentAmountMsat = ::sse_decode(deserializer); + let mut var_totalInboundLiquidityMsats = ::sse_decode(deserializer); return crate::models::NodeState { id: var_id, block_height: var_blockHeight, @@ -2993,7 +3040,8 @@ impl SseDecode for crate::models::NodeState { max_single_payment_amount_msat: var_maxSinglePaymentAmountMsat, max_chan_reserve_msats: var_maxChanReserveMsats, connected_peers: var_connectedPeers, - inbound_liquidity_msats: var_inboundLiquidityMsats, + max_receivable_single_payment_amount_msat: var_maxReceivableSinglePaymentAmountMsat, + total_inbound_liquidity_msats: var_totalInboundLiquidityMsats, }; } } @@ -3003,9 +3051,11 @@ impl SseDecode for crate::models::OnchainPaymentLimitsResponse { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_minSat = ::sse_decode(deserializer); let mut var_maxSat = ::sse_decode(deserializer); + let mut var_maxPayableSat = ::sse_decode(deserializer); return crate::models::OnchainPaymentLimitsResponse { min_sat: var_minSat, max_sat: var_maxSat, + max_payable_sat: var_maxPayableSat, }; } } @@ -3736,7 +3786,7 @@ impl SseDecode for crate::binding::RouteHintHop { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_srcNodeId = ::sse_decode(deserializer); - let mut var_shortChannelId = ::sse_decode(deserializer); + let mut var_shortChannelId = ::sse_decode(deserializer); let mut var_feesBaseMsat = ::sse_decode(deserializer); let mut var_feesProportionalMillionths = ::sse_decode(deserializer); let mut var_cltvExpiryDelta = ::sse_decode(deserializer); @@ -3784,10 +3834,12 @@ impl SseDecode for crate::models::SendPaymentRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_bolt11 = ::sse_decode(deserializer); + let mut var_useTrampoline = ::sse_decode(deserializer); let mut var_amountMsat = >::sse_decode(deserializer); let mut var_label = >::sse_decode(deserializer); return crate::models::SendPaymentRequest { bolt11: var_bolt11, + use_trampoline: var_useTrampoline, amount_msat: var_amountMsat, label: var_label, }; @@ -4061,9 +4113,11 @@ impl SseDecode for crate::binding::UrlSuccessActionData { fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { let mut var_description = ::sse_decode(deserializer); let mut var_url = ::sse_decode(deserializer); + let mut var_matchesCallbackDomain = ::sse_decode(deserializer); return crate::binding::UrlSuccessActionData { description: var_description, url: var_url, + matches_callback_domain: var_matchesCallbackDomain, }; } } @@ -4241,9 +4295,12 @@ impl flutter_rust_bridge::IntoDart for crate::breez_services::BreezEvent { crate::breez_services::BreezEvent::BackupFailed { details } => { [7.into_dart(), details.into_into_dart().into_dart()].into_dart() } - crate::breez_services::BreezEvent::SwapUpdated { details } => { + crate::breez_services::BreezEvent::ReverseSwapUpdated { details } => { [8.into_dart(), details.into_into_dart().into_dart()].into_dart() } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + [9.into_dart(), details.into_into_dart().into_dart()].into_dart() + } _ => { unimplemented!(""); } @@ -4287,6 +4344,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::BuyBitcoinRequest { [ self.provider.into_into_dart().into_dart(), self.opening_fee_params.into_into_dart().into_dart(), + self.redirect_url.into_into_dart().into_dart(), ] .into_dart() } @@ -4869,8 +4927,13 @@ impl flutter_rust_bridge::IntoDart for FrbWrapper { [0.into_dart(), data.into_into_dart().into_dart()].into_dart() } - crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::Timeout { data } => { [1.into_dart(), data.into_into_dart().into_dart()].into_dart() } + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + [2.into_dart(), data.into_into_dart().into_dart()].into_dart() + } _ => { unimplemented!(""); } @@ -5276,7 +5342,12 @@ impl flutter_rust_bridge::IntoDart for crate::models::NodeState { .into_dart(), self.max_chan_reserve_msats.into_into_dart().into_dart(), self.connected_peers.into_into_dart().into_dart(), - self.inbound_liquidity_msats.into_into_dart().into_dart(), + self.max_receivable_single_payment_amount_msat + .into_into_dart() + .into_dart(), + self.total_inbound_liquidity_msats + .into_into_dart() + .into_dart(), ] .into_dart() } @@ -5293,6 +5364,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::OnchainPaymentLimitsRespon [ self.min_sat.into_into_dart().into_dart(), self.max_sat.into_into_dart().into_dart(), + self.max_payable_sat.into_into_dart().into_dart(), ] .into_dart() } @@ -6100,6 +6172,7 @@ impl flutter_rust_bridge::IntoDart for crate::models::SendPaymentRequest { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ self.bolt11.into_into_dart().into_dart(), + self.use_trampoline.into_into_dart().into_dart(), self.amount_msat.into_into_dart().into_dart(), self.label.into_into_dart().into_dart(), ] @@ -6417,6 +6490,7 @@ impl flutter_rust_bridge::IntoDart for FrbWrapper::sse_encode(7, serializer); ::sse_encode(details, serializer); } - crate::breez_services::BreezEvent::SwapUpdated { details } => { + crate::breez_services::BreezEvent::ReverseSwapUpdated { details } => { ::sse_encode(8, serializer); + ::sse_encode(details, serializer); + } + crate::breez_services::BreezEvent::SwapUpdated { details } => { + ::sse_encode(9, serializer); ::sse_encode(details, serializer); } _ => { @@ -6594,6 +6672,7 @@ impl SseEncode for crate::models::BuyBitcoinRequest { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.provider, serializer); >::sse_encode(self.opening_fee_params, serializer); + >::sse_encode(self.redirect_url, serializer); } } @@ -7109,8 +7188,10 @@ impl SseEncode for crate::binding::LnUrlPayRequest { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.data, serializer); ::sse_encode(self.amount_msat, serializer); + ::sse_encode(self.use_trampoline, serializer); >::sse_encode(self.comment, serializer); >::sse_encode(self.payment_label, serializer); + >::sse_encode(self.validate_success_action_url, serializer); } } @@ -7191,8 +7272,12 @@ impl SseEncode for crate::binding::LnUrlWithdrawResult { ::sse_encode(0, serializer); ::sse_encode(data, serializer); } - crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + crate::binding::LnUrlWithdrawResult::Timeout { data } => { ::sse_encode(1, serializer); + ::sse_encode(data, serializer); + } + crate::binding::LnUrlWithdrawResult::ErrorStatus { data } => { + ::sse_encode(2, serializer); ::sse_encode(data, serializer); } _ => { @@ -7335,7 +7420,8 @@ impl SseEncode for crate::models::NodeState { ::sse_encode(self.max_single_payment_amount_msat, serializer); ::sse_encode(self.max_chan_reserve_msats, serializer); >::sse_encode(self.connected_peers, serializer); - ::sse_encode(self.inbound_liquidity_msats, serializer); + ::sse_encode(self.max_receivable_single_payment_amount_msat, serializer); + ::sse_encode(self.total_inbound_liquidity_msats, serializer); } } @@ -7344,6 +7430,7 @@ impl SseEncode for crate::models::OnchainPaymentLimitsResponse { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.min_sat, serializer); ::sse_encode(self.max_sat, serializer); + ::sse_encode(self.max_payable_sat, serializer); } } @@ -7913,7 +8000,7 @@ impl SseEncode for crate::binding::RouteHintHop { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.src_node_id, serializer); - ::sse_encode(self.short_channel_id, serializer); + ::sse_encode(self.short_channel_id, serializer); ::sse_encode(self.fees_base_msat, serializer); ::sse_encode(self.fees_proportional_millionths, serializer); ::sse_encode(self.cltv_expiry_delta, serializer); @@ -7943,6 +8030,7 @@ impl SseEncode for crate::models::SendPaymentRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.bolt11, serializer); + ::sse_encode(self.use_trampoline, serializer); >::sse_encode(self.amount_msat, serializer); >::sse_encode(self.label, serializer); } @@ -8159,11 +8247,5483 @@ impl SseEncode for crate::binding::UrlSuccessActionData { fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { ::sse_encode(self.description, serializer); ::sse_encode(self.url, serializer); + ::sse_encode(self.matches_callback_domain, serializer); } } #[cfg(not(target_family = "wasm"))] -#[path = "frb_generated.io.rs"] -mod io; +mod io { + // This file is automatically generated, so please do not edit it. + // @generated by `flutter_rust_bridge`@ 2.5.1. + + // Section: imports + + use super::*; + use crate::breez_services::EventListener; + use flutter_rust_bridge::for_generated::byteorder::{ + NativeEndian, ReadBytesExt, WriteBytesExt, + }; + use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable}; + use flutter_rust_bridge::{Handler, IntoIntoDart}; + + // Section: boilerplate + + flutter_rust_bridge::frb_generated_boilerplate_io!(); + + // Section: dart2rust + + impl CstDecode + for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error { + unimplemented!() + } + } + impl + CstDecode< + StreamSink< + crate::breez_services::BreezEvent, + flutter_rust_bridge::for_generated::DcoCodec, + >, + > for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink< + crate::breez_services::BreezEvent, + flutter_rust_bridge::for_generated::DcoCodec, + > { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } + } + impl + CstDecode> + for *mut wire_cst_list_prim_u_8_strict + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> StreamSink + { + let raw: String = self.cst_decode(); + StreamSink::deserialize(raw) + } + } + impl CstDecode for *mut wire_cst_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> String { + let vec: Vec = self.cst_decode(); + String::from_utf8(vec).unwrap() + } + } + impl CstDecode + for wire_cst_aes_success_action_data_decrypted + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { + crate::binding::AesSuccessActionDataDecrypted { + description: self.description.cst_decode(), + plaintext: self.plaintext.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_aes_success_action_data_result + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Decrypted }; + crate::binding::AesSuccessActionDataResult::Decrypted { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::AesSuccessActionDataResult::ErrorStatus { + reason: ans.reason.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + crate::breez_services::BackupFailedData { + error: self.error.cst_decode(), + } + } + } + impl CstDecode for wire_cst_backup_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BackupStatus { + crate::models::BackupStatus { + backed_up: self.backed_up.cst_decode(), + last_backup_time: self.last_backup_time.cst_decode(), + } + } + } + impl CstDecode for wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + crate::binding::BindingEventListener {} + } + } + impl CstDecode for wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BitcoinAddressData { + crate::binding::BitcoinAddressData { + address: self.address.cst_decode(), + network: self.network.cst_decode(), + amount_sat: self.amount_sat.cst_decode(), + label: self.label.cst_decode(), + message: self.message.cst_decode(), + } + } + } + impl CstDecode + for *mut wire_cst_aes_success_action_data_decrypted + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataDecrypted { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_aes_success_action_data_result + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::AesSuccessActionDataResult { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_backup_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BackupFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_binding_event_listener { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BindingEventListener { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_bitcoin_address_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::BitcoinAddressData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut bool { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> bool { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_closed_channel_payment_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_greenlight_device_credentials + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut i64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> i64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LNInvoice { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ln_url_withdraw_request_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_ln_url_withdraw_success_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_message_success_action_data + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_prepare_onchain_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_prepare_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_report_payment_failure_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode + for *mut wire_cst_send_spontaneous_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_sign_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_success_action_processed { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Symbol { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for *mut u32 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u32 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut u64 { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> u64 { + unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) } + } + } + impl CstDecode for *mut wire_cst_url_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { + let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }; + CstDecode::::cst_decode(*wrap).into() + } + } + impl CstDecode for wire_cst_breez_event { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::BreezEvent { + match self.tag { + 0 => { + let ans = unsafe { self.kind.NewBlock }; + crate::breez_services::BreezEvent::NewBlock { + block: ans.block.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.InvoicePaid }; + crate::breez_services::BreezEvent::InvoicePaid { + details: ans.details.cst_decode(), + } + } + 2 => crate::breez_services::BreezEvent::Synced, + 3 => { + let ans = unsafe { self.kind.PaymentSucceed }; + crate::breez_services::BreezEvent::PaymentSucceed { + details: ans.details.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.PaymentFailed }; + crate::breez_services::BreezEvent::PaymentFailed { + details: ans.details.cst_decode(), + } + } + 5 => crate::breez_services::BreezEvent::BackupStarted, + 6 => crate::breez_services::BreezEvent::BackupSucceeded, + 7 => { + let ans = unsafe { self.kind.BackupFailed }; + crate::breez_services::BreezEvent::BackupFailed { + details: ans.details.cst_decode(), + } + } + 8 => { + let ans = unsafe { self.kind.ReverseSwapUpdated }; + crate::breez_services::BreezEvent::ReverseSwapUpdated { + details: ans.details.cst_decode(), + } + } + 9 => { + let ans = unsafe { self.kind.SwapUpdated }; + crate::breez_services::BreezEvent::SwapUpdated { + details: ans.details.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_buy_bitcoin_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinRequest { + crate::models::BuyBitcoinRequest { + provider: self.provider.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + redirect_url: self.redirect_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_buy_bitcoin_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::BuyBitcoinResponse { + crate::models::BuyBitcoinResponse { + url: self.url.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_check_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageRequest { + crate::breez_services::CheckMessageRequest { + message: self.message.cst_decode(), + pubkey: self.pubkey.cst_decode(), + signature: self.signature.cst_decode(), + } + } + } + impl CstDecode for wire_cst_check_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::CheckMessageResponse { + crate::breez_services::CheckMessageResponse { + is_valid: self.is_valid.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_closed_channel_payment_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ClosedChannelPaymentDetails { + crate::models::ClosedChannelPaymentDetails { + state: self.state.cst_decode(), + funding_txid: self.funding_txid.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + closing_txid: self.closing_txid.cst_decode(), + } + } + } + impl CstDecode for wire_cst_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Config { + crate::models::Config { + breezserver: self.breezserver.cst_decode(), + chainnotifier_url: self.chainnotifier_url.cst_decode(), + mempoolspace_url: self.mempoolspace_url.cst_decode(), + working_dir: self.working_dir.cst_decode(), + network: self.network.cst_decode(), + payment_timeout_sec: self.payment_timeout_sec.cst_decode(), + default_lsp_id: self.default_lsp_id.cst_decode(), + api_key: self.api_key.cst_decode(), + maxfee_percent: self.maxfee_percent.cst_decode(), + exemptfee_msat: self.exemptfee_msat.cst_decode(), + node_config: self.node_config.cst_decode(), + } + } + } + impl CstDecode for wire_cst_configure_node_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConfigureNodeRequest { + crate::models::ConfigureNodeRequest { + close_to_address: self.close_to_address.cst_decode(), + } + } + } + impl CstDecode for wire_cst_connect_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ConnectRequest { + crate::models::ConnectRequest { + config: self.config.cst_decode(), + seed: self.seed.cst_decode(), + restore_only: self.restore_only.cst_decode(), + } + } + } + impl CstDecode for wire_cst_currency_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::CurrencyInfo { + crate::binding::CurrencyInfo { + name: self.name.cst_decode(), + fraction_size: self.fraction_size.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + uniq_symbol: self.uniq_symbol.cst_decode(), + localized_name: self.localized_name.cst_decode(), + locale_overrides: self.locale_overrides.cst_decode(), + } + } + } + impl CstDecode for wire_cst_fiat_currency { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::FiatCurrency { + crate::binding::FiatCurrency { + id: self.id.cst_decode(), + info: self.info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_greenlight_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightCredentials { + crate::models::GreenlightCredentials { + developer_key: self.developer_key.cst_decode(), + developer_cert: self.developer_cert.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_greenlight_device_credentials + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightDeviceCredentials { + crate::models::GreenlightDeviceCredentials { + device: self.device.cst_decode(), + } + } + } + impl CstDecode for wire_cst_greenlight_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::GreenlightNodeConfig { + crate::models::GreenlightNodeConfig { + partner_credentials: self.partner_credentials.cst_decode(), + invite_code: self.invite_code.cst_decode(), + } + } + } + impl CstDecode for wire_cst_input_type { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::InputType { + match self.tag { + 0 => { + let ans = unsafe { self.kind.BitcoinAddress }; + crate::binding::InputType::BitcoinAddress { + address: ans.address.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Bolt11 }; + crate::binding::InputType::Bolt11 { + invoice: ans.invoice.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.NodeId }; + crate::binding::InputType::NodeId { + node_id: ans.node_id.cst_decode(), + } + } + 3 => { + let ans = unsafe { self.kind.Url }; + crate::binding::InputType::Url { + url: ans.url.cst_decode(), + } + } + 4 => { + let ans = unsafe { self.kind.LnUrlPay }; + crate::binding::InputType::LnUrlPay { + data: ans.data.cst_decode(), + } + } + 5 => { + let ans = unsafe { self.kind.LnUrlWithdraw }; + crate::binding::InputType::LnUrlWithdraw { + data: ans.data.cst_decode(), + } + } + 6 => { + let ans = unsafe { self.kind.LnUrlAuth }; + crate::binding::InputType::LnUrlAuth { + data: ans.data.cst_decode(), + } + } + 7 => { + let ans = unsafe { self.kind.LnUrlError }; + crate::binding::InputType::LnUrlError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_invoice_paid_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::InvoicePaidDetails { + crate::breez_services::InvoicePaidDetails { + payment_hash: self.payment_hash.cst_decode(), + bolt11: self.bolt11.cst_decode(), + payment: self.payment.cst_decode(), + } + } + } + impl CstDecode> for *mut wire_cst_list_String { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_fiat_currency { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_locale_overrides { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_localized_name { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_metadata_filter { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_payment_type_filter { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode for wire_cst_list_payments_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ListPaymentsRequest { + crate::models::ListPaymentsRequest { + filters: self.filters.cst_decode(), + metadata_filters: self.metadata_filters.cst_decode(), + from_timestamp: self.from_timestamp.cst_decode(), + to_timestamp: self.to_timestamp.cst_decode(), + include_failures: self.include_failures.cst_decode(), + offset: self.offset.cst_decode(), + limit: self.limit.cst_decode(), + } + } + } + impl CstDecode> for *mut wire_cst_list_prim_u_8_strict { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + } + } + } + impl CstDecode> for *mut wire_cst_list_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_route_hint { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_route_hint_hop { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> for *mut wire_cst_list_tlv_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode> + for *mut wire_cst_list_unspent_transaction_output + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> Vec { + let vec = unsafe { + let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self); + flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len) + }; + vec.into_iter().map(CstDecode::cst_decode).collect() + } + } + impl CstDecode for wire_cst_ln_invoice { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LNInvoice { + crate::binding::LNInvoice { + bolt11: self.bolt11.cst_decode(), + network: self.network.cst_decode(), + payee_pubkey: self.payee_pubkey.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + description: self.description.cst_decode(), + description_hash: self.description_hash.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + timestamp: self.timestamp.cst_decode(), + expiry: self.expiry.cst_decode(), + routing_hints: self.routing_hints.cst_decode(), + payment_secret: self.payment_secret.cst_decode(), + min_final_cltv_expiry_delta: self.min_final_cltv_expiry_delta.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LnPaymentDetails { + crate::models::LnPaymentDetails { + payment_hash: self.payment_hash.cst_decode(), + label: self.label.cst_decode(), + destination_pubkey: self.destination_pubkey.cst_decode(), + payment_preimage: self.payment_preimage.cst_decode(), + keysend: self.keysend.cst_decode(), + bolt11: self.bolt11.cst_decode(), + open_channel_bolt11: self.open_channel_bolt11.cst_decode(), + lnurl_success_action: self.lnurl_success_action.cst_decode(), + lnurl_pay_domain: self.lnurl_pay_domain.cst_decode(), + lnurl_pay_comment: self.lnurl_pay_comment.cst_decode(), + ln_address: self.ln_address.cst_decode(), + lnurl_metadata: self.lnurl_metadata.cst_decode(), + lnurl_withdraw_endpoint: self.lnurl_withdraw_endpoint.cst_decode(), + swap_info: self.swap_info.cst_decode(), + reverse_swap_info: self.reverse_swap_info.cst_decode(), + pending_expiration_block: self.pending_expiration_block.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_auth_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlAuthRequestData { + crate::binding::LnUrlAuthRequestData { + k1: self.k1.cst_decode(), + action: self.action.cst_decode(), + domain: self.domain.cst_decode(), + url: self.url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_callback_status { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlCallbackStatus { + match self.tag { + 0 => crate::binding::LnUrlCallbackStatus::Ok, + 1 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::LnUrlCallbackStatus::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlErrorData { + crate::binding::LnUrlErrorData { + reason: self.reason.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_error_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayErrorData { + crate::binding::LnUrlPayErrorData { + payment_hash: self.payment_hash.cst_decode(), + reason: self.reason.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequest { + crate::binding::LnUrlPayRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + use_trampoline: self.use_trampoline.cst_decode(), + comment: self.comment.cst_decode(), + payment_label: self.payment_label.cst_decode(), + validate_success_action_url: self.validate_success_action_url.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlPayRequestData { + crate::binding::LnUrlPayRequestData { + callback: self.callback.cst_decode(), + min_sendable: self.min_sendable.cst_decode(), + max_sendable: self.max_sendable.cst_decode(), + metadata_str: self.metadata_str.cst_decode(), + comment_allowed: self.comment_allowed.cst_decode(), + domain: self.domain.cst_decode(), + allows_nostr: self.allows_nostr.cst_decode(), + nostr_pubkey: self.nostr_pubkey.cst_decode(), + ln_address: self.ln_address.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPayResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.EndpointSuccess }; + crate::lnurl::pay::LnUrlPayResult::EndpointSuccess { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.EndpointError }; + crate::lnurl::pay::LnUrlPayResult::EndpointError { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.PayError }; + crate::lnurl::pay::LnUrlPayResult::PayError { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_pay_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lnurl::pay::LnUrlPaySuccessData { + crate::lnurl::pay::LnUrlPaySuccessData { + payment: self.payment.cst_decode(), + success_action: self.success_action.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequest { + crate::binding::LnUrlWithdrawRequest { + data: self.data.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_request_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawRequestData { + crate::binding::LnUrlWithdrawRequestData { + callback: self.callback.cst_decode(), + k1: self.k1.cst_decode(), + default_description: self.default_description.cst_decode(), + min_withdrawable: self.min_withdrawable.cst_decode(), + max_withdrawable: self.max_withdrawable.cst_decode(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_result { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawResult { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ok }; + crate::binding::LnUrlWithdrawResult::Ok { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Timeout }; + crate::binding::LnUrlWithdrawResult::Timeout { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ErrorStatus }; + crate::binding::LnUrlWithdrawResult::ErrorStatus { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_ln_url_withdraw_success_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LnUrlWithdrawSuccessData { + crate::binding::LnUrlWithdrawSuccessData { + invoice: self.invoice.cst_decode(), + } + } + } + impl CstDecode for wire_cst_locale_overrides { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LocaleOverrides { + crate::binding::LocaleOverrides { + locale: self.locale.cst_decode(), + spacing: self.spacing.cst_decode(), + symbol: self.symbol.cst_decode(), + } + } + } + impl CstDecode for wire_cst_localized_name { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::LocalizedName { + crate::binding::LocalizedName { + locale: self.locale.cst_decode(), + name: self.name.cst_decode(), + } + } + } + impl CstDecode for wire_cst_log_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::LogEntry { + crate::models::LogEntry { + line: self.line.cst_decode(), + level: self.level.cst_decode(), + } + } + } + impl CstDecode for wire_cst_lsp_information { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::lsp::LspInformation { + crate::lsp::LspInformation { + id: self.id.cst_decode(), + name: self.name.cst_decode(), + widget_url: self.widget_url.cst_decode(), + pubkey: self.pubkey.cst_decode(), + host: self.host.cst_decode(), + base_fee_msat: self.base_fee_msat.cst_decode(), + fee_rate: self.fee_rate.cst_decode(), + time_lock_delta: self.time_lock_delta.cst_decode(), + min_htlc_msat: self.min_htlc_msat.cst_decode(), + lsp_pubkey: self.lsp_pubkey.cst_decode(), + opening_fee_params_list: self.opening_fee_params_list.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_max_reverse_swap_amount_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MaxReverseSwapAmountResponse { + crate::models::MaxReverseSwapAmountResponse { + total_sat: self.total_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_message_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::MessageSuccessActionData { + crate::binding::MessageSuccessActionData { + message: self.message.cst_decode(), + } + } + } + impl CstDecode for wire_cst_metadata_filter { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::MetadataFilter { + crate::models::MetadataFilter { + json_path: self.json_path.cst_decode(), + json_value: self.json_value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_node_config { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeConfig { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeConfig::Greenlight { + config: ans.config.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_node_credentials { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeCredentials { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Greenlight }; + crate::models::NodeCredentials::Greenlight { + credentials: ans.credentials.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_node_state { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::NodeState { + crate::models::NodeState { + id: self.id.cst_decode(), + block_height: self.block_height.cst_decode(), + channels_balance_msat: self.channels_balance_msat.cst_decode(), + onchain_balance_msat: self.onchain_balance_msat.cst_decode(), + pending_onchain_balance_msat: self.pending_onchain_balance_msat.cst_decode(), + utxos: self.utxos.cst_decode(), + max_payable_msat: self.max_payable_msat.cst_decode(), + max_receivable_msat: self.max_receivable_msat.cst_decode(), + max_single_payment_amount_msat: self.max_single_payment_amount_msat.cst_decode(), + max_chan_reserve_msats: self.max_chan_reserve_msats.cst_decode(), + connected_peers: self.connected_peers.cst_decode(), + max_receivable_single_payment_amount_msat: self + .max_receivable_single_payment_amount_msat + .cst_decode(), + total_inbound_liquidity_msats: self.total_inbound_liquidity_msats.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_onchain_payment_limits_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OnchainPaymentLimitsResponse { + crate::models::OnchainPaymentLimitsResponse { + min_sat: self.min_sat.cst_decode(), + max_sat: self.max_sat.cst_decode(), + max_payable_sat: self.max_payable_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_open_channel_fee_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeRequest { + crate::models::OpenChannelFeeRequest { + amount_msat: self.amount_msat.cst_decode(), + expiry: self.expiry.cst_decode(), + } + } + } + impl CstDecode for wire_cst_open_channel_fee_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpenChannelFeeResponse { + crate::models::OpenChannelFeeResponse { + fee_msat: self.fee_msat.cst_decode(), + fee_params: self.fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_opening_fee_params { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParams { + crate::models::OpeningFeeParams { + min_msat: self.min_msat.cst_decode(), + proportional: self.proportional.cst_decode(), + valid_until: self.valid_until.cst_decode(), + max_idle_time: self.max_idle_time.cst_decode(), + max_client_to_self_delay: self.max_client_to_self_delay.cst_decode(), + promise: self.promise.cst_decode(), + } + } + } + impl CstDecode for wire_cst_opening_fee_params_menu { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::OpeningFeeParamsMenu { + crate::models::OpeningFeeParamsMenu { + values: self.values.cst_decode(), + } + } + } + impl CstDecode for wire_cst_pay_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainRequest { + crate::models::PayOnchainRequest { + recipient_address: self.recipient_address.cst_decode(), + prepare_res: self.prepare_res.cst_decode(), + } + } + } + impl CstDecode for wire_cst_pay_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PayOnchainResponse { + crate::models::PayOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::Payment { + crate::models::Payment { + id: self.id.cst_decode(), + payment_type: self.payment_type.cst_decode(), + payment_time: self.payment_time.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + fee_msat: self.fee_msat.cst_decode(), + status: self.status.cst_decode(), + error: self.error.cst_decode(), + description: self.description.cst_decode(), + details: self.details.cst_decode(), + metadata: self.metadata.cst_decode(), + } + } + } + impl CstDecode for wire_cst_payment_details { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PaymentDetails { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Ln }; + crate::models::PaymentDetails::Ln { + data: ans.data.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.ClosedChannel }; + crate::models::PaymentDetails::ClosedChannel { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_payment_failed_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::PaymentFailedData { + crate::breez_services::PaymentFailedData { + error: self.error.cst_decode(), + node_id: self.node_id.cst_decode(), + invoice: self.invoice.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_onchain_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentRequest { + crate::models::PrepareOnchainPaymentRequest { + amount_sat: self.amount_sat.cst_decode(), + amount_type: self.amount_type.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_onchain_payment_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareOnchainPaymentResponse { + crate::models::PrepareOnchainPaymentResponse { + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + sender_amount_sat: self.sender_amount_sat.cst_decode(), + recipient_amount_sat: self.recipient_amount_sat.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsRequest { + crate::models::PrepareRedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_prepare_redeem_onchain_funds_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRedeemOnchainFundsResponse { + crate::models::PrepareRedeemOnchainFundsResponse { + tx_weight: self.tx_weight.cst_decode(), + tx_fee_sat: self.tx_fee_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundRequest { + crate::models::PrepareRefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_prepare_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::PrepareRefundResponse { + crate::models::PrepareRefundResponse { + refund_tx_weight: self.refund_tx_weight.cst_decode(), + refund_tx_fee_sat: self.refund_tx_fee_sat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_rate { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Rate { + crate::binding::Rate { + coin: self.coin.cst_decode(), + value: self.value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceiveOnchainRequest { + crate::models::ReceiveOnchainRequest { + opening_fee_params: self.opening_fee_params.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentRequest { + crate::models::ReceivePaymentRequest { + amount_msat: self.amount_msat.cst_decode(), + description: self.description.cst_decode(), + preimage: self.preimage.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + use_description_hash: self.use_description_hash.cst_decode(), + expiry: self.expiry.cst_decode(), + cltv: self.cltv.cst_decode(), + } + } + } + impl CstDecode for wire_cst_receive_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReceivePaymentResponse { + crate::models::ReceivePaymentResponse { + ln_invoice: self.ln_invoice.cst_decode(), + opening_fee_params: self.opening_fee_params.cst_decode(), + opening_fee_msat: self.opening_fee_msat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_recommended_fees { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::chain::RecommendedFees { + crate::chain::RecommendedFees { + fastest_fee: self.fastest_fee.cst_decode(), + half_hour_fee: self.half_hour_fee.cst_decode(), + hour_fee: self.hour_fee.cst_decode(), + economy_fee: self.economy_fee.cst_decode(), + minimum_fee: self.minimum_fee.cst_decode(), + } + } + } + impl CstDecode for wire_cst_redeem_onchain_funds_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsRequest { + crate::models::RedeemOnchainFundsRequest { + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_redeem_onchain_funds_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RedeemOnchainFundsResponse { + crate::models::RedeemOnchainFundsResponse { + txid: self.txid.cst_decode(), + } + } + } + impl CstDecode for wire_cst_refund_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundRequest { + crate::models::RefundRequest { + swap_address: self.swap_address.cst_decode(), + to_address: self.to_address.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_refund_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::RefundResponse { + crate::models::RefundResponse { + refund_tx_id: self.refund_tx_id.cst_decode(), + } + } + } + impl CstDecode for wire_cst_report_issue_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportIssueRequest { + match self.tag { + 0 => { + let ans = unsafe { self.kind.PaymentFailure }; + crate::models::ReportIssueRequest::PaymentFailure { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode + for wire_cst_report_payment_failure_details + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReportPaymentFailureDetails { + crate::models::ReportPaymentFailureDetails { + payment_hash: self.payment_hash.cst_decode(), + comment: self.comment.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_fees_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapFeesRequest { + crate::models::ReverseSwapFeesRequest { + send_amount_sat: self.send_amount_sat.cst_decode(), + claim_tx_feerate: self.claim_tx_feerate.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapInfo { + crate::models::ReverseSwapInfo { + id: self.id.cst_decode(), + claim_pubkey: self.claim_pubkey.cst_decode(), + lockup_txid: self.lockup_txid.cst_decode(), + claim_txid: self.claim_txid.cst_decode(), + onchain_amount_sat: self.onchain_amount_sat.cst_decode(), + status: self.status.cst_decode(), + } + } + } + impl CstDecode for wire_cst_reverse_swap_pair_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ReverseSwapPairInfo { + crate::models::ReverseSwapPairInfo { + min: self.min.cst_decode(), + max: self.max.cst_decode(), + fees_hash: self.fees_hash.cst_decode(), + fees_percentage: self.fees_percentage.cst_decode(), + fees_lockup: self.fees_lockup.cst_decode(), + fees_claim: self.fees_claim.cst_decode(), + total_fees: self.total_fees.cst_decode(), + } + } + } + impl CstDecode for wire_cst_route_hint { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::RouteHint { + crate::binding::RouteHint { + hops: self.hops.cst_decode(), + } + } + } + impl CstDecode for wire_cst_route_hint_hop { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::RouteHintHop { + crate::binding::RouteHintHop { + src_node_id: self.src_node_id.cst_decode(), + short_channel_id: self.short_channel_id.cst_decode(), + fees_base_msat: self.fees_base_msat.cst_decode(), + fees_proportional_millionths: self.fees_proportional_millionths.cst_decode(), + cltv_expiry_delta: self.cltv_expiry_delta.cst_decode(), + htlc_minimum_msat: self.htlc_minimum_msat.cst_decode(), + htlc_maximum_msat: self.htlc_maximum_msat.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_onchain_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainRequest { + crate::models::SendOnchainRequest { + amount_sat: self.amount_sat.cst_decode(), + onchain_recipient_address: self.onchain_recipient_address.cst_decode(), + pair_hash: self.pair_hash.cst_decode(), + sat_per_vbyte: self.sat_per_vbyte.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_onchain_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendOnchainResponse { + crate::models::SendOnchainResponse { + reverse_swap_info: self.reverse_swap_info.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_payment_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentRequest { + crate::models::SendPaymentRequest { + bolt11: self.bolt11.cst_decode(), + use_trampoline: self.use_trampoline.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode for wire_cst_send_payment_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendPaymentResponse { + crate::models::SendPaymentResponse { + payment: self.payment.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_send_spontaneous_payment_request + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SendSpontaneousPaymentRequest { + crate::models::SendSpontaneousPaymentRequest { + node_id: self.node_id.cst_decode(), + amount_msat: self.amount_msat.cst_decode(), + extra_tlvs: self.extra_tlvs.cst_decode(), + label: self.label.cst_decode(), + } + } + } + impl CstDecode + for wire_cst_service_health_check_response + { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::ServiceHealthCheckResponse { + crate::models::ServiceHealthCheckResponse { + status: self.status.cst_decode(), + } + } + } + impl CstDecode for wire_cst_sign_message_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageRequest { + crate::breez_services::SignMessageRequest { + message: self.message.cst_decode(), + } + } + } + impl CstDecode for wire_cst_sign_message_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::breez_services::SignMessageResponse { + crate::breez_services::SignMessageResponse { + signature: self.signature.cst_decode(), + } + } + } + impl CstDecode for wire_cst_static_backup_request { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupRequest { + crate::models::StaticBackupRequest { + working_dir: self.working_dir.cst_decode(), + } + } + } + impl CstDecode for wire_cst_static_backup_response { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::StaticBackupResponse { + crate::models::StaticBackupResponse { + backup: self.backup.cst_decode(), + } + } + } + impl CstDecode for wire_cst_success_action_processed { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::SuccessActionProcessed { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Aes }; + crate::binding::SuccessActionProcessed::Aes { + result: ans.result.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.Message }; + crate::binding::SuccessActionProcessed::Message { + data: ans.data.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.Url }; + crate::binding::SuccessActionProcessed::Url { + data: ans.data.cst_decode(), + } + } + _ => unreachable!(), + } + } + } + impl CstDecode for wire_cst_swap_info { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::SwapInfo { + crate::models::SwapInfo { + bitcoin_address: self.bitcoin_address.cst_decode(), + created_at: self.created_at.cst_decode(), + lock_height: self.lock_height.cst_decode(), + payment_hash: self.payment_hash.cst_decode(), + preimage: self.preimage.cst_decode(), + private_key: self.private_key.cst_decode(), + public_key: self.public_key.cst_decode(), + swapper_public_key: self.swapper_public_key.cst_decode(), + script: self.script.cst_decode(), + bolt11: self.bolt11.cst_decode(), + paid_msat: self.paid_msat.cst_decode(), + total_incoming_txs: self.total_incoming_txs.cst_decode(), + confirmed_sats: self.confirmed_sats.cst_decode(), + unconfirmed_sats: self.unconfirmed_sats.cst_decode(), + status: self.status.cst_decode(), + refund_tx_ids: self.refund_tx_ids.cst_decode(), + unconfirmed_tx_ids: self.unconfirmed_tx_ids.cst_decode(), + confirmed_tx_ids: self.confirmed_tx_ids.cst_decode(), + min_allowed_deposit: self.min_allowed_deposit.cst_decode(), + max_allowed_deposit: self.max_allowed_deposit.cst_decode(), + max_swapper_payable: self.max_swapper_payable.cst_decode(), + last_redeem_error: self.last_redeem_error.cst_decode(), + channel_opening_fees: self.channel_opening_fees.cst_decode(), + confirmed_at: self.confirmed_at.cst_decode(), + } + } + } + impl CstDecode for wire_cst_symbol { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::Symbol { + crate::binding::Symbol { + grapheme: self.grapheme.cst_decode(), + template: self.template.cst_decode(), + rtl: self.rtl.cst_decode(), + position: self.position.cst_decode(), + } + } + } + impl CstDecode for wire_cst_tlv_entry { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::TlvEntry { + crate::models::TlvEntry { + field_number: self.field_number.cst_decode(), + value: self.value.cst_decode(), + } + } + } + impl CstDecode for wire_cst_unspent_transaction_output { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::models::UnspentTransactionOutput { + crate::models::UnspentTransactionOutput { + txid: self.txid.cst_decode(), + outnum: self.outnum.cst_decode(), + amount_millisatoshi: self.amount_millisatoshi.cst_decode(), + address: self.address.cst_decode(), + reserved: self.reserved.cst_decode(), + } + } + } + impl CstDecode for wire_cst_url_success_action_data { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::binding::UrlSuccessActionData { + crate::binding::UrlSuccessActionData { + description: self.description.cst_decode(), + url: self.url.cst_decode(), + matches_callback_domain: self.matches_callback_domain.cst_decode(), + } + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_decrypted { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + plaintext: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_aes_success_action_data_decrypted { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_aes_success_action_data_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: AesSuccessActionDataResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_aes_success_action_data_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_backup_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_backup_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_backup_status { + fn new_with_null_ptr() -> Self { + Self { + backed_up: Default::default(), + last_backup_time: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_backup_status { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_binding_event_listener { + fn new_with_null_ptr() -> Self { + Self {} + } + } + impl Default for wire_cst_binding_event_listener { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_bitcoin_address_data { + fn new_with_null_ptr() -> Self { + Self { + address: core::ptr::null_mut(), + network: Default::default(), + amount_sat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_bitcoin_address_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_breez_event { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: BreezEventKind { nil__: () }, + } + } + } + impl Default for wire_cst_breez_event { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_buy_bitcoin_request { + fn new_with_null_ptr() -> Self { + Self { + provider: Default::default(), + opening_fee_params: core::ptr::null_mut(), + redirect_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_buy_bitcoin_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_buy_bitcoin_response { + fn new_with_null_ptr() -> Self { + Self { + url: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_buy_bitcoin_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_check_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + signature: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_check_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_check_message_response { + fn new_with_null_ptr() -> Self { + Self { + is_valid: Default::default(), + } + } + } + impl Default for wire_cst_check_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_closed_channel_payment_details { + fn new_with_null_ptr() -> Self { + Self { + state: Default::default(), + funding_txid: core::ptr::null_mut(), + short_channel_id: core::ptr::null_mut(), + closing_txid: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_closed_channel_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_config { + fn new_with_null_ptr() -> Self { + Self { + breezserver: core::ptr::null_mut(), + chainnotifier_url: core::ptr::null_mut(), + mempoolspace_url: core::ptr::null_mut(), + working_dir: core::ptr::null_mut(), + network: Default::default(), + payment_timeout_sec: Default::default(), + default_lsp_id: core::ptr::null_mut(), + api_key: core::ptr::null_mut(), + maxfee_percent: Default::default(), + exemptfee_msat: Default::default(), + node_config: Default::default(), + } + } + } + impl Default for wire_cst_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_configure_node_request { + fn new_with_null_ptr() -> Self { + Self { + close_to_address: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_configure_node_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_connect_request { + fn new_with_null_ptr() -> Self { + Self { + config: Default::default(), + seed: core::ptr::null_mut(), + restore_only: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_connect_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_currency_info { + fn new_with_null_ptr() -> Self { + Self { + name: core::ptr::null_mut(), + fraction_size: Default::default(), + spacing: core::ptr::null_mut(), + symbol: core::ptr::null_mut(), + uniq_symbol: core::ptr::null_mut(), + localized_name: core::ptr::null_mut(), + locale_overrides: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_currency_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_fiat_currency { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + info: Default::default(), + } + } + } + impl Default for wire_cst_fiat_currency { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_credentials { + fn new_with_null_ptr() -> Self { + Self { + developer_key: core::ptr::null_mut(), + developer_cert: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_device_credentials { + fn new_with_null_ptr() -> Self { + Self { + device: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_device_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_greenlight_node_config { + fn new_with_null_ptr() -> Self { + Self { + partner_credentials: core::ptr::null_mut(), + invite_code: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_greenlight_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_input_type { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: InputTypeKind { nil__: () }, + } + } + } + impl Default for wire_cst_input_type { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_invoice_paid_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + payment: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_invoice_paid_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_list_payments_request { + fn new_with_null_ptr() -> Self { + Self { + filters: core::ptr::null_mut(), + metadata_filters: core::ptr::null_mut(), + from_timestamp: core::ptr::null_mut(), + to_timestamp: core::ptr::null_mut(), + include_failures: core::ptr::null_mut(), + offset: core::ptr::null_mut(), + limit: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_list_payments_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_invoice { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + network: Default::default(), + payee_pubkey: core::ptr::null_mut(), + payment_hash: core::ptr::null_mut(), + description: core::ptr::null_mut(), + description_hash: core::ptr::null_mut(), + amount_msat: core::ptr::null_mut(), + timestamp: Default::default(), + expiry: Default::default(), + routing_hints: core::ptr::null_mut(), + payment_secret: core::ptr::null_mut(), + min_final_cltv_expiry_delta: Default::default(), + } + } + } + impl Default for wire_cst_ln_invoice { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_payment_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + label: core::ptr::null_mut(), + destination_pubkey: core::ptr::null_mut(), + payment_preimage: core::ptr::null_mut(), + keysend: Default::default(), + bolt11: core::ptr::null_mut(), + open_channel_bolt11: core::ptr::null_mut(), + lnurl_success_action: core::ptr::null_mut(), + lnurl_pay_domain: core::ptr::null_mut(), + lnurl_pay_comment: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + lnurl_metadata: core::ptr::null_mut(), + lnurl_withdraw_endpoint: core::ptr::null_mut(), + swap_info: core::ptr::null_mut(), + reverse_swap_info: core::ptr::null_mut(), + pending_expiration_block: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_auth_request_data { + fn new_with_null_ptr() -> Self { + Self { + k1: core::ptr::null_mut(), + action: core::ptr::null_mut(), + domain: core::ptr::null_mut(), + url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_auth_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_callback_status { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlCallbackStatusKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_callback_status { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_error_data { + fn new_with_null_ptr() -> Self { + Self { + reason: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_error_data { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + reason: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_error_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + use_trampoline: Default::default(), + comment: core::ptr::null_mut(), + payment_label: core::ptr::null_mut(), + validate_success_action_url: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + min_sendable: Default::default(), + max_sendable: Default::default(), + metadata_str: core::ptr::null_mut(), + comment_allowed: Default::default(), + domain: core::ptr::null_mut(), + allows_nostr: Default::default(), + nostr_pubkey: core::ptr::null_mut(), + ln_address: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlPayResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_pay_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_pay_success_data { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + success_action: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_pay_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_request { + fn new_with_null_ptr() -> Self { + Self { + data: Default::default(), + amount_msat: Default::default(), + description: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_request_data { + fn new_with_null_ptr() -> Self { + Self { + callback: core::ptr::null_mut(), + k1: core::ptr::null_mut(), + default_description: core::ptr::null_mut(), + min_withdrawable: Default::default(), + max_withdrawable: Default::default(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_request_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_result { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: LnUrlWithdrawResultKind { nil__: () }, + } + } + } + impl Default for wire_cst_ln_url_withdraw_result { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_ln_url_withdraw_success_data { + fn new_with_null_ptr() -> Self { + Self { + invoice: Default::default(), + } + } + } + impl Default for wire_cst_ln_url_withdraw_success_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_locale_overrides { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + spacing: core::ptr::null_mut(), + symbol: Default::default(), + } + } + } + impl Default for wire_cst_locale_overrides { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_localized_name { + fn new_with_null_ptr() -> Self { + Self { + locale: core::ptr::null_mut(), + name: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_localized_name { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_log_entry { + fn new_with_null_ptr() -> Self { + Self { + line: core::ptr::null_mut(), + level: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_log_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_lsp_information { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + name: core::ptr::null_mut(), + widget_url: core::ptr::null_mut(), + pubkey: core::ptr::null_mut(), + host: core::ptr::null_mut(), + base_fee_msat: Default::default(), + fee_rate: Default::default(), + time_lock_delta: Default::default(), + min_htlc_msat: Default::default(), + lsp_pubkey: core::ptr::null_mut(), + opening_fee_params_list: Default::default(), + } + } + } + impl Default for wire_cst_lsp_information { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_max_reverse_swap_amount_response { + fn new_with_null_ptr() -> Self { + Self { + total_sat: Default::default(), + } + } + } + impl Default for wire_cst_max_reverse_swap_amount_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_message_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_message_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_metadata_filter { + fn new_with_null_ptr() -> Self { + Self { + json_path: core::ptr::null_mut(), + json_value: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_metadata_filter { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_config { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeConfigKind { nil__: () }, + } + } + } + impl Default for wire_cst_node_config { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_credentials { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: NodeCredentialsKind { nil__: () }, + } + } + } + impl Default for wire_cst_node_credentials { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_node_state { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + block_height: Default::default(), + channels_balance_msat: Default::default(), + onchain_balance_msat: Default::default(), + pending_onchain_balance_msat: Default::default(), + utxos: core::ptr::null_mut(), + max_payable_msat: Default::default(), + max_receivable_msat: Default::default(), + max_single_payment_amount_msat: Default::default(), + max_chan_reserve_msats: Default::default(), + connected_peers: core::ptr::null_mut(), + max_receivable_single_payment_amount_msat: Default::default(), + total_inbound_liquidity_msats: Default::default(), + } + } + } + impl Default for wire_cst_node_state { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_onchain_payment_limits_response { + fn new_with_null_ptr() -> Self { + Self { + min_sat: Default::default(), + max_sat: Default::default(), + max_payable_sat: Default::default(), + } + } + } + impl Default for wire_cst_onchain_payment_limits_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_open_channel_fee_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_open_channel_fee_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_open_channel_fee_response { + fn new_with_null_ptr() -> Self { + Self { + fee_msat: core::ptr::null_mut(), + fee_params: Default::default(), + } + } + } + impl Default for wire_cst_open_channel_fee_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_opening_fee_params { + fn new_with_null_ptr() -> Self { + Self { + min_msat: Default::default(), + proportional: Default::default(), + valid_until: core::ptr::null_mut(), + max_idle_time: Default::default(), + max_client_to_self_delay: Default::default(), + promise: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_opening_fee_params { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_opening_fee_params_menu { + fn new_with_null_ptr() -> Self { + Self { + values: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_opening_fee_params_menu { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_pay_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + recipient_address: core::ptr::null_mut(), + prepare_res: Default::default(), + } + } + } + impl Default for wire_cst_pay_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_pay_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } + } + impl Default for wire_cst_pay_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + payment_type: Default::default(), + payment_time: Default::default(), + amount_msat: Default::default(), + fee_msat: Default::default(), + status: Default::default(), + error: core::ptr::null_mut(), + description: core::ptr::null_mut(), + details: Default::default(), + metadata: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_payment { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment_details { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: PaymentDetailsKind { nil__: () }, + } + } + } + impl Default for wire_cst_payment_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_payment_failed_data { + fn new_with_null_ptr() -> Self { + Self { + error: core::ptr::null_mut(), + node_id: core::ptr::null_mut(), + invoice: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_payment_failed_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_onchain_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + amount_type: Default::default(), + claim_tx_feerate: Default::default(), + } + } + } + impl Default for wire_cst_prepare_onchain_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_onchain_payment_response { + fn new_with_null_ptr() -> Self { + Self { + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + sender_amount_sat: Default::default(), + recipient_amount_sat: Default::default(), + total_fees: Default::default(), + } + } + } + impl Default for wire_cst_prepare_onchain_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_prepare_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + tx_weight: Default::default(), + tx_fee_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_prepare_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_prepare_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_weight: Default::default(), + refund_tx_fee_sat: Default::default(), + } + } + } + impl Default for wire_cst_prepare_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_rate { + fn new_with_null_ptr() -> Self { + Self { + coin: core::ptr::null_mut(), + value: Default::default(), + } + } + } + impl Default for wire_cst_rate { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + opening_fee_params: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_payment_request { + fn new_with_null_ptr() -> Self { + Self { + amount_msat: Default::default(), + description: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + opening_fee_params: core::ptr::null_mut(), + use_description_hash: core::ptr::null_mut(), + expiry: core::ptr::null_mut(), + cltv: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_receive_payment_response { + fn new_with_null_ptr() -> Self { + Self { + ln_invoice: Default::default(), + opening_fee_params: core::ptr::null_mut(), + opening_fee_msat: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_receive_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_recommended_fees { + fn new_with_null_ptr() -> Self { + Self { + fastest_fee: Default::default(), + half_hour_fee: Default::default(), + hour_fee: Default::default(), + economy_fee: Default::default(), + minimum_fee: Default::default(), + } + } + } + impl Default for wire_cst_recommended_fees { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_redeem_onchain_funds_request { + fn new_with_null_ptr() -> Self { + Self { + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_redeem_onchain_funds_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_redeem_onchain_funds_response { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_redeem_onchain_funds_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_refund_request { + fn new_with_null_ptr() -> Self { + Self { + swap_address: core::ptr::null_mut(), + to_address: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_refund_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_refund_response { + fn new_with_null_ptr() -> Self { + Self { + refund_tx_id: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_refund_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_report_issue_request { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ReportIssueRequestKind { nil__: () }, + } + } + } + impl Default for wire_cst_report_issue_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_report_payment_failure_details { + fn new_with_null_ptr() -> Self { + Self { + payment_hash: core::ptr::null_mut(), + comment: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_report_payment_failure_details { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_fees_request { + fn new_with_null_ptr() -> Self { + Self { + send_amount_sat: core::ptr::null_mut(), + claim_tx_feerate: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_reverse_swap_fees_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_info { + fn new_with_null_ptr() -> Self { + Self { + id: core::ptr::null_mut(), + claim_pubkey: core::ptr::null_mut(), + lockup_txid: core::ptr::null_mut(), + claim_txid: core::ptr::null_mut(), + onchain_amount_sat: Default::default(), + status: Default::default(), + } + } + } + impl Default for wire_cst_reverse_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_reverse_swap_pair_info { + fn new_with_null_ptr() -> Self { + Self { + min: Default::default(), + max: Default::default(), + fees_hash: core::ptr::null_mut(), + fees_percentage: Default::default(), + fees_lockup: Default::default(), + fees_claim: Default::default(), + total_fees: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_reverse_swap_pair_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_route_hint { + fn new_with_null_ptr() -> Self { + Self { + hops: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_route_hint { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_route_hint_hop { + fn new_with_null_ptr() -> Self { + Self { + src_node_id: core::ptr::null_mut(), + short_channel_id: core::ptr::null_mut(), + fees_base_msat: Default::default(), + fees_proportional_millionths: Default::default(), + cltv_expiry_delta: Default::default(), + htlc_minimum_msat: core::ptr::null_mut(), + htlc_maximum_msat: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_route_hint_hop { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_onchain_request { + fn new_with_null_ptr() -> Self { + Self { + amount_sat: Default::default(), + onchain_recipient_address: core::ptr::null_mut(), + pair_hash: core::ptr::null_mut(), + sat_per_vbyte: Default::default(), + } + } + } + impl Default for wire_cst_send_onchain_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_onchain_response { + fn new_with_null_ptr() -> Self { + Self { + reverse_swap_info: Default::default(), + } + } + } + impl Default for wire_cst_send_onchain_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_payment_request { + fn new_with_null_ptr() -> Self { + Self { + bolt11: core::ptr::null_mut(), + use_trampoline: Default::default(), + amount_msat: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_send_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_payment_response { + fn new_with_null_ptr() -> Self { + Self { + payment: Default::default(), + } + } + } + impl Default for wire_cst_send_payment_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_send_spontaneous_payment_request { + fn new_with_null_ptr() -> Self { + Self { + node_id: core::ptr::null_mut(), + amount_msat: Default::default(), + extra_tlvs: core::ptr::null_mut(), + label: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_send_spontaneous_payment_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_service_health_check_response { + fn new_with_null_ptr() -> Self { + Self { + status: Default::default(), + } + } + } + impl Default for wire_cst_service_health_check_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sign_message_request { + fn new_with_null_ptr() -> Self { + Self { + message: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_sign_message_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_sign_message_response { + fn new_with_null_ptr() -> Self { + Self { + signature: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_sign_message_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_static_backup_request { + fn new_with_null_ptr() -> Self { + Self { + working_dir: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_static_backup_request { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_static_backup_response { + fn new_with_null_ptr() -> Self { + Self { + backup: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_static_backup_response { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_success_action_processed { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: SuccessActionProcessedKind { nil__: () }, + } + } + } + impl Default for wire_cst_success_action_processed { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_swap_info { + fn new_with_null_ptr() -> Self { + Self { + bitcoin_address: core::ptr::null_mut(), + created_at: Default::default(), + lock_height: Default::default(), + payment_hash: core::ptr::null_mut(), + preimage: core::ptr::null_mut(), + private_key: core::ptr::null_mut(), + public_key: core::ptr::null_mut(), + swapper_public_key: core::ptr::null_mut(), + script: core::ptr::null_mut(), + bolt11: core::ptr::null_mut(), + paid_msat: Default::default(), + total_incoming_txs: Default::default(), + confirmed_sats: Default::default(), + unconfirmed_sats: Default::default(), + status: Default::default(), + refund_tx_ids: core::ptr::null_mut(), + unconfirmed_tx_ids: core::ptr::null_mut(), + confirmed_tx_ids: core::ptr::null_mut(), + min_allowed_deposit: Default::default(), + max_allowed_deposit: Default::default(), + max_swapper_payable: Default::default(), + last_redeem_error: core::ptr::null_mut(), + channel_opening_fees: core::ptr::null_mut(), + confirmed_at: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_swap_info { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_symbol { + fn new_with_null_ptr() -> Self { + Self { + grapheme: core::ptr::null_mut(), + template: core::ptr::null_mut(), + rtl: core::ptr::null_mut(), + position: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_symbol { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_tlv_entry { + fn new_with_null_ptr() -> Self { + Self { + field_number: Default::default(), + value: core::ptr::null_mut(), + } + } + } + impl Default for wire_cst_tlv_entry { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_unspent_transaction_output { + fn new_with_null_ptr() -> Self { + Self { + txid: core::ptr::null_mut(), + outnum: Default::default(), + amount_millisatoshi: Default::default(), + address: core::ptr::null_mut(), + reserved: Default::default(), + } + } + } + impl Default for wire_cst_unspent_transaction_output { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + impl NewWithNullPtr for wire_cst_url_success_action_data { + fn new_with_null_ptr() -> Self { + Self { + description: core::ptr::null_mut(), + url: core::ptr::null_mut(), + matches_callback_domain: Default::default(), + } + } + } + impl Default for wire_cst_url_success_action_data { + fn default() -> Self { + Self::new_with_null_ptr() + } + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup(port_: i64) { + wire__crate__binding__backup_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__backup_status(port_: i64) { + wire__crate__binding__backup_status_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__binding_event_listener_on_event( + port_: i64, + that: *mut wire_cst_binding_event_listener, + e: *mut wire_cst_breez_event, + ) { + wire__crate__binding__binding_event_listener_on_event_impl(port_, that, e) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_events_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__breez_events_stream_impl(port_, s) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_log_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__breez_log_stream_impl(port_, s) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__buy_bitcoin( + port_: i64, + req: *mut wire_cst_buy_bitcoin_request, + ) { + wire__crate__binding__buy_bitcoin_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__check_message( + port_: i64, + req: *mut wire_cst_check_message_request, + ) { + wire__crate__binding__check_message_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap( + port_: i64, + lockup_address: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__claim_reverse_swap_impl(port_, lockup_address) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(port_: i64) { + wire__crate__binding__close_lsp_channels_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__configure_node( + port_: i64, + req: *mut wire_cst_configure_node_request, + ) { + wire__crate__binding__configure_node_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect( + port_: i64, + req: *mut wire_cst_connect_request, + ) { + wire__crate__binding__connect_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect_lsp( + port_: i64, + lsp_id: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__connect_lsp_impl(port_, lsp_id) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__default_config( + port_: i64, + env_type: i32, + api_key: *mut wire_cst_list_prim_u_8_strict, + node_config: *mut wire_cst_node_config, + ) { + wire__crate__binding__default_config_impl(port_, env_type, api_key, node_config) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__disconnect(port_: i64) { + wire__crate__binding__disconnect_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__execute_command( + port_: i64, + command: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__execute_command_impl(port_, command) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates(port_: i64) { + wire__crate__binding__fetch_fiat_rates_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info( + port_: i64, + id: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__fetch_lsp_info_impl(port_, id) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees( + port_: i64, + req: *mut wire_cst_reverse_swap_fees_request, + ) { + wire__crate__binding__fetch_reverse_swap_fees_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data(port_: i64) { + wire__crate__binding__generate_diagnostic_data_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments( + port_: i64, + ) { + wire__crate__binding__in_progress_onchain_payments_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(port_: i64) { + wire__crate__binding__in_progress_reverse_swaps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_swap(port_: i64) { + wire__crate__binding__in_progress_swap_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__is_initialized(port_: i64) { + wire__crate__binding__is_initialized_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(port_: i64) { + wire__crate__binding__list_fiat_currencies_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_lsps(port_: i64) { + wire__crate__binding__list_lsps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_payments( + port_: i64, + req: *mut wire_cst_list_payments_request, + ) { + wire__crate__binding__list_payments_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_refundables(port_: i64) { + wire__crate__binding__list_refundables_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_auth( + port_: i64, + req_data: *mut wire_cst_ln_url_auth_request_data, + ) { + wire__crate__binding__lnurl_auth_impl(port_, req_data) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_pay( + port_: i64, + req: *mut wire_cst_ln_url_pay_request, + ) { + wire__crate__binding__lnurl_pay_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw( + port_: i64, + req: *mut wire_cst_ln_url_withdraw_request, + ) { + wire__crate__binding__lnurl_withdraw_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_id(port_: i64) { + wire__crate__binding__lsp_id_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lsp_info(port_: i64) { + wire__crate__binding__lsp_info_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount(port_: i64) { + wire__crate__binding__max_reverse_swap_amount_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed( + port_: i64, + phrase: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__mnemonic_to_seed_impl(port_, phrase) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_credentials(port_: i64) { + wire__crate__binding__node_credentials_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_info(port_: i64) { + wire__crate__binding__node_info_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(port_: i64) { + wire__crate__binding__onchain_payment_limits_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__open_channel_fee( + port_: i64, + req: *mut wire_cst_open_channel_fee_request, + ) { + wire__crate__binding__open_channel_fee_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_input( + port_: i64, + input: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__parse_input_impl(port_, input) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_invoice( + port_: i64, + invoice: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__parse_invoice_impl(port_, invoice) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__pay_onchain( + port_: i64, + req: *mut wire_cst_pay_onchain_request, + ) { + wire__crate__binding__pay_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__payment_by_hash( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__payment_by_hash_impl(port_, hash) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment( + port_: i64, + req: *mut wire_cst_prepare_onchain_payment_request, + ) { + wire__crate__binding__prepare_onchain_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_prepare_redeem_onchain_funds_request, + ) { + wire__crate__binding__prepare_redeem_onchain_funds_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_refund( + port_: i64, + req: *mut wire_cst_prepare_refund_request, + ) { + wire__crate__binding__prepare_refund_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_onchain( + port_: i64, + req: *mut wire_cst_receive_onchain_request, + ) { + wire__crate__binding__receive_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_payment( + port_: i64, + req: *mut wire_cst_receive_payment_request, + ) { + wire__crate__binding__receive_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__recommended_fees(port_: i64) { + wire__crate__binding__recommended_fees_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds( + port_: i64, + req: *mut wire_cst_redeem_onchain_funds_request, + ) { + wire__crate__binding__redeem_onchain_funds_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_swap( + port_: i64, + swap_address: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__redeem_swap_impl(port_, swap_address) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__refund( + port_: i64, + req: *mut wire_cst_refund_request, + ) { + wire__crate__binding__refund_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__register_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__register_webhook_impl(port_, webhook_url) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__report_issue( + port_: i64, + req: *mut wire_cst_report_issue_request, + ) { + wire__crate__binding__report_issue_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__rescan_swaps(port_: i64) { + wire__crate__binding__rescan_swaps_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_onchain( + port_: i64, + req: *mut wire_cst_send_onchain_request, + ) { + wire__crate__binding__send_onchain_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_payment( + port_: i64, + req: *mut wire_cst_send_payment_request, + ) { + wire__crate__binding__send_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment( + port_: i64, + req: *mut wire_cst_send_spontaneous_payment_request, + ) { + wire__crate__binding__send_spontaneous_payment_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__service_health_check( + port_: i64, + api_key: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__service_health_check_impl(port_, api_key) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__set_payment_metadata( + port_: i64, + hash: *mut wire_cst_list_prim_u_8_strict, + metadata: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__set_payment_metadata_impl(port_, hash, metadata) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sign_message( + port_: i64, + req: *mut wire_cst_sign_message_request, + ) { + wire__crate__binding__sign_message_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__static_backup( + port_: i64, + req: *mut wire_cst_static_backup_request, + ) { + wire__crate__binding__static_backup_impl(port_, req) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sync(port_: i64) { + wire__crate__binding__sync_impl(port_) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( + port_: i64, + webhook_url: *mut wire_cst_list_prim_u_8_strict, + ) { + wire__crate__binding__unregister_webhook_impl(port_, webhook_url) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted( + ) -> *mut wire_cst_aes_success_action_data_decrypted { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_decrypted::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_result( + ) -> *mut wire_cst_aes_success_action_data_result { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_aes_success_action_data_result::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_backup_failed_data( + ) -> *mut wire_cst_backup_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_backup_failed_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_binding_event_listener( + ) -> *mut wire_cst_binding_event_listener { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_binding_event_listener::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bitcoin_address_data( + ) -> *mut wire_cst_bitcoin_address_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_bitcoin_address_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_bool(value: bool) -> *mut bool { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_breez_event() -> *mut wire_cst_breez_event + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_breez_event::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_buy_bitcoin_request( + ) -> *mut wire_cst_buy_bitcoin_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_buy_bitcoin_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_check_message_request( + ) -> *mut wire_cst_check_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_check_message_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_closed_channel_payment_details( + ) -> *mut wire_cst_closed_channel_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_closed_channel_payment_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_configure_node_request( + ) -> *mut wire_cst_configure_node_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_configure_node_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_connect_request( + ) -> *mut wire_cst_connect_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_connect_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_credentials( + ) -> *mut wire_cst_greenlight_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_device_credentials( + ) -> *mut wire_cst_greenlight_device_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_device_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_greenlight_node_config( + ) -> *mut wire_cst_greenlight_node_config { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_greenlight_node_config::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_i_64(value: i64) -> *mut i64 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_invoice_paid_details( + ) -> *mut wire_cst_invoice_paid_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_invoice_paid_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_list_payments_request( + ) -> *mut wire_cst_list_payments_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_list_payments_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_invoice() -> *mut wire_cst_ln_invoice + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_invoice::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_payment_details( + ) -> *mut wire_cst_ln_payment_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_payment_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_auth_request_data( + ) -> *mut wire_cst_ln_url_auth_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_auth_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_error_data( + ) -> *mut wire_cst_ln_url_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_error_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_error_data( + ) -> *mut wire_cst_ln_url_pay_error_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_error_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request( + ) -> *mut wire_cst_ln_url_pay_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_request_data( + ) -> *mut wire_cst_ln_url_pay_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_pay_success_data( + ) -> *mut wire_cst_ln_url_pay_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_pay_success_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request( + ) -> *mut wire_cst_ln_url_withdraw_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_request_data( + ) -> *mut wire_cst_ln_url_withdraw_request_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_request_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_ln_url_withdraw_success_data( + ) -> *mut wire_cst_ln_url_withdraw_success_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_ln_url_withdraw_success_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_lsp_information( + ) -> *mut wire_cst_lsp_information { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_lsp_information::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_message_success_action_data( + ) -> *mut wire_cst_message_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_message_success_action_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_config() -> *mut wire_cst_node_config + { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_node_config::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_node_credentials( + ) -> *mut wire_cst_node_credentials { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_node_credentials::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_open_channel_fee_request( + ) -> *mut wire_cst_open_channel_fee_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_open_channel_fee_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_opening_fee_params( + ) -> *mut wire_cst_opening_fee_params { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_opening_fee_params::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_pay_onchain_request( + ) -> *mut wire_cst_pay_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_pay_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment() -> *mut wire_cst_payment { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_payment::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_payment_failed_data( + ) -> *mut wire_cst_payment_failed_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_payment_failed_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_onchain_payment_request( + ) -> *mut wire_cst_prepare_onchain_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_onchain_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_redeem_onchain_funds_request( + ) -> *mut wire_cst_prepare_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_redeem_onchain_funds_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_prepare_refund_request( + ) -> *mut wire_cst_prepare_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_prepare_refund_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_onchain_request( + ) -> *mut wire_cst_receive_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_receive_payment_request( + ) -> *mut wire_cst_receive_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_receive_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_redeem_onchain_funds_request( + ) -> *mut wire_cst_redeem_onchain_funds_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_redeem_onchain_funds_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_refund_request( + ) -> *mut wire_cst_refund_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_refund_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_issue_request( + ) -> *mut wire_cst_report_issue_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_issue_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_report_payment_failure_details( + ) -> *mut wire_cst_report_payment_failure_details { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_report_payment_failure_details::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_fees_request( + ) -> *mut wire_cst_reverse_swap_fees_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_fees_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_reverse_swap_info( + ) -> *mut wire_cst_reverse_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_reverse_swap_info::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_onchain_request( + ) -> *mut wire_cst_send_onchain_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_onchain_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_payment_request( + ) -> *mut wire_cst_send_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_send_spontaneous_payment_request( + ) -> *mut wire_cst_send_spontaneous_payment_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_send_spontaneous_payment_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_sign_message_request( + ) -> *mut wire_cst_sign_message_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_sign_message_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_static_backup_request( + ) -> *mut wire_cst_static_backup_request { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_static_backup_request::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_success_action_processed( + ) -> *mut wire_cst_success_action_processed { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_success_action_processed::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_swap_info() -> *mut wire_cst_swap_info { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_swap_info::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_symbol() -> *mut wire_cst_symbol { + flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_symbol::new_with_null_ptr()) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_u_32(value: u32) -> *mut u32 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 { + flutter_rust_bridge::for_generated::new_leak_box_ptr(value) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_box_autoadd_url_success_action_data( + ) -> *mut wire_cst_url_success_action_data { + flutter_rust_bridge::for_generated::new_leak_box_ptr( + wire_cst_url_success_action_data::new_with_null_ptr(), + ) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_String(len: i32) -> *mut wire_cst_list_String { + let wrap = wire_cst_list_String { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + <*mut wire_cst_list_prim_u_8_strict>::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_fiat_currency( + len: i32, + ) -> *mut wire_cst_list_fiat_currency { + let wrap = wire_cst_list_fiat_currency { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_locale_overrides( + len: i32, + ) -> *mut wire_cst_list_locale_overrides { + let wrap = wire_cst_list_locale_overrides { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_localized_name( + len: i32, + ) -> *mut wire_cst_list_localized_name { + let wrap = wire_cst_list_localized_name { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_lsp_information( + len: i32, + ) -> *mut wire_cst_list_lsp_information { + let wrap = wire_cst_list_lsp_information { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_metadata_filter( + len: i32, + ) -> *mut wire_cst_list_metadata_filter { + let wrap = wire_cst_list_metadata_filter { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_opening_fee_params( + len: i32, + ) -> *mut wire_cst_list_opening_fee_params { + let wrap = wire_cst_list_opening_fee_params { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_payment( + len: i32, + ) -> *mut wire_cst_list_payment { + let wrap = wire_cst_list_payment { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_payment_type_filter( + len: i32, + ) -> *mut wire_cst_list_payment_type_filter { + let wrap = wire_cst_list_payment_type_filter { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_prim_u_8_strict( + len: i32, + ) -> *mut wire_cst_list_prim_u_8_strict { + let ans = wire_cst_list_prim_u_8_strict { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(ans) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_rate(len: i32) -> *mut wire_cst_list_rate { + let wrap = wire_cst_list_rate { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_reverse_swap_info( + len: i32, + ) -> *mut wire_cst_list_reverse_swap_info { + let wrap = wire_cst_list_reverse_swap_info { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_route_hint( + len: i32, + ) -> *mut wire_cst_list_route_hint { + let wrap = wire_cst_list_route_hint { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_route_hint_hop( + len: i32, + ) -> *mut wire_cst_list_route_hint_hop { + let wrap = wire_cst_list_route_hint_hop { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_swap_info( + len: i32, + ) -> *mut wire_cst_list_swap_info { + let wrap = wire_cst_list_swap_info { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_tlv_entry( + len: i32, + ) -> *mut wire_cst_list_tlv_entry { + let wrap = wire_cst_list_tlv_entry { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[no_mangle] + pub extern "C" fn frbgen_breez_sdk_cst_new_list_unspent_transaction_output( + len: i32, + ) -> *mut wire_cst_list_unspent_transaction_output { + let wrap = wire_cst_list_unspent_transaction_output { + ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr( + ::new_with_null_ptr(), + len, + ), + len, + }; + flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap) + } + + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_aes_success_action_data_decrypted { + description: *mut wire_cst_list_prim_u_8_strict, + plaintext: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_aes_success_action_data_result { + tag: i32, + kind: AesSuccessActionDataResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union AesSuccessActionDataResultKind { + Decrypted: wire_cst_AesSuccessActionDataResult_Decrypted, + ErrorStatus: wire_cst_AesSuccessActionDataResult_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AesSuccessActionDataResult_Decrypted { + data: *mut wire_cst_aes_success_action_data_decrypted, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_AesSuccessActionDataResult_ErrorStatus { + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_backup_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_backup_status { + backed_up: bool, + last_backup_time: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_binding_event_listener {} + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_bitcoin_address_data { + address: *mut wire_cst_list_prim_u_8_strict, + network: i32, + amount_sat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_breez_event { + tag: i32, + kind: BreezEventKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union BreezEventKind { + NewBlock: wire_cst_BreezEvent_NewBlock, + InvoicePaid: wire_cst_BreezEvent_InvoicePaid, + PaymentSucceed: wire_cst_BreezEvent_PaymentSucceed, + PaymentFailed: wire_cst_BreezEvent_PaymentFailed, + BackupFailed: wire_cst_BreezEvent_BackupFailed, + ReverseSwapUpdated: wire_cst_BreezEvent_ReverseSwapUpdated, + SwapUpdated: wire_cst_BreezEvent_SwapUpdated, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_NewBlock { + block: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_InvoicePaid { + details: *mut wire_cst_invoice_paid_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_PaymentSucceed { + details: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_PaymentFailed { + details: *mut wire_cst_payment_failed_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_BackupFailed { + details: *mut wire_cst_backup_failed_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_ReverseSwapUpdated { + details: *mut wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_BreezEvent_SwapUpdated { + details: *mut wire_cst_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_buy_bitcoin_request { + provider: i32, + opening_fee_params: *mut wire_cst_opening_fee_params, + redirect_url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_buy_bitcoin_response { + url: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_check_message_request { + message: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + signature: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_check_message_response { + is_valid: bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_closed_channel_payment_details { + state: i32, + funding_txid: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: *mut wire_cst_list_prim_u_8_strict, + closing_txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_config { + breezserver: *mut wire_cst_list_prim_u_8_strict, + chainnotifier_url: *mut wire_cst_list_prim_u_8_strict, + mempoolspace_url: *mut wire_cst_list_prim_u_8_strict, + working_dir: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payment_timeout_sec: u32, + default_lsp_id: *mut wire_cst_list_prim_u_8_strict, + api_key: *mut wire_cst_list_prim_u_8_strict, + maxfee_percent: f64, + exemptfee_msat: u64, + node_config: wire_cst_node_config, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_configure_node_request { + close_to_address: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_connect_request { + config: wire_cst_config, + seed: *mut wire_cst_list_prim_u_8_strict, + restore_only: *mut bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_currency_info { + name: *mut wire_cst_list_prim_u_8_strict, + fraction_size: u32, + spacing: *mut u32, + symbol: *mut wire_cst_symbol, + uniq_symbol: *mut wire_cst_symbol, + localized_name: *mut wire_cst_list_localized_name, + locale_overrides: *mut wire_cst_list_locale_overrides, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_fiat_currency { + id: *mut wire_cst_list_prim_u_8_strict, + info: wire_cst_currency_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_credentials { + developer_key: *mut wire_cst_list_prim_u_8_strict, + developer_cert: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_device_credentials { + device: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_greenlight_node_config { + partner_credentials: *mut wire_cst_greenlight_credentials, + invite_code: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_input_type { + tag: i32, + kind: InputTypeKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union InputTypeKind { + BitcoinAddress: wire_cst_InputType_BitcoinAddress, + Bolt11: wire_cst_InputType_Bolt11, + NodeId: wire_cst_InputType_NodeId, + Url: wire_cst_InputType_Url, + LnUrlPay: wire_cst_InputType_LnUrlPay, + LnUrlWithdraw: wire_cst_InputType_LnUrlWithdraw, + LnUrlAuth: wire_cst_InputType_LnUrlAuth, + LnUrlError: wire_cst_InputType_LnUrlError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_BitcoinAddress { + address: *mut wire_cst_bitcoin_address_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_Bolt11 { + invoice: *mut wire_cst_ln_invoice, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_NodeId { + node_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_Url { + url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlPay { + data: *mut wire_cst_ln_url_pay_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlWithdraw { + data: *mut wire_cst_ln_url_withdraw_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlAuth { + data: *mut wire_cst_ln_url_auth_request_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_InputType_LnUrlError { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_invoice_paid_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + payment: *mut wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_String { + ptr: *mut *mut wire_cst_list_prim_u_8_strict, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_fiat_currency { + ptr: *mut wire_cst_fiat_currency, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_locale_overrides { + ptr: *mut wire_cst_locale_overrides, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_localized_name { + ptr: *mut wire_cst_localized_name, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_lsp_information { + ptr: *mut wire_cst_lsp_information, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_metadata_filter { + ptr: *mut wire_cst_metadata_filter, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_opening_fee_params { + ptr: *mut wire_cst_opening_fee_params, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payment { + ptr: *mut wire_cst_payment, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payment_type_filter { + ptr: *mut i32, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_payments_request { + filters: *mut wire_cst_list_payment_type_filter, + metadata_filters: *mut wire_cst_list_metadata_filter, + from_timestamp: *mut i64, + to_timestamp: *mut i64, + include_failures: *mut bool, + offset: *mut u32, + limit: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_prim_u_8_strict { + ptr: *mut u8, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_rate { + ptr: *mut wire_cst_rate, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_reverse_swap_info { + ptr: *mut wire_cst_reverse_swap_info, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_route_hint { + ptr: *mut wire_cst_route_hint, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_route_hint_hop { + ptr: *mut wire_cst_route_hint_hop, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_swap_info { + ptr: *mut wire_cst_swap_info, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_tlv_entry { + ptr: *mut wire_cst_tlv_entry, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_list_unspent_transaction_output { + ptr: *mut wire_cst_unspent_transaction_output, + len: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_invoice { + bolt11: *mut wire_cst_list_prim_u_8_strict, + network: i32, + payee_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + description_hash: *mut wire_cst_list_prim_u_8_strict, + amount_msat: *mut u64, + timestamp: u64, + expiry: u64, + routing_hints: *mut wire_cst_list_route_hint, + payment_secret: *mut wire_cst_list_prim_u_8_strict, + min_final_cltv_expiry_delta: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_payment_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + label: *mut wire_cst_list_prim_u_8_strict, + destination_pubkey: *mut wire_cst_list_prim_u_8_strict, + payment_preimage: *mut wire_cst_list_prim_u_8_strict, + keysend: bool, + bolt11: *mut wire_cst_list_prim_u_8_strict, + open_channel_bolt11: *mut wire_cst_list_prim_u_8_strict, + lnurl_success_action: *mut wire_cst_success_action_processed, + lnurl_pay_domain: *mut wire_cst_list_prim_u_8_strict, + lnurl_pay_comment: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + lnurl_metadata: *mut wire_cst_list_prim_u_8_strict, + lnurl_withdraw_endpoint: *mut wire_cst_list_prim_u_8_strict, + swap_info: *mut wire_cst_swap_info, + reverse_swap_info: *mut wire_cst_reverse_swap_info, + pending_expiration_block: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_auth_request_data { + k1: *mut wire_cst_list_prim_u_8_strict, + action: *mut wire_cst_list_prim_u_8_strict, + domain: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_callback_status { + tag: i32, + kind: LnUrlCallbackStatusKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlCallbackStatusKind { + ErrorStatus: wire_cst_LnUrlCallbackStatus_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlCallbackStatus_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_error_data { + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_error_data { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + reason: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_request { + data: wire_cst_ln_url_pay_request_data, + amount_msat: u64, + use_trampoline: bool, + comment: *mut wire_cst_list_prim_u_8_strict, + payment_label: *mut wire_cst_list_prim_u_8_strict, + validate_success_action_url: *mut bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + min_sendable: u64, + max_sendable: u64, + metadata_str: *mut wire_cst_list_prim_u_8_strict, + comment_allowed: u16, + domain: *mut wire_cst_list_prim_u_8_strict, + allows_nostr: bool, + nostr_pubkey: *mut wire_cst_list_prim_u_8_strict, + ln_address: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_result { + tag: i32, + kind: LnUrlPayResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlPayResultKind { + EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess, + EndpointError: wire_cst_LnUrlPayResult_EndpointError, + PayError: wire_cst_LnUrlPayResult_PayError, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointSuccess { + data: *mut wire_cst_ln_url_pay_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_EndpointError { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlPayResult_PayError { + data: *mut wire_cst_ln_url_pay_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_pay_success_data { + payment: wire_cst_payment, + success_action: *mut wire_cst_success_action_processed, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request { + data: wire_cst_ln_url_withdraw_request_data, + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_request_data { + callback: *mut wire_cst_list_prim_u_8_strict, + k1: *mut wire_cst_list_prim_u_8_strict, + default_description: *mut wire_cst_list_prim_u_8_strict, + min_withdrawable: u64, + max_withdrawable: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_result { + tag: i32, + kind: LnUrlWithdrawResultKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union LnUrlWithdrawResultKind { + Ok: wire_cst_LnUrlWithdrawResult_Ok, + Timeout: wire_cst_LnUrlWithdrawResult_Timeout, + ErrorStatus: wire_cst_LnUrlWithdrawResult_ErrorStatus, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Ok { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_Timeout { + data: *mut wire_cst_ln_url_withdraw_success_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_LnUrlWithdrawResult_ErrorStatus { + data: *mut wire_cst_ln_url_error_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ln_url_withdraw_success_data { + invoice: wire_cst_ln_invoice, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_locale_overrides { + locale: *mut wire_cst_list_prim_u_8_strict, + spacing: *mut u32, + symbol: wire_cst_symbol, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_localized_name { + locale: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_log_entry { + line: *mut wire_cst_list_prim_u_8_strict, + level: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_lsp_information { + id: *mut wire_cst_list_prim_u_8_strict, + name: *mut wire_cst_list_prim_u_8_strict, + widget_url: *mut wire_cst_list_prim_u_8_strict, + pubkey: *mut wire_cst_list_prim_u_8_strict, + host: *mut wire_cst_list_prim_u_8_strict, + base_fee_msat: i64, + fee_rate: f64, + time_lock_delta: u32, + min_htlc_msat: i64, + lsp_pubkey: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params_list: wire_cst_opening_fee_params_menu, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_max_reverse_swap_amount_response { + total_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_message_success_action_data { + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_metadata_filter { + json_path: *mut wire_cst_list_prim_u_8_strict, + json_value: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_config { + tag: i32, + kind: NodeConfigKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union NodeConfigKind { + Greenlight: wire_cst_NodeConfig_Greenlight, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_NodeConfig_Greenlight { + config: *mut wire_cst_greenlight_node_config, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_credentials { + tag: i32, + kind: NodeCredentialsKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union NodeCredentialsKind { + Greenlight: wire_cst_NodeCredentials_Greenlight, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_NodeCredentials_Greenlight { + credentials: *mut wire_cst_greenlight_device_credentials, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_node_state { + id: *mut wire_cst_list_prim_u_8_strict, + block_height: u32, + channels_balance_msat: u64, + onchain_balance_msat: u64, + pending_onchain_balance_msat: u64, + utxos: *mut wire_cst_list_unspent_transaction_output, + max_payable_msat: u64, + max_receivable_msat: u64, + max_single_payment_amount_msat: u64, + max_chan_reserve_msats: u64, + connected_peers: *mut wire_cst_list_String, + max_receivable_single_payment_amount_msat: u64, + total_inbound_liquidity_msats: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_onchain_payment_limits_response { + min_sat: u64, + max_sat: u64, + max_payable_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_open_channel_fee_request { + amount_msat: *mut u64, + expiry: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_open_channel_fee_response { + fee_msat: *mut u64, + fee_params: wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_opening_fee_params { + min_msat: u64, + proportional: u32, + valid_until: *mut wire_cst_list_prim_u_8_strict, + max_idle_time: u32, + max_client_to_self_delay: u32, + promise: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_opening_fee_params_menu { + values: *mut wire_cst_list_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_pay_onchain_request { + recipient_address: *mut wire_cst_list_prim_u_8_strict, + prepare_res: wire_cst_prepare_onchain_payment_response, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_pay_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment { + id: *mut wire_cst_list_prim_u_8_strict, + payment_type: i32, + payment_time: i64, + amount_msat: u64, + fee_msat: u64, + status: i32, + error: *mut wire_cst_list_prim_u_8_strict, + description: *mut wire_cst_list_prim_u_8_strict, + details: wire_cst_payment_details, + metadata: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment_details { + tag: i32, + kind: PaymentDetailsKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union PaymentDetailsKind { + Ln: wire_cst_PaymentDetails_Ln, + ClosedChannel: wire_cst_PaymentDetails_ClosedChannel, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentDetails_Ln { + data: *mut wire_cst_ln_payment_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_PaymentDetails_ClosedChannel { + data: *mut wire_cst_closed_channel_payment_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_payment_failed_data { + error: *mut wire_cst_list_prim_u_8_strict, + node_id: *mut wire_cst_list_prim_u_8_strict, + invoice: *mut wire_cst_ln_invoice, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_onchain_payment_request { + amount_sat: u64, + amount_type: i32, + claim_tx_feerate: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_onchain_payment_response { + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + sender_amount_sat: u64, + recipient_amount_sat: u64, + total_fees: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_redeem_onchain_funds_response { + tx_weight: u64, + tx_fee_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_prepare_refund_response { + refund_tx_weight: u32, + refund_tx_fee_sat: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_rate { + coin: *mut wire_cst_list_prim_u_8_strict, + value: f64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_onchain_request { + opening_fee_params: *mut wire_cst_opening_fee_params, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_request { + amount_msat: u64, + description: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + opening_fee_params: *mut wire_cst_opening_fee_params, + use_description_hash: *mut bool, + expiry: *mut u32, + cltv: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_receive_payment_response { + ln_invoice: wire_cst_ln_invoice, + opening_fee_params: *mut wire_cst_opening_fee_params, + opening_fee_msat: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_recommended_fees { + fastest_fee: u64, + half_hour_fee: u64, + hour_fee: u64, + economy_fee: u64, + minimum_fee: u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_redeem_onchain_funds_request { + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_redeem_onchain_funds_response { + txid: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_refund_request { + swap_address: *mut wire_cst_list_prim_u_8_strict, + to_address: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_refund_response { + refund_tx_id: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_report_issue_request { + tag: i32, + kind: ReportIssueRequestKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union ReportIssueRequestKind { + PaymentFailure: wire_cst_ReportIssueRequest_PaymentFailure, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_ReportIssueRequest_PaymentFailure { + data: *mut wire_cst_report_payment_failure_details, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_report_payment_failure_details { + payment_hash: *mut wire_cst_list_prim_u_8_strict, + comment: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_fees_request { + send_amount_sat: *mut u64, + claim_tx_feerate: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_info { + id: *mut wire_cst_list_prim_u_8_strict, + claim_pubkey: *mut wire_cst_list_prim_u_8_strict, + lockup_txid: *mut wire_cst_list_prim_u_8_strict, + claim_txid: *mut wire_cst_list_prim_u_8_strict, + onchain_amount_sat: u64, + status: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_reverse_swap_pair_info { + min: u64, + max: u64, + fees_hash: *mut wire_cst_list_prim_u_8_strict, + fees_percentage: f64, + fees_lockup: u64, + fees_claim: u64, + total_fees: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_route_hint { + hops: *mut wire_cst_list_route_hint_hop, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_route_hint_hop { + src_node_id: *mut wire_cst_list_prim_u_8_strict, + short_channel_id: *mut wire_cst_list_prim_u_8_strict, + fees_base_msat: u32, + fees_proportional_millionths: u32, + cltv_expiry_delta: u64, + htlc_minimum_msat: *mut u64, + htlc_maximum_msat: *mut u64, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_onchain_request { + amount_sat: u64, + onchain_recipient_address: *mut wire_cst_list_prim_u_8_strict, + pair_hash: *mut wire_cst_list_prim_u_8_strict, + sat_per_vbyte: u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_onchain_response { + reverse_swap_info: wire_cst_reverse_swap_info, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_payment_request { + bolt11: *mut wire_cst_list_prim_u_8_strict, + use_trampoline: bool, + amount_msat: *mut u64, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_payment_response { + payment: wire_cst_payment, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_send_spontaneous_payment_request { + node_id: *mut wire_cst_list_prim_u_8_strict, + amount_msat: u64, + extra_tlvs: *mut wire_cst_list_tlv_entry, + label: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_service_health_check_response { + status: i32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sign_message_request { + message: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_sign_message_response { + signature: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_static_backup_request { + working_dir: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_static_backup_response { + backup: *mut wire_cst_list_String, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_success_action_processed { + tag: i32, + kind: SuccessActionProcessedKind, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub union SuccessActionProcessedKind { + Aes: wire_cst_SuccessActionProcessed_Aes, + Message: wire_cst_SuccessActionProcessed_Message, + Url: wire_cst_SuccessActionProcessed_Url, + nil__: (), + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Aes { + result: *mut wire_cst_aes_success_action_data_result, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Message { + data: *mut wire_cst_message_success_action_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_SuccessActionProcessed_Url { + data: *mut wire_cst_url_success_action_data, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_swap_info { + bitcoin_address: *mut wire_cst_list_prim_u_8_strict, + created_at: i64, + lock_height: i64, + payment_hash: *mut wire_cst_list_prim_u_8_strict, + preimage: *mut wire_cst_list_prim_u_8_strict, + private_key: *mut wire_cst_list_prim_u_8_strict, + public_key: *mut wire_cst_list_prim_u_8_strict, + swapper_public_key: *mut wire_cst_list_prim_u_8_strict, + script: *mut wire_cst_list_prim_u_8_strict, + bolt11: *mut wire_cst_list_prim_u_8_strict, + paid_msat: u64, + total_incoming_txs: u64, + confirmed_sats: u64, + unconfirmed_sats: u64, + status: i32, + refund_tx_ids: *mut wire_cst_list_String, + unconfirmed_tx_ids: *mut wire_cst_list_String, + confirmed_tx_ids: *mut wire_cst_list_String, + min_allowed_deposit: i64, + max_allowed_deposit: i64, + max_swapper_payable: i64, + last_redeem_error: *mut wire_cst_list_prim_u_8_strict, + channel_opening_fees: *mut wire_cst_opening_fee_params, + confirmed_at: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_symbol { + grapheme: *mut wire_cst_list_prim_u_8_strict, + template: *mut wire_cst_list_prim_u_8_strict, + rtl: *mut bool, + position: *mut u32, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_tlv_entry { + field_number: u64, + value: *mut wire_cst_list_prim_u_8_strict, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_unspent_transaction_output { + txid: *mut wire_cst_list_prim_u_8_strict, + outnum: u32, + amount_millisatoshi: u64, + address: *mut wire_cst_list_prim_u_8_strict, + reserved: bool, + } + #[repr(C)] + #[derive(Clone, Copy)] + pub struct wire_cst_url_success_action_data { + description: *mut wire_cst_list_prim_u_8_strict, + url: *mut wire_cst_list_prim_u_8_strict, + matches_callback_domain: bool, + } +} #[cfg(not(target_family = "wasm"))] pub use io::*; diff --git a/libs/sdk-core/src/lib.rs b/libs/sdk-core/src/lib.rs index 7d656c553..2c557b1bc 100644 --- a/libs/sdk-core/src/lib.rs +++ b/libs/sdk-core/src/lib.rs @@ -178,7 +178,6 @@ mod lsps0; /// flutter_rust_bridge:ignore mod lsps2; mod models; -mod moonpay; mod persist; mod serializer; mod support; diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index a3765a58e..47e48cd62 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -77,6 +77,7 @@ typedef struct wire_cst_SuccessActionProcessed_Message { typedef struct wire_cst_url_success_action_data { struct wire_cst_list_prim_u_8_strict *description; struct wire_cst_list_prim_u_8_strict *url; + bool matches_callback_domain; } wire_cst_url_success_action_data; typedef struct wire_cst_SuccessActionProcessed_Url { @@ -217,7 +218,7 @@ typedef struct wire_cst_BreezEvent_PaymentSucceed { typedef struct wire_cst_route_hint_hop { struct wire_cst_list_prim_u_8_strict *src_node_id; - uint64_t short_channel_id; + struct wire_cst_list_prim_u_8_strict *short_channel_id; uint32_t fees_base_msat; uint32_t fees_proportional_millionths; uint64_t cltv_expiry_delta; @@ -273,6 +274,10 @@ typedef struct wire_cst_BreezEvent_BackupFailed { struct wire_cst_backup_failed_data *details; } wire_cst_BreezEvent_BackupFailed; +typedef struct wire_cst_BreezEvent_ReverseSwapUpdated { + struct wire_cst_reverse_swap_info *details; +} wire_cst_BreezEvent_ReverseSwapUpdated; + typedef struct wire_cst_BreezEvent_SwapUpdated { struct wire_cst_swap_info *details; } wire_cst_BreezEvent_SwapUpdated; @@ -283,6 +288,7 @@ typedef union BreezEventKind { struct wire_cst_BreezEvent_PaymentSucceed PaymentSucceed; struct wire_cst_BreezEvent_PaymentFailed PaymentFailed; struct wire_cst_BreezEvent_BackupFailed BackupFailed; + struct wire_cst_BreezEvent_ReverseSwapUpdated ReverseSwapUpdated; struct wire_cst_BreezEvent_SwapUpdated SwapUpdated; } BreezEventKind; @@ -294,6 +300,7 @@ typedef struct wire_cst_breez_event { typedef struct wire_cst_buy_bitcoin_request { int32_t provider; struct wire_cst_opening_fee_params *opening_fee_params; + struct wire_cst_list_prim_u_8_strict *redirect_url; } wire_cst_buy_bitcoin_request; typedef struct wire_cst_check_message_request { @@ -401,8 +408,10 @@ typedef struct wire_cst_ln_url_pay_request_data { typedef struct wire_cst_ln_url_pay_request { struct wire_cst_ln_url_pay_request_data data; uint64_t amount_msat; + bool use_trampoline; struct wire_cst_list_prim_u_8_strict *comment; struct wire_cst_list_prim_u_8_strict *payment_label; + bool *validate_success_action_url; } wire_cst_ln_url_pay_request; typedef struct wire_cst_ln_url_withdraw_request_data { @@ -508,6 +517,7 @@ typedef struct wire_cst_send_onchain_request { typedef struct wire_cst_send_payment_request { struct wire_cst_list_prim_u_8_strict *bolt11; + bool use_trampoline; uint64_t *amount_msat; struct wire_cst_list_prim_u_8_strict *label; } wire_cst_send_payment_request; @@ -796,12 +806,17 @@ typedef struct wire_cst_LnUrlWithdrawResult_Ok { struct wire_cst_ln_url_withdraw_success_data *data; } wire_cst_LnUrlWithdrawResult_Ok; +typedef struct wire_cst_LnUrlWithdrawResult_Timeout { + struct wire_cst_ln_url_withdraw_success_data *data; +} wire_cst_LnUrlWithdrawResult_Timeout; + typedef struct wire_cst_LnUrlWithdrawResult_ErrorStatus { struct wire_cst_ln_url_error_data *data; } wire_cst_LnUrlWithdrawResult_ErrorStatus; typedef union LnUrlWithdrawResultKind { struct wire_cst_LnUrlWithdrawResult_Ok Ok; + struct wire_cst_LnUrlWithdrawResult_Timeout Timeout; struct wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; } LnUrlWithdrawResultKind; @@ -831,12 +846,14 @@ typedef struct wire_cst_node_state { uint64_t max_single_payment_amount_msat; uint64_t max_chan_reserve_msats; struct wire_cst_list_String *connected_peers; - uint64_t inbound_liquidity_msats; + uint64_t max_receivable_single_payment_amount_msat; + uint64_t total_inbound_liquidity_msats; } wire_cst_node_state; typedef struct wire_cst_onchain_payment_limits_response { uint64_t min_sat; uint64_t max_sat; + uint64_t max_payable_sat; } wire_cst_onchain_payment_limits_response; typedef struct wire_cst_open_channel_fee_response { @@ -930,6 +947,9 @@ void frbgen_breez_sdk_wire__crate__binding__buy_bitcoin(int64_t port_, void frbgen_breez_sdk_wire__crate__binding__check_message(int64_t port_, struct wire_cst_check_message_request *req); +void frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap(int64_t port_, + struct wire_cst_list_prim_u_8_strict *lockup_address); + void frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(int64_t port_); void frbgen_breez_sdk_wire__crate__binding__configure_node(int64_t port_, @@ -1317,6 +1337,7 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_log_stream); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__buy_bitcoin); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__close_lsp_channels); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__configure_node); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect); diff --git a/libs/sdk-flutter/lib/bridge_generated.dart b/libs/sdk-flutter/lib/bridge_generated.dart deleted file mode 100644 index 7ac7d374a..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.dart +++ /dev/null @@ -1,6873 +0,0 @@ -// AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.6. -// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const - -import 'dart:convert'; -import 'dart:async'; -import 'package:meta/meta.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; -import 'package:uuid/uuid.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; - -import 'dart:ffi' as ffi; - -part 'bridge_generated.freezed.dart'; - -abstract class BreezSdkCore { - /// Wrapper around [BreezServices::connect] which also initializes SDK logging - Future connect({required ConnectRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta; - - /// Check whether node service is initialized or not - Future isInitialized({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta; - - /// See [BreezServices::sync] - Future sync({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta; - - /// See [BreezServices::node_credentials] - Future nodeCredentials({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta; - - /// See [BreezServices::node_info] - Future nodeInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta; - - /// See [BreezServices::configure_node] - Future configureNode({required ConfigureNodeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta; - - /// Cleanup node resources and stop the signer. - Future disconnect({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta; - - /// See [BreezServices::sign_message] - Future signMessage({required SignMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta; - - /// See [BreezServices::check_message] - Future checkMessage({required CheckMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta; - - /// See [breez_services::mnemonic_to_seed] - Future mnemonicToSeed({required String phrase, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta; - - /// See [BreezServices::default_config] - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta; - - /// See [BreezServices::static_backup] - Future staticBackup({required StaticBackupRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta; - - /// See [BreezServices::service_health_check] - Future serviceHealthCheck({required String apiKey, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezEventsStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezLogStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta; - - /// See [BreezServices::list_lsps] - Future> listLsps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta; - - /// See [BreezServices::connect_lsp] - Future connectLsp({required String lspId, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta; - - /// See [BreezServices::lsp_id] - Future lspId({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta; - - /// See [BreezServices::fetch_lsp_info] - Future fetchLspInfo({required String id, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta; - - /// See [BreezServices::lsp_info] - Future lspInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta; - - /// See [BreezServices::close_lsp_channels] - Future closeLspChannels({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta; - - Future registerWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta; - - Future unregisterWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta; - - /// See [BreezServices::backup] - Future backup({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta; - - /// See [BreezServices::backup_status] - Future backupStatus({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta; - - Future parseInvoice({required String invoice, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta; - - Future parseInput({required String input, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta; - - /// See [BreezServices::list_payments] - Future> listPayments({required ListPaymentsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta; - - /// See [BreezServices::list_payments] - Future paymentByHash({required String hash, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta; - - /// See [BreezServices::set_payment_metadata] - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta; - - /// See [BreezServices::send_payment] - Future sendPayment({required SendPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta; - - /// See [BreezServices::send_spontaneous_payment] - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta; - - /// See [BreezServices::receive_payment] - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta; - - /// See [BreezServices::lnurl_pay] - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta; - - /// See [BreezServices::lnurl_withdraw] - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta; - - /// See [BreezServices::lnurl_auth] - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta; - - /// See [BreezServices::report_issue] - Future reportIssue({required ReportIssueRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta; - - /// See [BreezServices::fetch_fiat_rates] - Future> fetchFiatRates({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta; - - /// See [BreezServices::list_fiat_currencies] - Future> listFiatCurrencies({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta; - - /// See [BreezServices::max_reverse_swap_amount] - Future maxReverseSwapAmount({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta; - - /// See [BreezServices::send_onchain] - Future sendOnchain({required SendOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta; - - /// See [BreezServices::pay_onchain] - Future payOnchain({required PayOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta; - - /// See [BreezServices::receive_onchain] - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta; - - /// See [BreezServices::buy_bitcoin] - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta; - - /// See [BreezServices::redeem_onchain_funds] - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta; - - /// See [BreezServices::prepare_redeem_onchain_funds] - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta; - - /// See [BreezServices::list_refundables] - Future> listRefundables({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta; - - /// See [BreezServices::prepare_refund] - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta; - - /// See [BreezServices::refund] - Future refund({required RefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta; - - /// See [BreezServices::rescan_swaps] - Future rescanSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta; - - /// See [BreezServices::redeem_swap] - Future redeemSwap({required String swapAddress, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta; - - /// See [BreezServices::in_progress_swap] - Future inProgressSwap({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta; - - /// See [BreezServices::in_progress_reverse_swaps] - Future> inProgressReverseSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta; - - /// See [BreezServices::claim_reverse_swap] - Future claimReverseSwap({required String lockupAddress, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kClaimReverseSwapConstMeta; - - /// See [BreezServices::open_channel_fee] - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta; - - /// See [BreezServices::fetch_reverse_swap_fees] - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta; - - /// See [BreezServices::onchain_payment_limits] - Future onchainPaymentLimits({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta; - - /// See [BreezServices::prepare_onchain_payment] - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta; - - /// See [BreezServices::in_progress_onchain_payments] - Future> inProgressOnchainPayments({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta; - - /// See [BreezServices::recommended_fees] - Future recommendedFees({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta; - - /// See [BreezServices::execute_dev_command] - Future executeCommand({required String command, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta; - - /// See [BreezServices::generate_diagnostic_data] - Future generateDiagnosticData({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta; -} - -class AesSuccessActionDataDecrypted { - final String description; - final String plaintext; - - const AesSuccessActionDataDecrypted({ - required this.description, - required this.plaintext, - }); -} - -@freezed -sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { - const factory AesSuccessActionDataResult.decrypted({ - required AesSuccessActionDataDecrypted data, - }) = AesSuccessActionDataResult_Decrypted; - const factory AesSuccessActionDataResult.errorStatus({ - required String reason, - }) = AesSuccessActionDataResult_ErrorStatus; -} - -class BackupFailedData { - final String error; - - const BackupFailedData({ - required this.error, - }); -} - -class BackupStatus { - final bool backedUp; - - /// Epoch time, in seconds - final int? lastBackupTime; - - const BackupStatus({ - required this.backedUp, - this.lastBackupTime, - }); -} - -class BitcoinAddressData { - final String address; - final Network network; - final int? amountSat; - final String? label; - final String? message; - - const BitcoinAddressData({ - required this.address, - required this.network, - this.amountSat, - this.label, - this.message, - }); -} - -@freezed -sealed class BreezEvent with _$BreezEvent { - /// Indicates that a new block has just been found - const factory BreezEvent.newBlock({ - required int block, - }) = BreezEvent_NewBlock; - - /// Indicates that a new invoice has just been paid - const factory BreezEvent.invoicePaid({ - required InvoicePaidDetails details, - }) = BreezEvent_InvoicePaid; - - /// Indicates that the local SDK state has just been sync-ed with the remote components - const factory BreezEvent.synced() = BreezEvent_Synced; - - /// Indicates that an outgoing payment has been completed successfully - const factory BreezEvent.paymentSucceed({ - required Payment details, - }) = BreezEvent_PaymentSucceed; - - /// Indicates that an outgoing payment has been failed to complete - const factory BreezEvent.paymentFailed({ - required PaymentFailedData details, - }) = BreezEvent_PaymentFailed; - - /// Indicates that the backup process has just started - const factory BreezEvent.backupStarted() = BreezEvent_BackupStarted; - - /// Indicates that the backup process has just finished successfully - const factory BreezEvent.backupSucceeded() = BreezEvent_BackupSucceeded; - - /// Indicates that the backup process has just failed - const factory BreezEvent.backupFailed({ - required BackupFailedData details, - }) = BreezEvent_BackupFailed; - - /// Indicates that a reverse swap has been updated which may also - /// include a status change - const factory BreezEvent.reverseSwapUpdated({ - required ReverseSwapInfo details, - }) = BreezEvent_ReverseSwapUpdated; - - /// Indicates that a swap has been updated which may also - /// include a status change - const factory BreezEvent.swapUpdated({ - required SwapInfo details, - }) = BreezEvent_SwapUpdated; -} - -/// Different providers will demand different behaviours when the user is trying to buy bitcoin. -enum BuyBitcoinProvider { - Moonpay, -} - -class BuyBitcoinRequest { - final BuyBitcoinProvider provider; - final OpeningFeeParams? openingFeeParams; - - /// The optional URL to redirect to after completing the buy. - /// - /// For Moonpay, see - final String? redirectUrl; - - const BuyBitcoinRequest({ - required this.provider, - this.openingFeeParams, - this.redirectUrl, - }); -} - -class BuyBitcoinResponse { - final String url; - final OpeningFeeParams? openingFeeParams; - - const BuyBitcoinResponse({ - required this.url, - this.openingFeeParams, - }); -} - -/// State of a Lightning channel -enum ChannelState { - PendingOpen, - Opened, - PendingClose, - Closed, -} - -/// Request to check a message was signed by a specific node id. -class CheckMessageRequest { - /// The message that was signed. - final String message; - - /// The public key of the node that signed the message. - final String pubkey; - - /// The zbase encoded signature to verify. - final String signature; - - const CheckMessageRequest({ - required this.message, - required this.pubkey, - required this.signature, - }); -} - -/// Response to a [CheckMessageRequest] -class CheckMessageResponse { - /// Boolean value indicating whether the signature covers the message and - /// was signed by the given pubkey. - final bool isValid; - - const CheckMessageResponse({ - required this.isValid, - }); -} - -/// Represents the funds that were on the user side of the channel at the time it was closed. -class ClosedChannelPaymentDetails { - final ChannelState state; - final String fundingTxid; - final String? shortChannelId; - - /// Can be empty for older closed channels. - final String? closingTxid; - - const ClosedChannelPaymentDetails({ - required this.state, - required this.fundingTxid, - this.shortChannelId, - this.closingTxid, - }); -} - -/// Configuration for the Breez Services -/// -/// Use [Config::production] or [Config::staging] for default configs of the different supported -/// environments. -class Config { - final String breezserver; - final String chainnotifierUrl; - - /// If set, this is the mempool.space URL that will be used. - /// - /// If not set, a list of mempool.space URLs will be used to provide fault-tolerance. If calls - /// to the first URL fail, then the call will be repeated to the next URL, and so on. - /// - /// Note that, if specified, the URL has to be in the format: `https://mempool.space/api` - final String? mempoolspaceUrl; - - /// Directory in which all SDK files (DB, log) are stored. Defaults to ".", otherwise if it's customized, - /// the folder should exist before starting the SDK. - final String workingDir; - final Network network; - final int paymentTimeoutSec; - final String? defaultLspId; - final String? apiKey; - - /// Maps to the CLN `maxfeepercent` config when paying invoices (`lightning-pay`) - final double maxfeePercent; - - /// Maps to the CLN `exemptfee` config when paying invoices (`lightning-pay`) - final int exemptfeeMsat; - final NodeConfig nodeConfig; - - const Config({ - required this.breezserver, - required this.chainnotifierUrl, - this.mempoolspaceUrl, - required this.workingDir, - required this.network, - required this.paymentTimeoutSec, - this.defaultLspId, - this.apiKey, - required this.maxfeePercent, - required this.exemptfeeMsat, - required this.nodeConfig, - }); -} - -/// Represents a configure node request. -class ConfigureNodeRequest { - final String? closeToAddress; - - const ConfigureNodeRequest({ - this.closeToAddress, - }); -} - -/// Represents a connect request. -class ConnectRequest { - final Config config; - final Uint8List seed; - - /// If true, only restores an existing node and otherwise result in an error - final bool? restoreOnly; - - const ConnectRequest({ - required this.config, - required this.seed, - this.restoreOnly, - }); -} - -class CurrencyInfo { - final String name; - final int fractionSize; - final int? spacing; - final Symbol? symbol; - final Symbol? uniqSymbol; - final List localizedName; - final List localeOverrides; - - const CurrencyInfo({ - required this.name, - required this.fractionSize, - this.spacing, - this.symbol, - this.uniqSymbol, - required this.localizedName, - required this.localeOverrides, - }); -} - -/// Indicates the different kinds of supported environments for [crate::BreezServices]. -enum EnvironmentType { - Production, - Staging, -} - -class FiatCurrency { - final String id; - final CurrencyInfo info; - - const FiatCurrency({ - required this.id, - required this.info, - }); -} - -/// Client-specific credentials to connect to and manage a Greenlight node in the cloud -class GreenlightCredentials { - final Uint8List developerKey; - final Uint8List developerCert; - - const GreenlightCredentials({ - required this.developerKey, - required this.developerCert, - }); -} - -/// Device credentials used to authenticate to Greenlight with the current device. -class GreenlightDeviceCredentials { - final Uint8List device; - - const GreenlightDeviceCredentials({ - required this.device, - }); -} - -class GreenlightNodeConfig { - final GreenlightCredentials? partnerCredentials; - final String? inviteCode; - - const GreenlightNodeConfig({ - this.partnerCredentials, - this.inviteCode, - }); -} - -/// Indicates the different service health check statuses. -enum HealthCheckStatus { - Operational, - Maintenance, - ServiceDisruption, -} - -@freezed -sealed class InputType with _$InputType { - const factory InputType.bitcoinAddress({ - required BitcoinAddressData address, - }) = InputType_BitcoinAddress; - const factory InputType.bolt11({ - required LNInvoice invoice, - }) = InputType_Bolt11; - const factory InputType.nodeId({ - required String nodeId, - }) = InputType_NodeId; - const factory InputType.url({ - required String url, - }) = InputType_Url; - const factory InputType.lnUrlPay({ - required LnUrlPayRequestData data, - }) = InputType_LnUrlPay; - const factory InputType.lnUrlWithdraw({ - required LnUrlWithdrawRequestData data, - }) = InputType_LnUrlWithdraw; - const factory InputType.lnUrlAuth({ - required LnUrlAuthRequestData data, - }) = InputType_LnUrlAuth; - const factory InputType.lnUrlError({ - required LnUrlErrorData data, - }) = InputType_LnUrlError; -} - -/// Details of an invoice that has been paid, included as payload in an emitted [BreezEvent] -class InvoicePaidDetails { - final String paymentHash; - final String bolt11; - final Payment? payment; - - const InvoicePaidDetails({ - required this.paymentHash, - required this.bolt11, - this.payment, - }); -} - -/// Represents a list payments request. -class ListPaymentsRequest { - final List? filters; - final List? metadataFilters; - - /// Epoch time, in seconds - final int? fromTimestamp; - - /// Epoch time, in seconds - final int? toTimestamp; - final bool? includeFailures; - final int? offset; - final int? limit; - - const ListPaymentsRequest({ - this.filters, - this.metadataFilters, - this.fromTimestamp, - this.toTimestamp, - this.includeFailures, - this.offset, - this.limit, - }); -} - -class LNInvoice { - final String bolt11; - final Network network; - final String payeePubkey; - final String paymentHash; - final String? description; - final String? descriptionHash; - final int? amountMsat; - final int timestamp; - final int expiry; - final List routingHints; - final Uint8List paymentSecret; - final int minFinalCltvExpiryDelta; - - const LNInvoice({ - required this.bolt11, - required this.network, - required this.payeePubkey, - required this.paymentHash, - this.description, - this.descriptionHash, - this.amountMsat, - required this.timestamp, - required this.expiry, - required this.routingHints, - required this.paymentSecret, - required this.minFinalCltvExpiryDelta, - }); -} - -/// Details of a LN payment, as included in a [Payment] -class LnPaymentDetails { - final String paymentHash; - final String label; - final String destinationPubkey; - final String paymentPreimage; - final bool keysend; - final String bolt11; - - /// Only set for [PaymentType::Received], payments which require to open a channel. - /// Represents the actual invoice paid by the sender - final String? openChannelBolt11; - - /// Only set for [PaymentType::Sent] payments that are part of a LNURL-pay workflow where - /// the endpoint returns a success action - final SuccessActionProcessed? lnurlSuccessAction; - - /// Only set for [PaymentType::Sent] payments if it is not a payment to a Lightning Address - final String? lnurlPayDomain; - - /// Only set for [PaymentType::Sent] payments if the user sent the comment using LNURL-pay - final String? lnurlPayComment; - - /// Only set for [PaymentType::Sent] payments that are sent to a Lightning Address - final String? lnAddress; - - /// Only set for [PaymentType::Sent] payments where the receiver endpoint returned LNURL metadata - final String? lnurlMetadata; - - /// Only set for [PaymentType::Received] payments that were received as part of LNURL-withdraw - final String? lnurlWithdrawEndpoint; - - /// Only set for [PaymentType::Received] payments that were received in the context of a swap - final SwapInfo? swapInfo; - - /// Only set for [PaymentType::Sent] payments that were sent in the context of a reverse swap - final ReverseSwapInfo? reverseSwapInfo; - - /// Only set for [PaymentStatus::Pending] payments that are inflight. - final int? pendingExpirationBlock; - - const LnPaymentDetails({ - required this.paymentHash, - required this.label, - required this.destinationPubkey, - required this.paymentPreimage, - required this.keysend, - required this.bolt11, - this.openChannelBolt11, - this.lnurlSuccessAction, - this.lnurlPayDomain, - this.lnurlPayComment, - this.lnAddress, - this.lnurlMetadata, - this.lnurlWithdrawEndpoint, - this.swapInfo, - this.reverseSwapInfo, - this.pendingExpirationBlock, - }); -} - -class LnUrlAuthRequestData { - final String k1; - final String? action; - final String domain; - final String url; - - const LnUrlAuthRequestData({ - required this.k1, - this.action, - required this.domain, - required this.url, - }); -} - -@freezed -sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { - const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; - const factory LnUrlCallbackStatus.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlCallbackStatus_ErrorStatus; -} - -class LnUrlErrorData { - final String reason; - - const LnUrlErrorData({ - required this.reason, - }); -} - -class LnUrlPayErrorData { - final String paymentHash; - final String reason; - - const LnUrlPayErrorData({ - required this.paymentHash, - required this.reason, - }); -} - -class LnUrlPayRequest { - final LnUrlPayRequestData data; - final int amountMsat; - final bool useTrampoline; - final String? comment; - final String? paymentLabel; - final bool? validateSuccessActionUrl; - - const LnUrlPayRequest({ - required this.data, - required this.amountMsat, - required this.useTrampoline, - this.comment, - this.paymentLabel, - this.validateSuccessActionUrl, - }); -} - -class LnUrlPayRequestData { - final String callback; - final int minSendable; - final int maxSendable; - final String metadataStr; - final int commentAllowed; - final String domain; - final bool allowsNostr; - final String? nostrPubkey; - final String? lnAddress; - - const LnUrlPayRequestData({ - required this.callback, - required this.minSendable, - required this.maxSendable, - required this.metadataStr, - required this.commentAllowed, - required this.domain, - required this.allowsNostr, - this.nostrPubkey, - this.lnAddress, - }); -} - -@freezed -sealed class LnUrlPayResult with _$LnUrlPayResult { - const factory LnUrlPayResult.endpointSuccess({ - required LnUrlPaySuccessData data, - }) = LnUrlPayResult_EndpointSuccess; - const factory LnUrlPayResult.endpointError({ - required LnUrlErrorData data, - }) = LnUrlPayResult_EndpointError; - const factory LnUrlPayResult.payError({ - required LnUrlPayErrorData data, - }) = LnUrlPayResult_PayError; -} - -class LnUrlPaySuccessData { - final Payment payment; - final SuccessActionProcessed? successAction; - - const LnUrlPaySuccessData({ - required this.payment, - this.successAction, - }); -} - -class LnUrlWithdrawRequest { - final LnUrlWithdrawRequestData data; - final int amountMsat; - final String? description; - - const LnUrlWithdrawRequest({ - required this.data, - required this.amountMsat, - this.description, - }); -} - -class LnUrlWithdrawRequestData { - final String callback; - final String k1; - final String defaultDescription; - final int minWithdrawable; - final int maxWithdrawable; - - const LnUrlWithdrawRequestData({ - required this.callback, - required this.k1, - required this.defaultDescription, - required this.minWithdrawable, - required this.maxWithdrawable, - }); -} - -@freezed -sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { - const factory LnUrlWithdrawResult.ok({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Ok; - const factory LnUrlWithdrawResult.timeout({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Timeout; - const factory LnUrlWithdrawResult.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlWithdrawResult_ErrorStatus; -} - -class LnUrlWithdrawSuccessData { - final LNInvoice invoice; - - const LnUrlWithdrawSuccessData({ - required this.invoice, - }); -} - -class LocaleOverrides { - final String locale; - final int? spacing; - final Symbol symbol; - - const LocaleOverrides({ - required this.locale, - this.spacing, - required this.symbol, - }); -} - -class LocalizedName { - final String locale; - final String name; - - const LocalizedName({ - required this.locale, - required this.name, - }); -} - -/// Internal SDK log entry -class LogEntry { - final String line; - final String level; - - const LogEntry({ - required this.line, - required this.level, - }); -} - -/// Details of supported LSP -class LspInformation { - final String id; - - /// The name of of LSP - final String name; - - /// The URL of the LSP - final String widgetUrl; - - /// The identity pubkey of the Lightning node - final String pubkey; - - /// The network location of the lightning node, e.g. `12.34.56.78:9012` or `localhost:10011` - final String host; - - /// The base fee charged regardless of the number of milli-satoshis sent - final int baseFeeMsat; - - /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. - final double feeRate; - - /// The required timelock delta for HTLCs forwarded over the channel - final int timeLockDelta; - - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minHtlcMsat; - final Uint8List lspPubkey; - final OpeningFeeParamsMenu openingFeeParamsList; - - const LspInformation({ - required this.id, - required this.name, - required this.widgetUrl, - required this.pubkey, - required this.host, - required this.baseFeeMsat, - required this.feeRate, - required this.timeLockDelta, - required this.minHtlcMsat, - required this.lspPubkey, - required this.openingFeeParamsList, - }); -} - -class MaxReverseSwapAmountResponse { - /// The total sats that can be sent onchain. - final int totalSat; - - const MaxReverseSwapAmountResponse({ - required this.totalSat, - }); -} - -class MessageSuccessActionData { - final String message; - - const MessageSuccessActionData({ - required this.message, - }); -} - -/// A metadata filter which can be applied when retrieving the transaction list -class MetadataFilter { - /// Specifies which field to apply the filter on, using the JSON path format - final String jsonPath; - - /// Specifies which JSON value to filter for. - /// As such, strings must be wrapped with quotes ("") in order to be properly filtered - final String jsonValue; - - const MetadataFilter({ - required this.jsonPath, - required this.jsonValue, - }); -} - -enum Network { - Bitcoin, - Testnet, - Signet, - Regtest, -} - -@freezed -sealed class NodeConfig with _$NodeConfig { - const factory NodeConfig.greenlight({ - required GreenlightNodeConfig config, - }) = NodeConfig_Greenlight; -} - -@freezed -sealed class NodeCredentials with _$NodeCredentials { - const factory NodeCredentials.greenlight({ - required GreenlightDeviceCredentials credentials, - }) = NodeCredentials_Greenlight; -} - -/// The node state of a Greenlight LN node running in the cloud. -/// -/// Note: The implementation attempts to provide the most up-to-date values, -/// which may result in some short-lived inconsistencies -/// (e.g., `channels_balance_msat` may be updated before `inbound_liquidity_msats`). -class NodeState { - final String id; - final int blockHeight; - final int channelsBalanceMsat; - final int onchainBalanceMsat; - final int pendingOnchainBalanceMsat; - final List utxos; - final int maxPayableMsat; - final int maxReceivableMsat; - final int maxSinglePaymentAmountMsat; - final int maxChanReserveMsats; - final List connectedPeers; - - /// Maximum receivable in a single payment without requiring a new channel open. - final int maxReceivableSinglePaymentAmountMsat; - - /// Total receivable on all available channels - final int totalInboundLiquidityMsats; - - const NodeState({ - required this.id, - required this.blockHeight, - required this.channelsBalanceMsat, - required this.onchainBalanceMsat, - required this.pendingOnchainBalanceMsat, - required this.utxos, - required this.maxPayableMsat, - required this.maxReceivableMsat, - required this.maxSinglePaymentAmountMsat, - required this.maxChanReserveMsats, - required this.connectedPeers, - required this.maxReceivableSinglePaymentAmountMsat, - required this.totalInboundLiquidityMsats, - }); -} - -class OnchainPaymentLimitsResponse { - /// Minimum amount the reverse swap service accepts as a send amount - final int minSat; - - /// Maximum amount the reverse swap service accepts as a send amount - final int maxSat; - - /// Maximum amount this node can send with the current channels and the current local balance - final int maxPayableSat; - - const OnchainPaymentLimitsResponse({ - required this.minSat, - required this.maxSat, - required this.maxPayableSat, - }); -} - -class OpenChannelFeeRequest { - final int? amountMsat; - final int? expiry; - - const OpenChannelFeeRequest({ - this.amountMsat, - this.expiry, - }); -} - -class OpenChannelFeeResponse { - /// Opening fee for receiving the amount set in the [OpenChannelFeeRequest], in case it was set. - /// It may be zero if no new channel needs to be opened. - final int? feeMsat; - - /// The fee params for receiving more than the current inbound liquidity. - final OpeningFeeParams feeParams; - - const OpenChannelFeeResponse({ - this.feeMsat, - required this.feeParams, - }); -} - -/// Dynamic fee parameters offered by the LSP for opening a new channel. -/// -/// After they are received, the client shouldn't change them when calling LSP methods, -/// otherwise the LSP may reject the call. -class OpeningFeeParams { - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minMsat; - - /// The fee in ppm charged over liquidity when buying a channel - final int proportional; - - /// The date and time this opening fee params promise expires, in RFC 3339 / ISO 8601 format - final String validUntil; - - /// The channel can be closed if not used within this duration in blocks - final int maxIdleTime; - final int maxClientToSelfDelay; - final String promise; - - const OpeningFeeParams({ - required this.minMsat, - required this.proportional, - required this.validUntil, - required this.maxIdleTime, - required this.maxClientToSelfDelay, - required this.promise, - }); -} - -/// See [OpeningFeeParamsMenu::try_from] -class OpeningFeeParamsMenu { - final List values; - - const OpeningFeeParamsMenu({ - required this.values, - }); -} - -class PayOnchainRequest { - final String recipientAddress; - final PrepareOnchainPaymentResponse prepareRes; - - const PayOnchainRequest({ - required this.recipientAddress, - required this.prepareRes, - }); -} - -class PayOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const PayOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a payment, including its [PaymentType] and [PaymentDetails] -class Payment { - final String id; - final PaymentType paymentType; - - /// Epoch time, in seconds - final int paymentTime; - final int amountMsat; - final int feeMsat; - final PaymentStatus status; - final String? error; - final String? description; - final PaymentDetails details; - final String? metadata; - - const Payment({ - required this.id, - required this.paymentType, - required this.paymentTime, - required this.amountMsat, - required this.feeMsat, - required this.status, - this.error, - this.description, - required this.details, - this.metadata, - }); -} - -@freezed -sealed class PaymentDetails with _$PaymentDetails { - const factory PaymentDetails.ln({ - required LnPaymentDetails data, - }) = PaymentDetails_Ln; - const factory PaymentDetails.closedChannel({ - required ClosedChannelPaymentDetails data, - }) = PaymentDetails_ClosedChannel; -} - -class PaymentFailedData { - final String error; - final String nodeId; - final LNInvoice? invoice; - final String? label; - - const PaymentFailedData({ - required this.error, - required this.nodeId, - this.invoice, - this.label, - }); -} - -/// The status of a payment -enum PaymentStatus { - Pending, - Complete, - Failed, -} - -/// Different types of supported payments -enum PaymentType { - Sent, - Received, - ClosedChannel, -} - -/// Different types of supported filters which can be applied when retrieving the transaction list -enum PaymentTypeFilter { - Sent, - Received, - ClosedChannel, -} - -/// See [ReverseSwapFeesRequest] -class PrepareOnchainPaymentRequest { - /// Depending on `amount_type`, this may be the desired send amount or the desired receive amount. - final int amountSat; - final SwapAmountType amountType; - - /// Feerate (sat / vByte) for the claim transaction - final int claimTxFeerate; - - const PrepareOnchainPaymentRequest({ - required this.amountSat, - required this.amountType, - required this.claimTxFeerate, - }); -} - -/// Contains fields describing the reverse swap parameters (see [ReverseSwapPairInfo]), as well as -/// the resulting send and receive amounts. -class PrepareOnchainPaymentResponse { - final String feesHash; - final double feesPercentage; - final int feesLockup; - final int feesClaim; - final int senderAmountSat; - final int recipientAmountSat; - final int totalFees; - - const PrepareOnchainPaymentResponse({ - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - required this.senderAmountSat, - required this.recipientAmountSat, - required this.totalFees, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what fee will be charged in satoshis. -/// This model holds the request data which consists of the address to redeem on-chain funds to and the fee rate in. -/// satoshis per vbyte which will be converted to absolute satoshis. -class PrepareRedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const PrepareRedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what a fee it will be charged in satoshis -/// this model holds the response data, which consists of the weight and the absolute fee in sats -class PrepareRedeemOnchainFundsResponse { - final int txWeight; - final int txFeeSat; - - const PrepareRedeemOnchainFundsResponse({ - required this.txWeight, - required this.txFeeSat, - }); -} - -class PrepareRefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const PrepareRefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class PrepareRefundResponse { - final int refundTxWeight; - final int refundTxFeeSat; - - const PrepareRefundResponse({ - required this.refundTxWeight, - required this.refundTxFeeSat, - }); -} - -class Rate { - final String coin; - final double value; - - const Rate({ - required this.coin, - required this.value, - }); -} - -class ReceiveOnchainRequest { - final OpeningFeeParams? openingFeeParams; - - const ReceiveOnchainRequest({ - this.openingFeeParams, - }); -} - -/// Represents a receive payment request. -class ReceivePaymentRequest { - /// The amount in satoshis for this payment request - final int amountMsat; - - /// The description for this payment request. - final String description; - - /// Optional preimage for this payment request. - /// If specified, it will be used instead of generating a new one. - final Uint8List? preimage; - - /// If set and valid, these fess options are used when a new channels is needed. - /// Otherwise the default fee options will be used. - final OpeningFeeParams? openingFeeParams; - - /// If set to true, then the bolt11 invoice returned includes the description hash. - final bool? useDescriptionHash; - - /// if specified, set the time the invoice is valid for, in seconds. - final int? expiry; - - /// if specified, sets the min_final_cltv_expiry for the invoice - final int? cltv; - - const ReceivePaymentRequest({ - required this.amountMsat, - required this.description, - this.preimage, - this.openingFeeParams, - this.useDescriptionHash, - this.expiry, - this.cltv, - }); -} - -/// Represents a receive payment response. -/// -/// Breez SDK may have to open a new channel to receive this payment. In that case, the channel will -/// be opened automatically when the invoice is paid, and the fees will be described in the -/// `opening_fee_params` and `opening_fee_msat` fields. -class ReceivePaymentResponse { - /// The generated invoice, including any necessary routing hints - final LNInvoice lnInvoice; - - /// If set, these are the [OpeningFeeParams] used to calculate the channel opening fees. - final OpeningFeeParams? openingFeeParams; - - /// If set, this is the channel opening fee that will be deduced from the invoice amount. - final int? openingFeeMsat; - - const ReceivePaymentResponse({ - required this.lnInvoice, - this.openingFeeParams, - this.openingFeeMsat, - }); -} - -/// Wrapper containing the result of the recommended fees query, in sat/vByte, based on mempool.space data -class RecommendedFees { - final int fastestFee; - final int halfHourFee; - final int hourFee; - final int economyFee; - final int minimumFee; - - const RecommendedFees({ - required this.fastestFee, - required this.halfHourFee, - required this.hourFee, - required this.economyFee, - required this.minimumFee, - }); -} - -class RedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const RedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RedeemOnchainFundsResponse { - final Uint8List txid; - - const RedeemOnchainFundsResponse({ - required this.txid, - }); -} - -class RefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const RefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RefundResponse { - final String refundTxId; - - const RefundResponse({ - required this.refundTxId, - }); -} - -@freezed -sealed class ReportIssueRequest with _$ReportIssueRequest { - const factory ReportIssueRequest.paymentFailure({ - required ReportPaymentFailureDetails data, - }) = ReportIssueRequest_PaymentFailure; -} - -class ReportPaymentFailureDetails { - /// The payment hash of the payment failure - final String paymentHash; - - /// The comment or error text - final String? comment; - - const ReportPaymentFailureDetails({ - required this.paymentHash, - this.comment, - }); -} - -class ReverseSwapFeesRequest { - /// Amount to be sent - final int? sendAmountSat; - - /// Feerate (sat / vByte) for the claim transaction - final int? claimTxFeerate; - - const ReverseSwapFeesRequest({ - this.sendAmountSat, - this.claimTxFeerate, - }); -} - -/// Simplified version of [FullReverseSwapInfo], containing only the user-relevant fields -class ReverseSwapInfo { - final String id; - final String claimPubkey; - - /// The lockup tx id, available from the moment the lockup tx is seen in the mempool by the SDK - final String? lockupTxid; - - /// The claim tx id, available from the moment the claim tx is broadcast by the SDK - final String? claimTxid; - final int onchainAmountSat; - final ReverseSwapStatus status; - - const ReverseSwapInfo({ - required this.id, - required this.claimPubkey, - this.lockupTxid, - this.claimTxid, - required this.onchainAmountSat, - required this.status, - }); -} - -/// Details about the reverse swap fees and parameters, at this point in time -class ReverseSwapPairInfo { - /// Minimum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int min; - - /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int max; - - /// Hash of the pair info JSON - final String feesHash; - - /// Percentage fee for the reverse swap service - final double feesPercentage; - - /// Miner fees in sats for locking up funds - final int feesLockup; - - /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. - final int feesClaim; - - /// Total fees for the reverse swap, in sats, based on the given send amount. - /// - /// The field is set only when the [ReverseSwapFeesRequest] `send_amount_sat` is known. - /// - /// If the [ReverseSwapFeesRequest] has the `claim_tx_feerate` empty, this is an estimate. If - /// the `claim_tx_feerate` is set, this is the exact value of the total reverse swap fees. - final int? totalFees; - - const ReverseSwapPairInfo({ - required this.min, - required this.max, - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - this.totalFees, - }); -} - -/// The possible statuses of a reverse swap, from the Breez SDK perspective. -/// -/// See [BoltzApiReverseSwapStatus] for the reverse swap status from the Breez endpoint point of view. -enum ReverseSwapStatus { - /// HODL invoice payment is not completed yet - /// - /// This is also the temporary status of a reverse swap when restoring a node, until `sync` finishes. - Initial, - - /// HODL invoice payment was successfully triggered and confirmed by Boltz, but the reverse swap - /// is not yet complete - InProgress, - - /// An explicit error occurs (validation error, failure reported by Boltz, expiration, etc) and - /// the initial invoice funds are returned to the sender (invoice is cancelled or payment failed) - Cancelled, - - /// Successfully completed (claim tx has been seen in the mempool) - CompletedSeen, - - /// Successfully completed (claim tx has at least one confirmation) - CompletedConfirmed, -} - -class RouteHint { - final List hops; - - const RouteHint({ - required this.hops, - }); -} - -class RouteHintHop { - final String srcNodeId; - final String shortChannelId; - final int feesBaseMsat; - final int feesProportionalMillionths; - final int cltvExpiryDelta; - final int? htlcMinimumMsat; - final int? htlcMaximumMsat; - - const RouteHintHop({ - required this.srcNodeId, - required this.shortChannelId, - required this.feesBaseMsat, - required this.feesProportionalMillionths, - required this.cltvExpiryDelta, - this.htlcMinimumMsat, - this.htlcMaximumMsat, - }); -} - -class SendOnchainRequest { - final int amountSat; - final String onchainRecipientAddress; - final String pairHash; - final int satPerVbyte; - - const SendOnchainRequest({ - required this.amountSat, - required this.onchainRecipientAddress, - required this.pairHash, - required this.satPerVbyte, - }); -} - -class SendOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const SendOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a send payment request. -class SendPaymentRequest { - /// The bolt11 invoice - final String bolt11; - - /// Trampoline payments outsource pathfinding to the LSP. Trampoline payments can improve - /// payment performance, but are generally more expensive in terms of fees and they - /// compromise on privacy. - final bool useTrampoline; - - /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. - final int? amountMsat; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendPaymentRequest({ - required this.bolt11, - required this.useTrampoline, - this.amountMsat, - this.label, - }); -} - -/// Represents a send payment response. -class SendPaymentResponse { - final Payment payment; - - const SendPaymentResponse({ - required this.payment, - }); -} - -/// Represents a send spontaneous payment request. -class SendSpontaneousPaymentRequest { - /// The node id to send this payment is - final String nodeId; - - /// The amount in millisatoshis for this payment - final int amountMsat; - final List? extraTlvs; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendSpontaneousPaymentRequest({ - required this.nodeId, - required this.amountMsat, - this.extraTlvs, - this.label, - }); -} - -/// Represents a service health check response. -class ServiceHealthCheckResponse { - final HealthCheckStatus status; - - const ServiceHealthCheckResponse({ - required this.status, - }); -} - -/// Request to sign a message with the node's private key. -class SignMessageRequest { - /// The message to be signed by the node's private key. - final String message; - - const SignMessageRequest({ - required this.message, - }); -} - -/// Response to a [SignMessageRequest]. -class SignMessageResponse { - /// The signature that covers the message of SignMessageRequest. Zbase - /// encoded. - final String signature; - - const SignMessageResponse({ - required this.signature, - }); -} - -class StaticBackupRequest { - final String workingDir; - - const StaticBackupRequest({ - required this.workingDir, - }); -} - -class StaticBackupResponse { - final List? backup; - - const StaticBackupResponse({ - this.backup, - }); -} - -@freezed -sealed class SuccessActionProcessed with _$SuccessActionProcessed { - const factory SuccessActionProcessed.aes({ - required AesSuccessActionDataResult result, - }) = SuccessActionProcessed_Aes; - const factory SuccessActionProcessed.message({ - required MessageSuccessActionData data, - }) = SuccessActionProcessed_Message; - const factory SuccessActionProcessed.url({ - required UrlSuccessActionData data, - }) = SuccessActionProcessed_Url; -} - -enum SwapAmountType { - Send, - Receive, -} - -/// Represents the details of an on-going swap. -/// -/// Once this SwapInfo is created it will be monitored on-chain and its state is -/// saved to the persistent storage. -/// -/// The SwapInfo has a status which changes accordingly, documented in [SwapStatus]. -/// -class SwapInfo { - /// Bitcoin address for this swap. Sats sent to this address will be swapped. - final String bitcoinAddress; - - /// Relative time lock start, received from [SwapperAPI::create_swap]. - final int createdAt; - - /// Relative time lock for the timeout for the script to be redeemed before swap fails. - final int lockHeight; - - /// sha256 hash of preimage to used in the claim sript. - final Uint8List paymentHash; - - /// Secret to claim the swap. - final Uint8List preimage; - - /// Secret claim key for the bitcoin address. - final Uint8List privateKey; - - /// Public key in binary format of the private claim private key. - final Uint8List publicKey; - - /// The public key in binary format from the swapping service. Received from [SwapperAPI::create_swap]. - final Uint8List swapperPublicKey; - - /// The locking script for the generated bitcoin address. Received from [SwapperAPI::create_swap]. - final Uint8List script; - - /// bolt11 invoice to claim the sent funds. - final String? bolt11; - - /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. - final int paidMsat; - - /// Total count of transactions sent to the swap address. - final int totalIncomingTxs; - - /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. - final int confirmedSats; - - /// Unconfirmed sats waiting to be confirmed onchain. - final int unconfirmedSats; - - /// Shows the current status of the swap, either `Initial` or `Expired`. - final SwapStatus status; - - /// Transaction IDs for failed swap attempts. - final List refundTxIds; - - /// Refund transaction IDs for ongoing swap awaiting confirmation. - final List unconfirmedTxIds; - - /// Transaction IDs that have been confirmed on-chain. - final List confirmedTxIds; - - /// The minimum amount of sats one can send in order for the swap to succeed. Received from [SwapperAPI::create_swap]. - final int minAllowedDeposit; - - /// The maximum amount of sats one can send in order for the swap to succeed. This is determined based on `max_swapper_payable` and the node's local balance. - final int maxAllowedDeposit; - - /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. - final int maxSwapperPayable; - - /// Error reason for when swap fails. - final String? lastRedeemError; - - /// The dynamic fees which is set if a channel opening is needed. - /// - /// This is an optional field for backward compatibility with swaps created before dynamic fees. - /// - /// Swaps created after dynamic fees were introduced always have this field set. - final OpeningFeeParams? channelOpeningFees; - - /// The block height when the swap was confirmed. - final int? confirmedAt; - - const SwapInfo({ - required this.bitcoinAddress, - required this.createdAt, - required this.lockHeight, - required this.paymentHash, - required this.preimage, - required this.privateKey, - required this.publicKey, - required this.swapperPublicKey, - required this.script, - this.bolt11, - required this.paidMsat, - required this.totalIncomingTxs, - required this.confirmedSats, - required this.unconfirmedSats, - required this.status, - required this.refundTxIds, - required this.unconfirmedTxIds, - required this.confirmedTxIds, - required this.minAllowedDeposit, - required this.maxAllowedDeposit, - required this.maxSwapperPayable, - this.lastRedeemError, - this.channelOpeningFees, - this.confirmedAt, - }); -} - -/// The status of a swap -enum SwapStatus { - /// The swap address has been created and either there aren't any confirmed transactions associated with it - /// or there are confirmed transactions that are bellow the lock timeout which means the funds are still - /// eligible to be redeemed normally. - Initial, - WaitingConfirmation, - Redeemable, - Redeemed, - - /// The swap address has confirmed transactions associated with it and the lock timeout has passed since - /// the earliest confirmed transaction. This means the only way to spend the funds from this address is by - /// broadcasting a refund transaction. - Refundable, - Completed, -} - -class Symbol { - final String? grapheme; - final String? template; - final bool? rtl; - final int? position; - - const Symbol({ - this.grapheme, - this.template, - this.rtl, - this.position, - }); -} - -/// Represents a TLV entry for a keysend payment. -class TlvEntry { - /// The type field for the TLV - final int fieldNumber; - - /// The value bytes for the TLV - final Uint8List value; - - const TlvEntry({ - required this.fieldNumber, - required this.value, - }); -} - -/// UTXO known to the LN node -class UnspentTransactionOutput { - final Uint8List txid; - final int outnum; - final int amountMillisatoshi; - final String address; - final bool reserved; - - const UnspentTransactionOutput({ - required this.txid, - required this.outnum, - required this.amountMillisatoshi, - required this.address, - required this.reserved, - }); -} - -class UrlSuccessActionData { - final String description; - final String url; - - const UrlSuccessActionData({ - required this.description, - required this.url, - }); -} - -class BreezSdkCoreImpl implements BreezSdkCore { - final BreezSdkCorePlatform _platform; - factory BreezSdkCoreImpl(ExternalLibrary dylib) => BreezSdkCoreImpl.raw(BreezSdkCorePlatform(dylib)); - - /// Only valid on web/WASM platforms. - factory BreezSdkCoreImpl.wasm(FutureOr module) => BreezSdkCoreImpl(module as ExternalLibrary); - BreezSdkCoreImpl.raw(this._platform); - Future connect({required ConnectRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_connect_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect", - argNames: ["req"], - ); - - Future isInitialized({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_is_initialized(port_), - parseSuccessData: _wire2api_bool, - parseErrorData: null, - constMeta: kIsInitializedConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "is_initialized", - argNames: [], - ); - - Future sync({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sync(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSyncConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sync", - argNames: [], - ); - - Future nodeCredentials({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_credentials(port_), - parseSuccessData: _wire2api_opt_box_autoadd_node_credentials, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeCredentialsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_credentials", - argNames: [], - ); - - Future nodeInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_info(port_), - parseSuccessData: _wire2api_node_state, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_info", - argNames: [], - ); - - Future configureNode({required ConfigureNodeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_configure_node_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_configure_node(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConfigureNodeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "configure_node", - argNames: ["req"], - ); - - Future disconnect({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_disconnect(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kDisconnectConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "disconnect", - argNames: [], - ); - - Future signMessage({required SignMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_sign_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sign_message(port_, arg0), - parseSuccessData: _wire2api_sign_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSignMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sign_message", - argNames: ["req"], - ); - - Future checkMessage({required CheckMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_check_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_check_message(port_, arg0), - parseSuccessData: _wire2api_check_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCheckMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "check_message", - argNames: ["req"], - ); - - Future mnemonicToSeed({required String phrase, dynamic hint}) { - var arg0 = _platform.api2wire_String(phrase); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_mnemonic_to_seed(port_, arg0), - parseSuccessData: _wire2api_uint_8_list, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMnemonicToSeedConstMeta, - argValues: [phrase], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "mnemonic_to_seed", - argNames: ["phrase"], - ); - - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) { - var arg0 = api2wire_environment_type(envType); - var arg1 = _platform.api2wire_String(apiKey); - var arg2 = _platform.api2wire_box_autoadd_node_config(nodeConfig); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_default_config(port_, arg0, arg1, arg2), - parseSuccessData: _wire2api_config, - parseErrorData: null, - constMeta: kDefaultConfigConstMeta, - argValues: [envType, apiKey, nodeConfig], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "default_config", - argNames: ["envType", "apiKey", "nodeConfig"], - ); - - Future staticBackup({required StaticBackupRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_static_backup_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_static_backup(port_, arg0), - parseSuccessData: _wire2api_static_backup_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kStaticBackupConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "static_backup", - argNames: ["req"], - ); - - Future serviceHealthCheck({required String apiKey, dynamic hint}) { - var arg0 = _platform.api2wire_String(apiKey); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_service_health_check(port_, arg0), - parseSuccessData: _wire2api_service_health_check_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kServiceHealthCheckConstMeta, - argValues: [apiKey], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "service_health_check", - argNames: ["apiKey"], - ); - - Stream breezEventsStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_events_stream(port_), - parseSuccessData: _wire2api_breez_event, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezEventsStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_events_stream", - argNames: [], - ); - - Stream breezLogStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_log_stream(port_), - parseSuccessData: _wire2api_log_entry, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezLogStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_log_stream", - argNames: [], - ); - - Future> listLsps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_lsps(port_), - parseSuccessData: _wire2api_list_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListLspsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_lsps", - argNames: [], - ); - - Future connectLsp({required String lspId, dynamic hint}) { - var arg0 = _platform.api2wire_String(lspId); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect_lsp(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectLspConstMeta, - argValues: [lspId], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect_lsp", - argNames: ["lspId"], - ); - - Future lspId({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_id(port_), - parseSuccessData: _wire2api_opt_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspIdConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_id", - argNames: [], - ); - - Future fetchLspInfo({required String id, dynamic hint}) { - var arg0 = _platform.api2wire_String(id); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_lsp_info(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchLspInfoConstMeta, - argValues: [id], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_lsp_info", - argNames: ["id"], - ); - - Future lspInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_info(port_), - parseSuccessData: _wire2api_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_info", - argNames: [], - ); - - Future closeLspChannels({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_close_lsp_channels(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCloseLspChannelsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "close_lsp_channels", - argNames: [], - ); - - Future registerWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_register_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRegisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "register_webhook", - argNames: ["webhookUrl"], - ); - - Future unregisterWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_unregister_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kUnregisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "unregister_webhook", - argNames: ["webhookUrl"], - ); - - Future backup({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup", - argNames: [], - ); - - Future backupStatus({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup_status(port_), - parseSuccessData: _wire2api_backup_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupStatusConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup_status", - argNames: [], - ); - - Future parseInvoice({required String invoice, dynamic hint}) { - var arg0 = _platform.api2wire_String(invoice); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_invoice(port_, arg0), - parseSuccessData: _wire2api_ln_invoice, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInvoiceConstMeta, - argValues: [invoice], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_invoice", - argNames: ["invoice"], - ); - - Future parseInput({required String input, dynamic hint}) { - var arg0 = _platform.api2wire_String(input); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_input(port_, arg0), - parseSuccessData: _wire2api_input_type, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInputConstMeta, - argValues: [input], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_input", - argNames: ["input"], - ); - - Future> listPayments({required ListPaymentsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_list_payments_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_payments(port_, arg0), - parseSuccessData: _wire2api_list_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListPaymentsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_payments", - argNames: ["req"], - ); - - Future paymentByHash({required String hash, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_payment_by_hash(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPaymentByHashConstMeta, - argValues: [hash], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "payment_by_hash", - argNames: ["hash"], - ); - - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - var arg1 = _platform.api2wire_String(metadata); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_set_payment_metadata(port_, arg0, arg1), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSetPaymentMetadataConstMeta, - argValues: [hash, metadata], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "set_payment_metadata", - argNames: ["hash", "metadata"], - ); - - Future sendPayment({required SendPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_payment", - argNames: ["req"], - ); - - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_spontaneous_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_spontaneous_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendSpontaneousPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_spontaneous_payment", - argNames: ["req"], - ); - - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_payment(port_, arg0), - parseSuccessData: _wire2api_receive_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceivePaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_payment", - argNames: ["req"], - ); - - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_pay_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_pay(port_, arg0), - parseSuccessData: _wire2api_ln_url_pay_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlPayConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_pay", - argNames: ["req"], - ); - - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_withdraw_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_withdraw(port_, arg0), - parseSuccessData: _wire2api_ln_url_withdraw_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlWithdrawConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_withdraw", - argNames: ["req"], - ); - - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_auth_request_data(reqData); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_auth(port_, arg0), - parseSuccessData: _wire2api_ln_url_callback_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlAuthConstMeta, - argValues: [reqData], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_auth", - argNames: ["reqData"], - ); - - Future reportIssue({required ReportIssueRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_report_issue_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_report_issue(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReportIssueConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "report_issue", - argNames: ["req"], - ); - - Future> fetchFiatRates({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_fiat_rates(port_), - parseSuccessData: _wire2api_list_rate, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchFiatRatesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_fiat_rates", - argNames: [], - ); - - Future> listFiatCurrencies({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_fiat_currencies(port_), - parseSuccessData: _wire2api_list_fiat_currency, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListFiatCurrenciesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_fiat_currencies", - argNames: [], - ); - - Future maxReverseSwapAmount({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_max_reverse_swap_amount(port_), - parseSuccessData: _wire2api_max_reverse_swap_amount_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMaxReverseSwapAmountConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "max_reverse_swap_amount", - argNames: [], - ); - - Future sendOnchain({required SendOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_onchain(port_, arg0), - parseSuccessData: _wire2api_send_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_onchain", - argNames: ["req"], - ); - - Future payOnchain({required PayOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_pay_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_pay_onchain(port_, arg0), - parseSuccessData: _wire2api_pay_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPayOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "pay_onchain", - argNames: ["req"], - ); - - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_onchain(port_, arg0), - parseSuccessData: _wire2api_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceiveOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_onchain", - argNames: ["req"], - ); - - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_buy_bitcoin_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_buy_bitcoin(port_, arg0), - parseSuccessData: _wire2api_buy_bitcoin_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBuyBitcoinConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "buy_bitcoin", - argNames: ["req"], - ); - - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_onchain_funds", - argNames: ["req"], - ); - - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_prepare_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_redeem_onchain_funds", - argNames: ["req"], - ); - - Future> listRefundables({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_refundables(port_), - parseSuccessData: _wire2api_list_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListRefundablesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_refundables", - argNames: [], - ); - - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_refund(port_, arg0), - parseSuccessData: _wire2api_prepare_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_refund", - argNames: ["req"], - ); - - Future refund({required RefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_refund(port_, arg0), - parseSuccessData: _wire2api_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "refund", - argNames: ["req"], - ); - - Future rescanSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_rescan_swaps(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRescanSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "rescan_swaps", - argNames: [], - ); - - Future redeemSwap({required String swapAddress, dynamic hint}) { - var arg0 = _platform.api2wire_String(swapAddress); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_swap(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemSwapConstMeta, - argValues: [swapAddress], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_swap", - argNames: ["swapAddress"], - ); - - Future inProgressSwap({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_swap(port_), - parseSuccessData: _wire2api_opt_box_autoadd_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressSwapConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_swap", - argNames: [], - ); - - Future> inProgressReverseSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_reverse_swaps(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressReverseSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_reverse_swaps", - argNames: [], - ); - - Future claimReverseSwap({required String lockupAddress, dynamic hint}) { - var arg0 = _platform.api2wire_String(lockupAddress); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_claim_reverse_swap(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kClaimReverseSwapConstMeta, - argValues: [lockupAddress], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kClaimReverseSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "claim_reverse_swap", - argNames: ["lockupAddress"], - ); - - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_open_channel_fee_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_open_channel_fee(port_, arg0), - parseSuccessData: _wire2api_open_channel_fee_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOpenChannelFeeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "open_channel_fee", - argNames: ["req"], - ); - - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_reverse_swap_fees_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_reverse_swap_fees(port_, arg0), - parseSuccessData: _wire2api_reverse_swap_pair_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchReverseSwapFeesConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_reverse_swap_fees", - argNames: ["req"], - ); - - Future onchainPaymentLimits({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_onchain_payment_limits(port_), - parseSuccessData: _wire2api_onchain_payment_limits_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOnchainPaymentLimitsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "onchain_payment_limits", - argNames: [], - ); - - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_onchain_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_onchain_payment(port_, arg0), - parseSuccessData: _wire2api_prepare_onchain_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareOnchainPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_onchain_payment", - argNames: ["req"], - ); - - Future> inProgressOnchainPayments({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_onchain_payments(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressOnchainPaymentsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_onchain_payments", - argNames: [], - ); - - Future recommendedFees({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_recommended_fees(port_), - parseSuccessData: _wire2api_recommended_fees, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRecommendedFeesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "recommended_fees", - argNames: [], - ); - - Future executeCommand({required String command, dynamic hint}) { - var arg0 = _platform.api2wire_String(command); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_execute_command(port_, arg0), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kExecuteCommandConstMeta, - argValues: [command], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "execute_command", - argNames: ["command"], - ); - - Future generateDiagnosticData({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_generate_diagnostic_data(port_), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kGenerateDiagnosticDataConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "generate_diagnostic_data", - argNames: [], - ); - - void dispose() { - _platform.dispose(); - } -// Section: wire2api - - FrbAnyhowException _wire2api_FrbAnyhowException(dynamic raw) { - return FrbAnyhowException(raw as String); - } - - String _wire2api_String(dynamic raw) { - return raw as String; - } - - List _wire2api_StringList(dynamic raw) { - return (raw as List).cast(); - } - - AesSuccessActionDataDecrypted _wire2api_aes_success_action_data_decrypted(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return AesSuccessActionDataDecrypted( - description: _wire2api_String(arr[0]), - plaintext: _wire2api_String(arr[1]), - ); - } - - AesSuccessActionDataResult _wire2api_aes_success_action_data_result(dynamic raw) { - switch (raw[0]) { - case 0: - return AesSuccessActionDataResult_Decrypted( - data: _wire2api_box_autoadd_aes_success_action_data_decrypted(raw[1]), - ); - case 1: - return AesSuccessActionDataResult_ErrorStatus( - reason: _wire2api_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BackupFailedData _wire2api_backup_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BackupFailedData( - error: _wire2api_String(arr[0]), - ); - } - - BackupStatus _wire2api_backup_status(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BackupStatus( - backedUp: _wire2api_bool(arr[0]), - lastBackupTime: _wire2api_opt_box_autoadd_u64(arr[1]), - ); - } - - BitcoinAddressData _wire2api_bitcoin_address_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return BitcoinAddressData( - address: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - amountSat: _wire2api_opt_box_autoadd_u64(arr[2]), - label: _wire2api_opt_String(arr[3]), - message: _wire2api_opt_String(arr[4]), - ); - } - - bool _wire2api_bool(dynamic raw) { - return raw as bool; - } - - AesSuccessActionDataDecrypted _wire2api_box_autoadd_aes_success_action_data_decrypted(dynamic raw) { - return _wire2api_aes_success_action_data_decrypted(raw); - } - - AesSuccessActionDataResult _wire2api_box_autoadd_aes_success_action_data_result(dynamic raw) { - return _wire2api_aes_success_action_data_result(raw); - } - - BackupFailedData _wire2api_box_autoadd_backup_failed_data(dynamic raw) { - return _wire2api_backup_failed_data(raw); - } - - BitcoinAddressData _wire2api_box_autoadd_bitcoin_address_data(dynamic raw) { - return _wire2api_bitcoin_address_data(raw); - } - - bool _wire2api_box_autoadd_bool(dynamic raw) { - return raw as bool; - } - - ClosedChannelPaymentDetails _wire2api_box_autoadd_closed_channel_payment_details(dynamic raw) { - return _wire2api_closed_channel_payment_details(raw); - } - - GreenlightCredentials _wire2api_box_autoadd_greenlight_credentials(dynamic raw) { - return _wire2api_greenlight_credentials(raw); - } - - GreenlightDeviceCredentials _wire2api_box_autoadd_greenlight_device_credentials(dynamic raw) { - return _wire2api_greenlight_device_credentials(raw); - } - - GreenlightNodeConfig _wire2api_box_autoadd_greenlight_node_config(dynamic raw) { - return _wire2api_greenlight_node_config(raw); - } - - InvoicePaidDetails _wire2api_box_autoadd_invoice_paid_details(dynamic raw) { - return _wire2api_invoice_paid_details(raw); - } - - LNInvoice _wire2api_box_autoadd_ln_invoice(dynamic raw) { - return _wire2api_ln_invoice(raw); - } - - LnPaymentDetails _wire2api_box_autoadd_ln_payment_details(dynamic raw) { - return _wire2api_ln_payment_details(raw); - } - - LnUrlAuthRequestData _wire2api_box_autoadd_ln_url_auth_request_data(dynamic raw) { - return _wire2api_ln_url_auth_request_data(raw); - } - - LnUrlErrorData _wire2api_box_autoadd_ln_url_error_data(dynamic raw) { - return _wire2api_ln_url_error_data(raw); - } - - LnUrlPayErrorData _wire2api_box_autoadd_ln_url_pay_error_data(dynamic raw) { - return _wire2api_ln_url_pay_error_data(raw); - } - - LnUrlPayRequestData _wire2api_box_autoadd_ln_url_pay_request_data(dynamic raw) { - return _wire2api_ln_url_pay_request_data(raw); - } - - LnUrlPaySuccessData _wire2api_box_autoadd_ln_url_pay_success_data(dynamic raw) { - return _wire2api_ln_url_pay_success_data(raw); - } - - LnUrlWithdrawRequestData _wire2api_box_autoadd_ln_url_withdraw_request_data(dynamic raw) { - return _wire2api_ln_url_withdraw_request_data(raw); - } - - LnUrlWithdrawSuccessData _wire2api_box_autoadd_ln_url_withdraw_success_data(dynamic raw) { - return _wire2api_ln_url_withdraw_success_data(raw); - } - - LspInformation _wire2api_box_autoadd_lsp_information(dynamic raw) { - return _wire2api_lsp_information(raw); - } - - MessageSuccessActionData _wire2api_box_autoadd_message_success_action_data(dynamic raw) { - return _wire2api_message_success_action_data(raw); - } - - NodeCredentials _wire2api_box_autoadd_node_credentials(dynamic raw) { - return _wire2api_node_credentials(raw); - } - - OpeningFeeParams _wire2api_box_autoadd_opening_fee_params(dynamic raw) { - return _wire2api_opening_fee_params(raw); - } - - Payment _wire2api_box_autoadd_payment(dynamic raw) { - return _wire2api_payment(raw); - } - - PaymentFailedData _wire2api_box_autoadd_payment_failed_data(dynamic raw) { - return _wire2api_payment_failed_data(raw); - } - - ReverseSwapInfo _wire2api_box_autoadd_reverse_swap_info(dynamic raw) { - return _wire2api_reverse_swap_info(raw); - } - - SuccessActionProcessed _wire2api_box_autoadd_success_action_processed(dynamic raw) { - return _wire2api_success_action_processed(raw); - } - - SwapInfo _wire2api_box_autoadd_swap_info(dynamic raw) { - return _wire2api_swap_info(raw); - } - - Symbol _wire2api_box_autoadd_symbol(dynamic raw) { - return _wire2api_symbol(raw); - } - - int _wire2api_box_autoadd_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_box_autoadd_u64(dynamic raw) { - return _wire2api_u64(raw); - } - - UrlSuccessActionData _wire2api_box_autoadd_url_success_action_data(dynamic raw) { - return _wire2api_url_success_action_data(raw); - } - - BreezEvent _wire2api_breez_event(dynamic raw) { - switch (raw[0]) { - case 0: - return BreezEvent_NewBlock( - block: _wire2api_u32(raw[1]), - ); - case 1: - return BreezEvent_InvoicePaid( - details: _wire2api_box_autoadd_invoice_paid_details(raw[1]), - ); - case 2: - return BreezEvent_Synced(); - case 3: - return BreezEvent_PaymentSucceed( - details: _wire2api_box_autoadd_payment(raw[1]), - ); - case 4: - return BreezEvent_PaymentFailed( - details: _wire2api_box_autoadd_payment_failed_data(raw[1]), - ); - case 5: - return BreezEvent_BackupStarted(); - case 6: - return BreezEvent_BackupSucceeded(); - case 7: - return BreezEvent_BackupFailed( - details: _wire2api_box_autoadd_backup_failed_data(raw[1]), - ); - case 8: - return BreezEvent_ReverseSwapUpdated( - details: _wire2api_box_autoadd_reverse_swap_info(raw[1]), - ); - case 9: - return BreezEvent_SwapUpdated( - details: _wire2api_box_autoadd_swap_info(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BuyBitcoinResponse _wire2api_buy_bitcoin_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BuyBitcoinResponse( - url: _wire2api_String(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - ); - } - - ChannelState _wire2api_channel_state(dynamic raw) { - return ChannelState.values[raw as int]; - } - - CheckMessageResponse _wire2api_check_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return CheckMessageResponse( - isValid: _wire2api_bool(arr[0]), - ); - } - - ClosedChannelPaymentDetails _wire2api_closed_channel_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return ClosedChannelPaymentDetails( - state: _wire2api_channel_state(arr[0]), - fundingTxid: _wire2api_String(arr[1]), - shortChannelId: _wire2api_opt_String(arr[2]), - closingTxid: _wire2api_opt_String(arr[3]), - ); - } - - Config _wire2api_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return Config( - breezserver: _wire2api_String(arr[0]), - chainnotifierUrl: _wire2api_String(arr[1]), - mempoolspaceUrl: _wire2api_opt_String(arr[2]), - workingDir: _wire2api_String(arr[3]), - network: _wire2api_network(arr[4]), - paymentTimeoutSec: _wire2api_u32(arr[5]), - defaultLspId: _wire2api_opt_String(arr[6]), - apiKey: _wire2api_opt_String(arr[7]), - maxfeePercent: _wire2api_f64(arr[8]), - exemptfeeMsat: _wire2api_u64(arr[9]), - nodeConfig: _wire2api_node_config(arr[10]), - ); - } - - CurrencyInfo _wire2api_currency_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return CurrencyInfo( - name: _wire2api_String(arr[0]), - fractionSize: _wire2api_u32(arr[1]), - spacing: _wire2api_opt_box_autoadd_u32(arr[2]), - symbol: _wire2api_opt_box_autoadd_symbol(arr[3]), - uniqSymbol: _wire2api_opt_box_autoadd_symbol(arr[4]), - localizedName: _wire2api_list_localized_name(arr[5]), - localeOverrides: _wire2api_list_locale_overrides(arr[6]), - ); - } - - double _wire2api_f64(dynamic raw) { - return raw as double; - } - - FiatCurrency _wire2api_fiat_currency(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return FiatCurrency( - id: _wire2api_String(arr[0]), - info: _wire2api_currency_info(arr[1]), - ); - } - - GreenlightCredentials _wire2api_greenlight_credentials(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightCredentials( - developerKey: _wire2api_uint_8_list(arr[0]), - developerCert: _wire2api_uint_8_list(arr[1]), - ); - } - - GreenlightDeviceCredentials _wire2api_greenlight_device_credentials(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return GreenlightDeviceCredentials( - device: _wire2api_uint_8_list(arr[0]), - ); - } - - GreenlightNodeConfig _wire2api_greenlight_node_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightNodeConfig( - partnerCredentials: _wire2api_opt_box_autoadd_greenlight_credentials(arr[0]), - inviteCode: _wire2api_opt_String(arr[1]), - ); - } - - HealthCheckStatus _wire2api_health_check_status(dynamic raw) { - return HealthCheckStatus.values[raw as int]; - } - - int _wire2api_i32(dynamic raw) { - return raw as int; - } - - int _wire2api_i64(dynamic raw) { - return castInt(raw); - } - - InputType _wire2api_input_type(dynamic raw) { - switch (raw[0]) { - case 0: - return InputType_BitcoinAddress( - address: _wire2api_box_autoadd_bitcoin_address_data(raw[1]), - ); - case 1: - return InputType_Bolt11( - invoice: _wire2api_box_autoadd_ln_invoice(raw[1]), - ); - case 2: - return InputType_NodeId( - nodeId: _wire2api_String(raw[1]), - ); - case 3: - return InputType_Url( - url: _wire2api_String(raw[1]), - ); - case 4: - return InputType_LnUrlPay( - data: _wire2api_box_autoadd_ln_url_pay_request_data(raw[1]), - ); - case 5: - return InputType_LnUrlWithdraw( - data: _wire2api_box_autoadd_ln_url_withdraw_request_data(raw[1]), - ); - case 6: - return InputType_LnUrlAuth( - data: _wire2api_box_autoadd_ln_url_auth_request_data(raw[1]), - ); - case 7: - return InputType_LnUrlError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - InvoicePaidDetails _wire2api_invoice_paid_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return InvoicePaidDetails( - paymentHash: _wire2api_String(arr[0]), - bolt11: _wire2api_String(arr[1]), - payment: _wire2api_opt_box_autoadd_payment(arr[2]), - ); - } - - List _wire2api_list_fiat_currency(dynamic raw) { - return (raw as List).map(_wire2api_fiat_currency).toList(); - } - - List _wire2api_list_locale_overrides(dynamic raw) { - return (raw as List).map(_wire2api_locale_overrides).toList(); - } - - List _wire2api_list_localized_name(dynamic raw) { - return (raw as List).map(_wire2api_localized_name).toList(); - } - - List _wire2api_list_lsp_information(dynamic raw) { - return (raw as List).map(_wire2api_lsp_information).toList(); - } - - List _wire2api_list_opening_fee_params(dynamic raw) { - return (raw as List).map(_wire2api_opening_fee_params).toList(); - } - - List _wire2api_list_payment(dynamic raw) { - return (raw as List).map(_wire2api_payment).toList(); - } - - List _wire2api_list_rate(dynamic raw) { - return (raw as List).map(_wire2api_rate).toList(); - } - - List _wire2api_list_reverse_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_reverse_swap_info).toList(); - } - - List _wire2api_list_route_hint(dynamic raw) { - return (raw as List).map(_wire2api_route_hint).toList(); - } - - List _wire2api_list_route_hint_hop(dynamic raw) { - return (raw as List).map(_wire2api_route_hint_hop).toList(); - } - - List _wire2api_list_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_swap_info).toList(); - } - - List _wire2api_list_unspent_transaction_output(dynamic raw) { - return (raw as List).map(_wire2api_unspent_transaction_output).toList(); - } - - LNInvoice _wire2api_ln_invoice(dynamic raw) { - final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); - return LNInvoice( - bolt11: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - payeePubkey: _wire2api_String(arr[2]), - paymentHash: _wire2api_String(arr[3]), - description: _wire2api_opt_String(arr[4]), - descriptionHash: _wire2api_opt_String(arr[5]), - amountMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - timestamp: _wire2api_u64(arr[7]), - expiry: _wire2api_u64(arr[8]), - routingHints: _wire2api_list_route_hint(arr[9]), - paymentSecret: _wire2api_uint_8_list(arr[10]), - minFinalCltvExpiryDelta: _wire2api_u64(arr[11]), - ); - } - - LnPaymentDetails _wire2api_ln_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 16) throw Exception('unexpected arr length: expect 16 but see ${arr.length}'); - return LnPaymentDetails( - paymentHash: _wire2api_String(arr[0]), - label: _wire2api_String(arr[1]), - destinationPubkey: _wire2api_String(arr[2]), - paymentPreimage: _wire2api_String(arr[3]), - keysend: _wire2api_bool(arr[4]), - bolt11: _wire2api_String(arr[5]), - openChannelBolt11: _wire2api_opt_String(arr[6]), - lnurlSuccessAction: _wire2api_opt_box_autoadd_success_action_processed(arr[7]), - lnurlPayDomain: _wire2api_opt_String(arr[8]), - lnurlPayComment: _wire2api_opt_String(arr[9]), - lnAddress: _wire2api_opt_String(arr[10]), - lnurlMetadata: _wire2api_opt_String(arr[11]), - lnurlWithdrawEndpoint: _wire2api_opt_String(arr[12]), - swapInfo: _wire2api_opt_box_autoadd_swap_info(arr[13]), - reverseSwapInfo: _wire2api_opt_box_autoadd_reverse_swap_info(arr[14]), - pendingExpirationBlock: _wire2api_opt_box_autoadd_u32(arr[15]), - ); - } - - LnUrlAuthRequestData _wire2api_ln_url_auth_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return LnUrlAuthRequestData( - k1: _wire2api_String(arr[0]), - action: _wire2api_opt_String(arr[1]), - domain: _wire2api_String(arr[2]), - url: _wire2api_String(arr[3]), - ); - } - - LnUrlCallbackStatus _wire2api_ln_url_callback_status(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlCallbackStatus_Ok(); - case 1: - return LnUrlCallbackStatus_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlErrorData _wire2api_ln_url_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlErrorData( - reason: _wire2api_String(arr[0]), - ); - } - - LnUrlPayErrorData _wire2api_ln_url_pay_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPayErrorData( - paymentHash: _wire2api_String(arr[0]), - reason: _wire2api_String(arr[1]), - ); - } - - LnUrlPayRequestData _wire2api_ln_url_pay_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 9) throw Exception('unexpected arr length: expect 9 but see ${arr.length}'); - return LnUrlPayRequestData( - callback: _wire2api_String(arr[0]), - minSendable: _wire2api_u64(arr[1]), - maxSendable: _wire2api_u64(arr[2]), - metadataStr: _wire2api_String(arr[3]), - commentAllowed: _wire2api_u16(arr[4]), - domain: _wire2api_String(arr[5]), - allowsNostr: _wire2api_bool(arr[6]), - nostrPubkey: _wire2api_opt_String(arr[7]), - lnAddress: _wire2api_opt_String(arr[8]), - ); - } - - LnUrlPayResult _wire2api_ln_url_pay_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlPayResult_EndpointSuccess( - data: _wire2api_box_autoadd_ln_url_pay_success_data(raw[1]), - ); - case 1: - return LnUrlPayResult_EndpointError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - case 2: - return LnUrlPayResult_PayError( - data: _wire2api_box_autoadd_ln_url_pay_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlPaySuccessData _wire2api_ln_url_pay_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPaySuccessData( - payment: _wire2api_payment(arr[0]), - successAction: _wire2api_opt_box_autoadd_success_action_processed(arr[1]), - ); - } - - LnUrlWithdrawRequestData _wire2api_ln_url_withdraw_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return LnUrlWithdrawRequestData( - callback: _wire2api_String(arr[0]), - k1: _wire2api_String(arr[1]), - defaultDescription: _wire2api_String(arr[2]), - minWithdrawable: _wire2api_u64(arr[3]), - maxWithdrawable: _wire2api_u64(arr[4]), - ); - } - - LnUrlWithdrawResult _wire2api_ln_url_withdraw_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlWithdrawResult_Ok( - data: _wire2api_box_autoadd_ln_url_withdraw_success_data(raw[1]), - ); - case 1: - return LnUrlWithdrawResult_Timeout( - data: _wire2api_box_autoadd_ln_url_withdraw_success_data(raw[1]), - ); - case 2: - return LnUrlWithdrawResult_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlWithdrawSuccessData _wire2api_ln_url_withdraw_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlWithdrawSuccessData( - invoice: _wire2api_ln_invoice(arr[0]), - ); - } - - LocaleOverrides _wire2api_locale_overrides(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return LocaleOverrides( - locale: _wire2api_String(arr[0]), - spacing: _wire2api_opt_box_autoadd_u32(arr[1]), - symbol: _wire2api_symbol(arr[2]), - ); - } - - LocalizedName _wire2api_localized_name(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LocalizedName( - locale: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - ); - } - - LogEntry _wire2api_log_entry(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LogEntry( - line: _wire2api_String(arr[0]), - level: _wire2api_String(arr[1]), - ); - } - - LspInformation _wire2api_lsp_information(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return LspInformation( - id: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - widgetUrl: _wire2api_String(arr[2]), - pubkey: _wire2api_String(arr[3]), - host: _wire2api_String(arr[4]), - baseFeeMsat: _wire2api_i64(arr[5]), - feeRate: _wire2api_f64(arr[6]), - timeLockDelta: _wire2api_u32(arr[7]), - minHtlcMsat: _wire2api_i64(arr[8]), - lspPubkey: _wire2api_uint_8_list(arr[9]), - openingFeeParamsList: _wire2api_opening_fee_params_menu(arr[10]), - ); - } - - MaxReverseSwapAmountResponse _wire2api_max_reverse_swap_amount_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MaxReverseSwapAmountResponse( - totalSat: _wire2api_u64(arr[0]), - ); - } - - MessageSuccessActionData _wire2api_message_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MessageSuccessActionData( - message: _wire2api_String(arr[0]), - ); - } - - Network _wire2api_network(dynamic raw) { - return Network.values[raw as int]; - } - - NodeConfig _wire2api_node_config(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeConfig_Greenlight( - config: _wire2api_box_autoadd_greenlight_node_config(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeCredentials _wire2api_node_credentials(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeCredentials_Greenlight( - credentials: _wire2api_box_autoadd_greenlight_device_credentials(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeState _wire2api_node_state(dynamic raw) { - final arr = raw as List; - if (arr.length != 13) throw Exception('unexpected arr length: expect 13 but see ${arr.length}'); - return NodeState( - id: _wire2api_String(arr[0]), - blockHeight: _wire2api_u32(arr[1]), - channelsBalanceMsat: _wire2api_u64(arr[2]), - onchainBalanceMsat: _wire2api_u64(arr[3]), - pendingOnchainBalanceMsat: _wire2api_u64(arr[4]), - utxos: _wire2api_list_unspent_transaction_output(arr[5]), - maxPayableMsat: _wire2api_u64(arr[6]), - maxReceivableMsat: _wire2api_u64(arr[7]), - maxSinglePaymentAmountMsat: _wire2api_u64(arr[8]), - maxChanReserveMsats: _wire2api_u64(arr[9]), - connectedPeers: _wire2api_StringList(arr[10]), - maxReceivableSinglePaymentAmountMsat: _wire2api_u64(arr[11]), - totalInboundLiquidityMsats: _wire2api_u64(arr[12]), - ); - } - - OnchainPaymentLimitsResponse _wire2api_onchain_payment_limits_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return OnchainPaymentLimitsResponse( - minSat: _wire2api_u64(arr[0]), - maxSat: _wire2api_u64(arr[1]), - maxPayableSat: _wire2api_u64(arr[2]), - ); - } - - OpenChannelFeeResponse _wire2api_open_channel_fee_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OpenChannelFeeResponse( - feeMsat: _wire2api_opt_box_autoadd_u64(arr[0]), - feeParams: _wire2api_opening_fee_params(arr[1]), - ); - } - - OpeningFeeParams _wire2api_opening_fee_params(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return OpeningFeeParams( - minMsat: _wire2api_u64(arr[0]), - proportional: _wire2api_u32(arr[1]), - validUntil: _wire2api_String(arr[2]), - maxIdleTime: _wire2api_u32(arr[3]), - maxClientToSelfDelay: _wire2api_u32(arr[4]), - promise: _wire2api_String(arr[5]), - ); - } - - OpeningFeeParamsMenu _wire2api_opening_fee_params_menu(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return OpeningFeeParamsMenu( - values: _wire2api_list_opening_fee_params(arr[0]), - ); - } - - String? _wire2api_opt_String(dynamic raw) { - return raw == null ? null : _wire2api_String(raw); - } - - List? _wire2api_opt_StringList(dynamic raw) { - return raw == null ? null : _wire2api_StringList(raw); - } - - bool? _wire2api_opt_box_autoadd_bool(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_bool(raw); - } - - GreenlightCredentials? _wire2api_opt_box_autoadd_greenlight_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_greenlight_credentials(raw); - } - - LNInvoice? _wire2api_opt_box_autoadd_ln_invoice(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_ln_invoice(raw); - } - - LspInformation? _wire2api_opt_box_autoadd_lsp_information(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_lsp_information(raw); - } - - NodeCredentials? _wire2api_opt_box_autoadd_node_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_node_credentials(raw); - } - - OpeningFeeParams? _wire2api_opt_box_autoadd_opening_fee_params(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_opening_fee_params(raw); - } - - Payment? _wire2api_opt_box_autoadd_payment(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_payment(raw); - } - - ReverseSwapInfo? _wire2api_opt_box_autoadd_reverse_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_reverse_swap_info(raw); - } - - SuccessActionProcessed? _wire2api_opt_box_autoadd_success_action_processed(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_success_action_processed(raw); - } - - SwapInfo? _wire2api_opt_box_autoadd_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_swap_info(raw); - } - - Symbol? _wire2api_opt_box_autoadd_symbol(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_symbol(raw); - } - - int? _wire2api_opt_box_autoadd_u32(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u32(raw); - } - - int? _wire2api_opt_box_autoadd_u64(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u64(raw); - } - - PayOnchainResponse _wire2api_pay_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return PayOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - Payment _wire2api_payment(dynamic raw) { - final arr = raw as List; - if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); - return Payment( - id: _wire2api_String(arr[0]), - paymentType: _wire2api_payment_type(arr[1]), - paymentTime: _wire2api_i64(arr[2]), - amountMsat: _wire2api_u64(arr[3]), - feeMsat: _wire2api_u64(arr[4]), - status: _wire2api_payment_status(arr[5]), - error: _wire2api_opt_String(arr[6]), - description: _wire2api_opt_String(arr[7]), - details: _wire2api_payment_details(arr[8]), - metadata: _wire2api_opt_String(arr[9]), - ); - } - - PaymentDetails _wire2api_payment_details(dynamic raw) { - switch (raw[0]) { - case 0: - return PaymentDetails_Ln( - data: _wire2api_box_autoadd_ln_payment_details(raw[1]), - ); - case 1: - return PaymentDetails_ClosedChannel( - data: _wire2api_box_autoadd_closed_channel_payment_details(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - PaymentFailedData _wire2api_payment_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return PaymentFailedData( - error: _wire2api_String(arr[0]), - nodeId: _wire2api_String(arr[1]), - invoice: _wire2api_opt_box_autoadd_ln_invoice(arr[2]), - label: _wire2api_opt_String(arr[3]), - ); - } - - PaymentStatus _wire2api_payment_status(dynamic raw) { - return PaymentStatus.values[raw as int]; - } - - PaymentType _wire2api_payment_type(dynamic raw) { - return PaymentType.values[raw as int]; - } - - PrepareOnchainPaymentResponse _wire2api_prepare_onchain_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return PrepareOnchainPaymentResponse( - feesHash: _wire2api_String(arr[0]), - feesPercentage: _wire2api_f64(arr[1]), - feesLockup: _wire2api_u64(arr[2]), - feesClaim: _wire2api_u64(arr[3]), - senderAmountSat: _wire2api_u64(arr[4]), - recipientAmountSat: _wire2api_u64(arr[5]), - totalFees: _wire2api_u64(arr[6]), - ); - } - - PrepareRedeemOnchainFundsResponse _wire2api_prepare_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRedeemOnchainFundsResponse( - txWeight: _wire2api_u64(arr[0]), - txFeeSat: _wire2api_u64(arr[1]), - ); - } - - PrepareRefundResponse _wire2api_prepare_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRefundResponse( - refundTxWeight: _wire2api_u32(arr[0]), - refundTxFeeSat: _wire2api_u64(arr[1]), - ); - } - - Rate _wire2api_rate(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return Rate( - coin: _wire2api_String(arr[0]), - value: _wire2api_f64(arr[1]), - ); - } - - ReceivePaymentResponse _wire2api_receive_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return ReceivePaymentResponse( - lnInvoice: _wire2api_ln_invoice(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - openingFeeMsat: _wire2api_opt_box_autoadd_u64(arr[2]), - ); - } - - RecommendedFees _wire2api_recommended_fees(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return RecommendedFees( - fastestFee: _wire2api_u64(arr[0]), - halfHourFee: _wire2api_u64(arr[1]), - hourFee: _wire2api_u64(arr[2]), - economyFee: _wire2api_u64(arr[3]), - minimumFee: _wire2api_u64(arr[4]), - ); - } - - RedeemOnchainFundsResponse _wire2api_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RedeemOnchainFundsResponse( - txid: _wire2api_uint_8_list(arr[0]), - ); - } - - RefundResponse _wire2api_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RefundResponse( - refundTxId: _wire2api_String(arr[0]), - ); - } - - ReverseSwapInfo _wire2api_reverse_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return ReverseSwapInfo( - id: _wire2api_String(arr[0]), - claimPubkey: _wire2api_String(arr[1]), - lockupTxid: _wire2api_opt_String(arr[2]), - claimTxid: _wire2api_opt_String(arr[3]), - onchainAmountSat: _wire2api_u64(arr[4]), - status: _wire2api_reverse_swap_status(arr[5]), - ); - } - - ReverseSwapPairInfo _wire2api_reverse_swap_pair_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return ReverseSwapPairInfo( - min: _wire2api_u64(arr[0]), - max: _wire2api_u64(arr[1]), - feesHash: _wire2api_String(arr[2]), - feesPercentage: _wire2api_f64(arr[3]), - feesLockup: _wire2api_u64(arr[4]), - feesClaim: _wire2api_u64(arr[5]), - totalFees: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - ReverseSwapStatus _wire2api_reverse_swap_status(dynamic raw) { - return ReverseSwapStatus.values[raw as int]; - } - - RouteHint _wire2api_route_hint(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RouteHint( - hops: _wire2api_list_route_hint_hop(arr[0]), - ); - } - - RouteHintHop _wire2api_route_hint_hop(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return RouteHintHop( - srcNodeId: _wire2api_String(arr[0]), - shortChannelId: _wire2api_String(arr[1]), - feesBaseMsat: _wire2api_u32(arr[2]), - feesProportionalMillionths: _wire2api_u32(arr[3]), - cltvExpiryDelta: _wire2api_u64(arr[4]), - htlcMinimumMsat: _wire2api_opt_box_autoadd_u64(arr[5]), - htlcMaximumMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - SendOnchainResponse _wire2api_send_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - SendPaymentResponse _wire2api_send_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendPaymentResponse( - payment: _wire2api_payment(arr[0]), - ); - } - - ServiceHealthCheckResponse _wire2api_service_health_check_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return ServiceHealthCheckResponse( - status: _wire2api_health_check_status(arr[0]), - ); - } - - SignMessageResponse _wire2api_sign_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SignMessageResponse( - signature: _wire2api_String(arr[0]), - ); - } - - StaticBackupResponse _wire2api_static_backup_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return StaticBackupResponse( - backup: _wire2api_opt_StringList(arr[0]), - ); - } - - SuccessActionProcessed _wire2api_success_action_processed(dynamic raw) { - switch (raw[0]) { - case 0: - return SuccessActionProcessed_Aes( - result: _wire2api_box_autoadd_aes_success_action_data_result(raw[1]), - ); - case 1: - return SuccessActionProcessed_Message( - data: _wire2api_box_autoadd_message_success_action_data(raw[1]), - ); - case 2: - return SuccessActionProcessed_Url( - data: _wire2api_box_autoadd_url_success_action_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - SwapInfo _wire2api_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 24) throw Exception('unexpected arr length: expect 24 but see ${arr.length}'); - return SwapInfo( - bitcoinAddress: _wire2api_String(arr[0]), - createdAt: _wire2api_i64(arr[1]), - lockHeight: _wire2api_i64(arr[2]), - paymentHash: _wire2api_uint_8_list(arr[3]), - preimage: _wire2api_uint_8_list(arr[4]), - privateKey: _wire2api_uint_8_list(arr[5]), - publicKey: _wire2api_uint_8_list(arr[6]), - swapperPublicKey: _wire2api_uint_8_list(arr[7]), - script: _wire2api_uint_8_list(arr[8]), - bolt11: _wire2api_opt_String(arr[9]), - paidMsat: _wire2api_u64(arr[10]), - totalIncomingTxs: _wire2api_u64(arr[11]), - confirmedSats: _wire2api_u64(arr[12]), - unconfirmedSats: _wire2api_u64(arr[13]), - status: _wire2api_swap_status(arr[14]), - refundTxIds: _wire2api_StringList(arr[15]), - unconfirmedTxIds: _wire2api_StringList(arr[16]), - confirmedTxIds: _wire2api_StringList(arr[17]), - minAllowedDeposit: _wire2api_i64(arr[18]), - maxAllowedDeposit: _wire2api_i64(arr[19]), - maxSwapperPayable: _wire2api_i64(arr[20]), - lastRedeemError: _wire2api_opt_String(arr[21]), - channelOpeningFees: _wire2api_opt_box_autoadd_opening_fee_params(arr[22]), - confirmedAt: _wire2api_opt_box_autoadd_u32(arr[23]), - ); - } - - SwapStatus _wire2api_swap_status(dynamic raw) { - return SwapStatus.values[raw as int]; - } - - Symbol _wire2api_symbol(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return Symbol( - grapheme: _wire2api_opt_String(arr[0]), - template: _wire2api_opt_String(arr[1]), - rtl: _wire2api_opt_box_autoadd_bool(arr[2]), - position: _wire2api_opt_box_autoadd_u32(arr[3]), - ); - } - - int _wire2api_u16(dynamic raw) { - return raw as int; - } - - int _wire2api_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_u64(dynamic raw) { - return castInt(raw); - } - - int _wire2api_u8(dynamic raw) { - return raw as int; - } - - Uint8List _wire2api_uint_8_list(dynamic raw) { - return raw as Uint8List; - } - - void _wire2api_unit(dynamic raw) { - return; - } - - UnspentTransactionOutput _wire2api_unspent_transaction_output(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return UnspentTransactionOutput( - txid: _wire2api_uint_8_list(arr[0]), - outnum: _wire2api_u32(arr[1]), - amountMillisatoshi: _wire2api_u64(arr[2]), - address: _wire2api_String(arr[3]), - reserved: _wire2api_bool(arr[4]), - ); - } - - UrlSuccessActionData _wire2api_url_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return UrlSuccessActionData( - description: _wire2api_String(arr[0]), - url: _wire2api_String(arr[1]), - ); - } -} - -// Section: api2wire - -@protected -bool api2wire_bool(bool raw) { - return raw; -} - -@protected -int api2wire_buy_bitcoin_provider(BuyBitcoinProvider raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_environment_type(EnvironmentType raw) { - return api2wire_i32(raw.index); -} - -@protected -double api2wire_f64(double raw) { - return raw; -} - -@protected -int api2wire_i32(int raw) { - return raw; -} - -@protected -int api2wire_network(Network raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_payment_type_filter(PaymentTypeFilter raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_swap_amount_type(SwapAmountType raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_u16(int raw) { - return raw; -} - -@protected -int api2wire_u32(int raw) { - return raw; -} - -@protected -int api2wire_u8(int raw) { - return raw; -} - -// Section: finalizer - -class BreezSdkCorePlatform extends FlutterRustBridgeBase { - BreezSdkCorePlatform(ffi.DynamicLibrary dylib) : super(BreezSdkCoreWire(dylib)); - -// Section: api2wire - - @protected - ffi.Pointer api2wire_String(String raw) { - return api2wire_uint_8_list(utf8.encoder.convert(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_bool(bool raw) { - return inner.new_box_autoadd_bool_0(api2wire_bool(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest raw) { - final ptr = inner.new_box_autoadd_buy_bitcoin_request_0(); - _api_fill_to_wire_buy_bitcoin_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_check_message_request(CheckMessageRequest raw) { - final ptr = inner.new_box_autoadd_check_message_request_0(); - _api_fill_to_wire_check_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_configure_node_request( - ConfigureNodeRequest raw) { - final ptr = inner.new_box_autoadd_configure_node_request_0(); - _api_fill_to_wire_configure_node_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_connect_request(ConnectRequest raw) { - final ptr = inner.new_box_autoadd_connect_request_0(); - _api_fill_to_wire_connect_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_credentials( - GreenlightCredentials raw) { - final ptr = inner.new_box_autoadd_greenlight_credentials_0(); - _api_fill_to_wire_greenlight_credentials(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig raw) { - final ptr = inner.new_box_autoadd_greenlight_node_config_0(); - _api_fill_to_wire_greenlight_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_i64(int raw) { - return inner.new_box_autoadd_i64_0(api2wire_i64(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_list_payments_request(ListPaymentsRequest raw) { - final ptr = inner.new_box_autoadd_list_payments_request_0(); - _api_fill_to_wire_list_payments_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData raw) { - final ptr = inner.new_box_autoadd_ln_url_auth_request_data_0(); - _api_fill_to_wire_ln_url_auth_request_data(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_pay_request_0(); - _api_fill_to_wire_ln_url_pay_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_withdraw_request_0(); - _api_fill_to_wire_ln_url_withdraw_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_node_config(NodeConfig raw) { - final ptr = inner.new_box_autoadd_node_config_0(); - _api_fill_to_wire_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest raw) { - final ptr = inner.new_box_autoadd_open_channel_fee_request_0(); - _api_fill_to_wire_open_channel_fee_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_opening_fee_params(OpeningFeeParams raw) { - final ptr = inner.new_box_autoadd_opening_fee_params_0(); - _api_fill_to_wire_opening_fee_params(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_pay_onchain_request(PayOnchainRequest raw) { - final ptr = inner.new_box_autoadd_pay_onchain_request_0(); - _api_fill_to_wire_pay_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest raw) { - final ptr = inner.new_box_autoadd_prepare_onchain_payment_request_0(); - _api_fill_to_wire_prepare_onchain_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - api2wire_box_autoadd_prepare_redeem_onchain_funds_request(PrepareRedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - _api_fill_to_wire_prepare_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest raw) { - final ptr = inner.new_box_autoadd_prepare_refund_request_0(); - _api_fill_to_wire_prepare_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest raw) { - final ptr = inner.new_box_autoadd_receive_onchain_request_0(); - _api_fill_to_wire_receive_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest raw) { - final ptr = inner.new_box_autoadd_receive_payment_request_0(); - _api_fill_to_wire_receive_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_redeem_onchain_funds_request_0(); - _api_fill_to_wire_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_refund_request(RefundRequest raw) { - final ptr = inner.new_box_autoadd_refund_request_0(); - _api_fill_to_wire_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_issue_request(ReportIssueRequest raw) { - final ptr = inner.new_box_autoadd_report_issue_request_0(); - _api_fill_to_wire_report_issue_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails raw) { - final ptr = inner.new_box_autoadd_report_payment_failure_details_0(); - _api_fill_to_wire_report_payment_failure_details(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest raw) { - final ptr = inner.new_box_autoadd_reverse_swap_fees_request_0(); - _api_fill_to_wire_reverse_swap_fees_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_onchain_request(SendOnchainRequest raw) { - final ptr = inner.new_box_autoadd_send_onchain_request_0(); - _api_fill_to_wire_send_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_payment_request(SendPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_payment_request_0(); - _api_fill_to_wire_send_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_spontaneous_payment_request_0(); - _api_fill_to_wire_send_spontaneous_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_sign_message_request(SignMessageRequest raw) { - final ptr = inner.new_box_autoadd_sign_message_request_0(); - _api_fill_to_wire_sign_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_static_backup_request(StaticBackupRequest raw) { - final ptr = inner.new_box_autoadd_static_backup_request_0(); - _api_fill_to_wire_static_backup_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_u32(int raw) { - return inner.new_box_autoadd_u32_0(api2wire_u32(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_u64(int raw) { - return inner.new_box_autoadd_u64_0(api2wire_u64(raw)); - } - - @protected - int api2wire_i64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_list_metadata_filter(List raw) { - final ans = inner.new_list_metadata_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_metadata_filter(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_payment_type_filter(List raw) { - final ans = inner.new_list_payment_type_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - ans.ref.ptr[i] = api2wire_payment_type_filter(raw[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_tlv_entry(List raw) { - final ans = inner.new_list_tlv_entry_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_tlv_entry(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_opt_String(String? raw) { - return raw == null ? ffi.nullptr : api2wire_String(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_bool(bool? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_bool(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_greenlight_credentials( - GreenlightCredentials? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_greenlight_credentials(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_i64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_i64(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_opening_fee_params(OpeningFeeParams? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_opening_fee_params(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u32(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u32(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u64(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_metadata_filter(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_metadata_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_payment_type_filter( - List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_payment_type_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_tlv_entry(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_tlv_entry(raw); - } - - @protected - ffi.Pointer api2wire_opt_uint_8_list(Uint8List? raw) { - return raw == null ? ffi.nullptr : api2wire_uint_8_list(raw); - } - - @protected - int api2wire_u64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_uint_8_list(Uint8List raw) { - final ans = inner.new_uint_8_list_0(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } -// Section: finalizer - -// Section: api_fill_to_wire - - void _api_fill_to_wire_box_autoadd_buy_bitcoin_request( - BuyBitcoinRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_buy_bitcoin_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_check_message_request( - CheckMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_check_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_configure_node_request( - ConfigureNodeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_configure_node_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_connect_request( - ConnectRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_connect_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_credentials( - GreenlightCredentials apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_credentials(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_list_payments_request( - ListPaymentsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_list_payments_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_auth_request_data(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_pay_request( - LnUrlPayRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_pay_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_withdraw_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_node_config(NodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_open_channel_fee_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_opening_fee_params( - OpeningFeeParams apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_opening_fee_params(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_pay_onchain_request( - PayOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_pay_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_onchain_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_refund_request( - RefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_issue_request( - ReportIssueRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_issue_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_payment_failure_details(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_reverse_swap_fees_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_onchain_request( - SendOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_payment_request( - SendPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_spontaneous_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_sign_message_request( - SignMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_sign_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_static_backup_request( - StaticBackupRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_static_backup_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_buy_bitcoin_request(BuyBitcoinRequest apiObj, wire_BuyBitcoinRequest wireObj) { - wireObj.provider = api2wire_buy_bitcoin_provider(apiObj.provider); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - wireObj.redirect_url = api2wire_opt_String(apiObj.redirectUrl); - } - - void _api_fill_to_wire_check_message_request(CheckMessageRequest apiObj, wire_CheckMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - wireObj.pubkey = api2wire_String(apiObj.pubkey); - wireObj.signature = api2wire_String(apiObj.signature); - } - - void _api_fill_to_wire_config(Config apiObj, wire_Config wireObj) { - wireObj.breezserver = api2wire_String(apiObj.breezserver); - wireObj.chainnotifier_url = api2wire_String(apiObj.chainnotifierUrl); - wireObj.mempoolspace_url = api2wire_opt_String(apiObj.mempoolspaceUrl); - wireObj.working_dir = api2wire_String(apiObj.workingDir); - wireObj.network = api2wire_network(apiObj.network); - wireObj.payment_timeout_sec = api2wire_u32(apiObj.paymentTimeoutSec); - wireObj.default_lsp_id = api2wire_opt_String(apiObj.defaultLspId); - wireObj.api_key = api2wire_opt_String(apiObj.apiKey); - wireObj.maxfee_percent = api2wire_f64(apiObj.maxfeePercent); - wireObj.exemptfee_msat = api2wire_u64(apiObj.exemptfeeMsat); - _api_fill_to_wire_node_config(apiObj.nodeConfig, wireObj.node_config); - } - - void _api_fill_to_wire_configure_node_request( - ConfigureNodeRequest apiObj, wire_ConfigureNodeRequest wireObj) { - wireObj.close_to_address = api2wire_opt_String(apiObj.closeToAddress); - } - - void _api_fill_to_wire_connect_request(ConnectRequest apiObj, wire_ConnectRequest wireObj) { - _api_fill_to_wire_config(apiObj.config, wireObj.config); - wireObj.seed = api2wire_uint_8_list(apiObj.seed); - wireObj.restore_only = api2wire_opt_box_autoadd_bool(apiObj.restoreOnly); - } - - void _api_fill_to_wire_greenlight_credentials( - GreenlightCredentials apiObj, wire_GreenlightCredentials wireObj) { - wireObj.developer_key = api2wire_uint_8_list(apiObj.developerKey); - wireObj.developer_cert = api2wire_uint_8_list(apiObj.developerCert); - } - - void _api_fill_to_wire_greenlight_node_config( - GreenlightNodeConfig apiObj, wire_GreenlightNodeConfig wireObj) { - wireObj.partner_credentials = api2wire_opt_box_autoadd_greenlight_credentials(apiObj.partnerCredentials); - wireObj.invite_code = api2wire_opt_String(apiObj.inviteCode); - } - - void _api_fill_to_wire_list_payments_request(ListPaymentsRequest apiObj, wire_ListPaymentsRequest wireObj) { - wireObj.filters = api2wire_opt_list_payment_type_filter(apiObj.filters); - wireObj.metadata_filters = api2wire_opt_list_metadata_filter(apiObj.metadataFilters); - wireObj.from_timestamp = api2wire_opt_box_autoadd_i64(apiObj.fromTimestamp); - wireObj.to_timestamp = api2wire_opt_box_autoadd_i64(apiObj.toTimestamp); - wireObj.include_failures = api2wire_opt_box_autoadd_bool(apiObj.includeFailures); - wireObj.offset = api2wire_opt_box_autoadd_u32(apiObj.offset); - wireObj.limit = api2wire_opt_box_autoadd_u32(apiObj.limit); - } - - void _api_fill_to_wire_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, wire_LnUrlAuthRequestData wireObj) { - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.action = api2wire_opt_String(apiObj.action); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.url = api2wire_String(apiObj.url); - } - - void _api_fill_to_wire_ln_url_pay_request(LnUrlPayRequest apiObj, wire_LnUrlPayRequest wireObj) { - _api_fill_to_wire_ln_url_pay_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.use_trampoline = api2wire_bool(apiObj.useTrampoline); - wireObj.comment = api2wire_opt_String(apiObj.comment); - wireObj.payment_label = api2wire_opt_String(apiObj.paymentLabel); - wireObj.validate_success_action_url = api2wire_opt_box_autoadd_bool(apiObj.validateSuccessActionUrl); - } - - void _api_fill_to_wire_ln_url_pay_request_data( - LnUrlPayRequestData apiObj, wire_LnUrlPayRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.min_sendable = api2wire_u64(apiObj.minSendable); - wireObj.max_sendable = api2wire_u64(apiObj.maxSendable); - wireObj.metadata_str = api2wire_String(apiObj.metadataStr); - wireObj.comment_allowed = api2wire_u16(apiObj.commentAllowed); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.allows_nostr = api2wire_bool(apiObj.allowsNostr); - wireObj.nostr_pubkey = api2wire_opt_String(apiObj.nostrPubkey); - wireObj.ln_address = api2wire_opt_String(apiObj.lnAddress); - } - - void _api_fill_to_wire_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, wire_LnUrlWithdrawRequest wireObj) { - _api_fill_to_wire_ln_url_withdraw_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_opt_String(apiObj.description); - } - - void _api_fill_to_wire_ln_url_withdraw_request_data( - LnUrlWithdrawRequestData apiObj, wire_LnUrlWithdrawRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.default_description = api2wire_String(apiObj.defaultDescription); - wireObj.min_withdrawable = api2wire_u64(apiObj.minWithdrawable); - wireObj.max_withdrawable = api2wire_u64(apiObj.maxWithdrawable); - } - - void _api_fill_to_wire_metadata_filter(MetadataFilter apiObj, wire_MetadataFilter wireObj) { - wireObj.json_path = api2wire_String(apiObj.jsonPath); - wireObj.json_value = api2wire_String(apiObj.jsonValue); - } - - void _api_fill_to_wire_node_config(NodeConfig apiObj, wire_NodeConfig wireObj) { - if (apiObj is NodeConfig_Greenlight) { - var pre_config = api2wire_box_autoadd_greenlight_node_config(apiObj.config); - wireObj.tag = 0; - wireObj.kind = inner.inflate_NodeConfig_Greenlight(); - wireObj.kind.ref.Greenlight.ref.config = pre_config; - return; - } - } - - void _api_fill_to_wire_open_channel_fee_request( - OpenChannelFeeRequest apiObj, wire_OpenChannelFeeRequest wireObj) { - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - } - - void _api_fill_to_wire_opening_fee_params(OpeningFeeParams apiObj, wire_OpeningFeeParams wireObj) { - wireObj.min_msat = api2wire_u64(apiObj.minMsat); - wireObj.proportional = api2wire_u32(apiObj.proportional); - wireObj.valid_until = api2wire_String(apiObj.validUntil); - wireObj.max_idle_time = api2wire_u32(apiObj.maxIdleTime); - wireObj.max_client_to_self_delay = api2wire_u32(apiObj.maxClientToSelfDelay); - wireObj.promise = api2wire_String(apiObj.promise); - } - - void _api_fill_to_wire_pay_onchain_request(PayOnchainRequest apiObj, wire_PayOnchainRequest wireObj) { - wireObj.recipient_address = api2wire_String(apiObj.recipientAddress); - _api_fill_to_wire_prepare_onchain_payment_response(apiObj.prepareRes, wireObj.prepare_res); - } - - void _api_fill_to_wire_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, wire_PrepareOnchainPaymentRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.amount_type = api2wire_swap_amount_type(apiObj.amountType); - wireObj.claim_tx_feerate = api2wire_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_prepare_onchain_payment_response( - PrepareOnchainPaymentResponse apiObj, wire_PrepareOnchainPaymentResponse wireObj) { - wireObj.fees_hash = api2wire_String(apiObj.feesHash); - wireObj.fees_percentage = api2wire_f64(apiObj.feesPercentage); - wireObj.fees_lockup = api2wire_u64(apiObj.feesLockup); - wireObj.fees_claim = api2wire_u64(apiObj.feesClaim); - wireObj.sender_amount_sat = api2wire_u64(apiObj.senderAmountSat); - wireObj.recipient_amount_sat = api2wire_u64(apiObj.recipientAmountSat); - wireObj.total_fees = api2wire_u64(apiObj.totalFees); - } - - void _api_fill_to_wire_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, wire_PrepareRedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_prepare_refund_request( - PrepareRefundRequest apiObj, wire_PrepareRefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_receive_onchain_request( - ReceiveOnchainRequest apiObj, wire_ReceiveOnchainRequest wireObj) { - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - } - - void _api_fill_to_wire_receive_payment_request( - ReceivePaymentRequest apiObj, wire_ReceivePaymentRequest wireObj) { - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_String(apiObj.description); - wireObj.preimage = api2wire_opt_uint_8_list(apiObj.preimage); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - wireObj.use_description_hash = api2wire_opt_box_autoadd_bool(apiObj.useDescriptionHash); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - wireObj.cltv = api2wire_opt_box_autoadd_u32(apiObj.cltv); - } - - void _api_fill_to_wire_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, wire_RedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_refund_request(RefundRequest apiObj, wire_RefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_report_issue_request(ReportIssueRequest apiObj, wire_ReportIssueRequest wireObj) { - if (apiObj is ReportIssueRequest_PaymentFailure) { - var pre_data = api2wire_box_autoadd_report_payment_failure_details(apiObj.data); - wireObj.tag = 0; - wireObj.kind = inner.inflate_ReportIssueRequest_PaymentFailure(); - wireObj.kind.ref.PaymentFailure.ref.data = pre_data; - return; - } - } - - void _api_fill_to_wire_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, wire_ReportPaymentFailureDetails wireObj) { - wireObj.payment_hash = api2wire_String(apiObj.paymentHash); - wireObj.comment = api2wire_opt_String(apiObj.comment); - } - - void _api_fill_to_wire_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, wire_ReverseSwapFeesRequest wireObj) { - wireObj.send_amount_sat = api2wire_opt_box_autoadd_u64(apiObj.sendAmountSat); - wireObj.claim_tx_feerate = api2wire_opt_box_autoadd_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_send_onchain_request(SendOnchainRequest apiObj, wire_SendOnchainRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.onchain_recipient_address = api2wire_String(apiObj.onchainRecipientAddress); - wireObj.pair_hash = api2wire_String(apiObj.pairHash); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_send_payment_request(SendPaymentRequest apiObj, wire_SendPaymentRequest wireObj) { - wireObj.bolt11 = api2wire_String(apiObj.bolt11); - wireObj.use_trampoline = api2wire_bool(apiObj.useTrampoline); - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, wire_SendSpontaneousPaymentRequest wireObj) { - wireObj.node_id = api2wire_String(apiObj.nodeId); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.extra_tlvs = api2wire_opt_list_tlv_entry(apiObj.extraTlvs); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_sign_message_request(SignMessageRequest apiObj, wire_SignMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - } - - void _api_fill_to_wire_static_backup_request(StaticBackupRequest apiObj, wire_StaticBackupRequest wireObj) { - wireObj.working_dir = api2wire_String(apiObj.workingDir); - } - - void _api_fill_to_wire_tlv_entry(TlvEntry apiObj, wire_TlvEntry wireObj) { - wireObj.field_number = api2wire_u64(apiObj.fieldNumber); - wireObj.value = api2wire_uint_8_list(apiObj.value); - } -} - -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint - -/// generated by flutter_rust_bridge -class BreezSdkCoreWire implements FlutterRustBridgeWireBase { - @internal - late final dartApi = DartApiDl(init_frb_dart_api_dl); - - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - BreezSdkCoreWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - BreezSdkCoreWire.fromLookup(ffi.Pointer Function(String symbolName) lookup) - : _lookup = lookup; - - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); - } - - late final _store_dart_post_cobjectPtr = - _lookup>('store_dart_post_cobject'); - late final _store_dart_post_cobject = - _store_dart_post_cobjectPtr.asFunction(); - - Object get_dart_object( - int ptr, - ) { - return _get_dart_object( - ptr, - ); - } - - late final _get_dart_objectPtr = - _lookup>('get_dart_object'); - late final _get_dart_object = _get_dart_objectPtr.asFunction(); - - void drop_dart_object( - int ptr, - ) { - return _drop_dart_object( - ptr, - ); - } - - late final _drop_dart_objectPtr = - _lookup>('drop_dart_object'); - late final _drop_dart_object = _drop_dart_objectPtr.asFunction(); - - int new_dart_opaque( - Object handle, - ) { - return _new_dart_opaque( - handle, - ); - } - - late final _new_dart_opaquePtr = - _lookup>('new_dart_opaque'); - late final _new_dart_opaque = _new_dart_opaquePtr.asFunction(); - - int init_frb_dart_api_dl( - ffi.Pointer obj, - ) { - return _init_frb_dart_api_dl( - obj, - ); - } - - late final _init_frb_dart_api_dlPtr = - _lookup)>>('init_frb_dart_api_dl'); - late final _init_frb_dart_api_dl = - _init_frb_dart_api_dlPtr.asFunction)>(); - - void wire_connect( - int port_, - ffi.Pointer req, - ) { - return _wire_connect( - port_, - req, - ); - } - - late final _wire_connectPtr = - _lookup)>>( - 'wire_connect'); - late final _wire_connect = - _wire_connectPtr.asFunction)>(); - - void wire_is_initialized( - int port_, - ) { - return _wire_is_initialized( - port_, - ); - } - - late final _wire_is_initializedPtr = - _lookup>('wire_is_initialized'); - late final _wire_is_initialized = _wire_is_initializedPtr.asFunction(); - - void wire_sync( - int port_, - ) { - return _wire_sync( - port_, - ); - } - - late final _wire_syncPtr = _lookup>('wire_sync'); - late final _wire_sync = _wire_syncPtr.asFunction(); - - void wire_node_credentials( - int port_, - ) { - return _wire_node_credentials( - port_, - ); - } - - late final _wire_node_credentialsPtr = - _lookup>('wire_node_credentials'); - late final _wire_node_credentials = _wire_node_credentialsPtr.asFunction(); - - void wire_node_info( - int port_, - ) { - return _wire_node_info( - port_, - ); - } - - late final _wire_node_infoPtr = _lookup>('wire_node_info'); - late final _wire_node_info = _wire_node_infoPtr.asFunction(); - - void wire_configure_node( - int port_, - ffi.Pointer req, - ) { - return _wire_configure_node( - port_, - req, - ); - } - - late final _wire_configure_nodePtr = - _lookup)>>( - 'wire_configure_node'); - late final _wire_configure_node = - _wire_configure_nodePtr.asFunction)>(); - - void wire_disconnect( - int port_, - ) { - return _wire_disconnect( - port_, - ); - } - - late final _wire_disconnectPtr = - _lookup>('wire_disconnect'); - late final _wire_disconnect = _wire_disconnectPtr.asFunction(); - - void wire_sign_message( - int port_, - ffi.Pointer req, - ) { - return _wire_sign_message( - port_, - req, - ); - } - - late final _wire_sign_messagePtr = - _lookup)>>( - 'wire_sign_message'); - late final _wire_sign_message = - _wire_sign_messagePtr.asFunction)>(); - - void wire_check_message( - int port_, - ffi.Pointer req, - ) { - return _wire_check_message( - port_, - req, - ); - } - - late final _wire_check_messagePtr = - _lookup)>>( - 'wire_check_message'); - late final _wire_check_message = - _wire_check_messagePtr.asFunction)>(); - - void wire_mnemonic_to_seed( - int port_, - ffi.Pointer phrase, - ) { - return _wire_mnemonic_to_seed( - port_, - phrase, - ); - } - - late final _wire_mnemonic_to_seedPtr = - _lookup)>>( - 'wire_mnemonic_to_seed'); - late final _wire_mnemonic_to_seed = - _wire_mnemonic_to_seedPtr.asFunction)>(); - - void wire_default_config( - int port_, - int env_type, - ffi.Pointer api_key, - ffi.Pointer node_config, - ) { - return _wire_default_config( - port_, - env_type, - api_key, - node_config, - ); - } - - late final _wire_default_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('wire_default_config'); - late final _wire_default_config = _wire_default_configPtr - .asFunction, ffi.Pointer)>(); - - void wire_static_backup( - int port_, - ffi.Pointer req, - ) { - return _wire_static_backup( - port_, - req, - ); - } - - late final _wire_static_backupPtr = - _lookup)>>( - 'wire_static_backup'); - late final _wire_static_backup = - _wire_static_backupPtr.asFunction)>(); - - void wire_service_health_check( - int port_, - ffi.Pointer api_key, - ) { - return _wire_service_health_check( - port_, - api_key, - ); - } - - late final _wire_service_health_checkPtr = - _lookup)>>( - 'wire_service_health_check'); - late final _wire_service_health_check = - _wire_service_health_checkPtr.asFunction)>(); - - void wire_breez_events_stream( - int port_, - ) { - return _wire_breez_events_stream( - port_, - ); - } - - late final _wire_breez_events_streamPtr = - _lookup>('wire_breez_events_stream'); - late final _wire_breez_events_stream = _wire_breez_events_streamPtr.asFunction(); - - void wire_breez_log_stream( - int port_, - ) { - return _wire_breez_log_stream( - port_, - ); - } - - late final _wire_breez_log_streamPtr = - _lookup>('wire_breez_log_stream'); - late final _wire_breez_log_stream = _wire_breez_log_streamPtr.asFunction(); - - void wire_list_lsps( - int port_, - ) { - return _wire_list_lsps( - port_, - ); - } - - late final _wire_list_lspsPtr = _lookup>('wire_list_lsps'); - late final _wire_list_lsps = _wire_list_lspsPtr.asFunction(); - - void wire_connect_lsp( - int port_, - ffi.Pointer lsp_id, - ) { - return _wire_connect_lsp( - port_, - lsp_id, - ); - } - - late final _wire_connect_lspPtr = - _lookup)>>( - 'wire_connect_lsp'); - late final _wire_connect_lsp = - _wire_connect_lspPtr.asFunction)>(); - - void wire_lsp_id( - int port_, - ) { - return _wire_lsp_id( - port_, - ); - } - - late final _wire_lsp_idPtr = _lookup>('wire_lsp_id'); - late final _wire_lsp_id = _wire_lsp_idPtr.asFunction(); - - void wire_fetch_lsp_info( - int port_, - ffi.Pointer id, - ) { - return _wire_fetch_lsp_info( - port_, - id, - ); - } - - late final _wire_fetch_lsp_infoPtr = - _lookup)>>( - 'wire_fetch_lsp_info'); - late final _wire_fetch_lsp_info = - _wire_fetch_lsp_infoPtr.asFunction)>(); - - void wire_lsp_info( - int port_, - ) { - return _wire_lsp_info( - port_, - ); - } - - late final _wire_lsp_infoPtr = _lookup>('wire_lsp_info'); - late final _wire_lsp_info = _wire_lsp_infoPtr.asFunction(); - - void wire_close_lsp_channels( - int port_, - ) { - return _wire_close_lsp_channels( - port_, - ); - } - - late final _wire_close_lsp_channelsPtr = - _lookup>('wire_close_lsp_channels'); - late final _wire_close_lsp_channels = _wire_close_lsp_channelsPtr.asFunction(); - - void wire_register_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_register_webhook( - port_, - webhook_url, - ); - } - - late final _wire_register_webhookPtr = - _lookup)>>( - 'wire_register_webhook'); - late final _wire_register_webhook = - _wire_register_webhookPtr.asFunction)>(); - - void wire_unregister_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_unregister_webhook( - port_, - webhook_url, - ); - } - - late final _wire_unregister_webhookPtr = - _lookup)>>( - 'wire_unregister_webhook'); - late final _wire_unregister_webhook = - _wire_unregister_webhookPtr.asFunction)>(); - - void wire_backup( - int port_, - ) { - return _wire_backup( - port_, - ); - } - - late final _wire_backupPtr = _lookup>('wire_backup'); - late final _wire_backup = _wire_backupPtr.asFunction(); - - void wire_backup_status( - int port_, - ) { - return _wire_backup_status( - port_, - ); - } - - late final _wire_backup_statusPtr = - _lookup>('wire_backup_status'); - late final _wire_backup_status = _wire_backup_statusPtr.asFunction(); - - void wire_parse_invoice( - int port_, - ffi.Pointer invoice, - ) { - return _wire_parse_invoice( - port_, - invoice, - ); - } - - late final _wire_parse_invoicePtr = - _lookup)>>( - 'wire_parse_invoice'); - late final _wire_parse_invoice = - _wire_parse_invoicePtr.asFunction)>(); - - void wire_parse_input( - int port_, - ffi.Pointer input, - ) { - return _wire_parse_input( - port_, - input, - ); - } - - late final _wire_parse_inputPtr = - _lookup)>>( - 'wire_parse_input'); - late final _wire_parse_input = - _wire_parse_inputPtr.asFunction)>(); - - void wire_list_payments( - int port_, - ffi.Pointer req, - ) { - return _wire_list_payments( - port_, - req, - ); - } - - late final _wire_list_paymentsPtr = - _lookup)>>( - 'wire_list_payments'); - late final _wire_list_payments = - _wire_list_paymentsPtr.asFunction)>(); - - void wire_payment_by_hash( - int port_, - ffi.Pointer hash, - ) { - return _wire_payment_by_hash( - port_, - hash, - ); - } - - late final _wire_payment_by_hashPtr = - _lookup)>>( - 'wire_payment_by_hash'); - late final _wire_payment_by_hash = - _wire_payment_by_hashPtr.asFunction)>(); - - void wire_set_payment_metadata( - int port_, - ffi.Pointer hash, - ffi.Pointer metadata, - ) { - return _wire_set_payment_metadata( - port_, - hash, - metadata, - ); - } - - late final _wire_set_payment_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>('wire_set_payment_metadata'); - late final _wire_set_payment_metadata = _wire_set_payment_metadataPtr - .asFunction, ffi.Pointer)>(); - - void wire_send_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_payment( - port_, - req, - ); - } - - late final _wire_send_paymentPtr = - _lookup)>>( - 'wire_send_payment'); - late final _wire_send_payment = - _wire_send_paymentPtr.asFunction)>(); - - void wire_send_spontaneous_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_spontaneous_payment( - port_, - req, - ); - } - - late final _wire_send_spontaneous_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_send_spontaneous_payment'); - late final _wire_send_spontaneous_payment = _wire_send_spontaneous_paymentPtr - .asFunction)>(); - - void wire_receive_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_payment( - port_, - req, - ); - } - - late final _wire_receive_paymentPtr = - _lookup)>>( - 'wire_receive_payment'); - late final _wire_receive_payment = - _wire_receive_paymentPtr.asFunction)>(); - - void wire_lnurl_pay( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_pay( - port_, - req, - ); - } - - late final _wire_lnurl_payPtr = - _lookup)>>( - 'wire_lnurl_pay'); - late final _wire_lnurl_pay = - _wire_lnurl_payPtr.asFunction)>(); - - void wire_lnurl_withdraw( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_withdraw( - port_, - req, - ); - } - - late final _wire_lnurl_withdrawPtr = - _lookup)>>( - 'wire_lnurl_withdraw'); - late final _wire_lnurl_withdraw = - _wire_lnurl_withdrawPtr.asFunction)>(); - - void wire_lnurl_auth( - int port_, - ffi.Pointer req_data, - ) { - return _wire_lnurl_auth( - port_, - req_data, - ); - } - - late final _wire_lnurl_authPtr = - _lookup)>>( - 'wire_lnurl_auth'); - late final _wire_lnurl_auth = - _wire_lnurl_authPtr.asFunction)>(); - - void wire_report_issue( - int port_, - ffi.Pointer req, - ) { - return _wire_report_issue( - port_, - req, - ); - } - - late final _wire_report_issuePtr = - _lookup)>>( - 'wire_report_issue'); - late final _wire_report_issue = - _wire_report_issuePtr.asFunction)>(); - - void wire_fetch_fiat_rates( - int port_, - ) { - return _wire_fetch_fiat_rates( - port_, - ); - } - - late final _wire_fetch_fiat_ratesPtr = - _lookup>('wire_fetch_fiat_rates'); - late final _wire_fetch_fiat_rates = _wire_fetch_fiat_ratesPtr.asFunction(); - - void wire_list_fiat_currencies( - int port_, - ) { - return _wire_list_fiat_currencies( - port_, - ); - } - - late final _wire_list_fiat_currenciesPtr = - _lookup>('wire_list_fiat_currencies'); - late final _wire_list_fiat_currencies = _wire_list_fiat_currenciesPtr.asFunction(); - - void wire_max_reverse_swap_amount( - int port_, - ) { - return _wire_max_reverse_swap_amount( - port_, - ); - } - - late final _wire_max_reverse_swap_amountPtr = - _lookup>('wire_max_reverse_swap_amount'); - late final _wire_max_reverse_swap_amount = - _wire_max_reverse_swap_amountPtr.asFunction(); - - void wire_send_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_send_onchain( - port_, - req, - ); - } - - late final _wire_send_onchainPtr = - _lookup)>>( - 'wire_send_onchain'); - late final _wire_send_onchain = - _wire_send_onchainPtr.asFunction)>(); - - void wire_pay_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_pay_onchain( - port_, - req, - ); - } - - late final _wire_pay_onchainPtr = - _lookup)>>( - 'wire_pay_onchain'); - late final _wire_pay_onchain = - _wire_pay_onchainPtr.asFunction)>(); - - void wire_receive_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_onchain( - port_, - req, - ); - } - - late final _wire_receive_onchainPtr = - _lookup)>>( - 'wire_receive_onchain'); - late final _wire_receive_onchain = - _wire_receive_onchainPtr.asFunction)>(); - - void wire_buy_bitcoin( - int port_, - ffi.Pointer req, - ) { - return _wire_buy_bitcoin( - port_, - req, - ); - } - - late final _wire_buy_bitcoinPtr = - _lookup)>>( - 'wire_buy_bitcoin'); - late final _wire_buy_bitcoin = - _wire_buy_bitcoinPtr.asFunction)>(); - - void wire_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_redeem_onchain_fundsPtr = - _lookup)>>( - 'wire_redeem_onchain_funds'); - late final _wire_redeem_onchain_funds = _wire_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_prepare_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_prepare_redeem_onchain_fundsPtr = _lookup< - ffi - .NativeFunction)>>( - 'wire_prepare_redeem_onchain_funds'); - late final _wire_prepare_redeem_onchain_funds = _wire_prepare_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_list_refundables( - int port_, - ) { - return _wire_list_refundables( - port_, - ); - } - - late final _wire_list_refundablesPtr = - _lookup>('wire_list_refundables'); - late final _wire_list_refundables = _wire_list_refundablesPtr.asFunction(); - - void wire_prepare_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_refund( - port_, - req, - ); - } - - late final _wire_prepare_refundPtr = - _lookup)>>( - 'wire_prepare_refund'); - late final _wire_prepare_refund = - _wire_prepare_refundPtr.asFunction)>(); - - void wire_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_refund( - port_, - req, - ); - } - - late final _wire_refundPtr = - _lookup)>>( - 'wire_refund'); - late final _wire_refund = _wire_refundPtr.asFunction)>(); - - void wire_rescan_swaps( - int port_, - ) { - return _wire_rescan_swaps( - port_, - ); - } - - late final _wire_rescan_swapsPtr = - _lookup>('wire_rescan_swaps'); - late final _wire_rescan_swaps = _wire_rescan_swapsPtr.asFunction(); - - void wire_redeem_swap( - int port_, - ffi.Pointer swap_address, - ) { - return _wire_redeem_swap( - port_, - swap_address, - ); - } - - late final _wire_redeem_swapPtr = - _lookup)>>( - 'wire_redeem_swap'); - late final _wire_redeem_swap = - _wire_redeem_swapPtr.asFunction)>(); - - void wire_in_progress_swap( - int port_, - ) { - return _wire_in_progress_swap( - port_, - ); - } - - late final _wire_in_progress_swapPtr = - _lookup>('wire_in_progress_swap'); - late final _wire_in_progress_swap = _wire_in_progress_swapPtr.asFunction(); - - void wire_in_progress_reverse_swaps( - int port_, - ) { - return _wire_in_progress_reverse_swaps( - port_, - ); - } - - late final _wire_in_progress_reverse_swapsPtr = - _lookup>('wire_in_progress_reverse_swaps'); - late final _wire_in_progress_reverse_swaps = - _wire_in_progress_reverse_swapsPtr.asFunction(); - - void wire_claim_reverse_swap( - int port_, - ffi.Pointer lockup_address, - ) { - return _wire_claim_reverse_swap( - port_, - lockup_address, - ); - } - - late final _wire_claim_reverse_swapPtr = - _lookup)>>( - 'wire_claim_reverse_swap'); - late final _wire_claim_reverse_swap = - _wire_claim_reverse_swapPtr.asFunction)>(); - - void wire_open_channel_fee( - int port_, - ffi.Pointer req, - ) { - return _wire_open_channel_fee( - port_, - req, - ); - } - - late final _wire_open_channel_feePtr = - _lookup)>>( - 'wire_open_channel_fee'); - late final _wire_open_channel_fee = - _wire_open_channel_feePtr.asFunction)>(); - - void wire_fetch_reverse_swap_fees( - int port_, - ffi.Pointer req, - ) { - return _wire_fetch_reverse_swap_fees( - port_, - req, - ); - } - - late final _wire_fetch_reverse_swap_feesPtr = - _lookup)>>( - 'wire_fetch_reverse_swap_fees'); - late final _wire_fetch_reverse_swap_fees = _wire_fetch_reverse_swap_feesPtr - .asFunction)>(); - - void wire_onchain_payment_limits( - int port_, - ) { - return _wire_onchain_payment_limits( - port_, - ); - } - - late final _wire_onchain_payment_limitsPtr = - _lookup>('wire_onchain_payment_limits'); - late final _wire_onchain_payment_limits = _wire_onchain_payment_limitsPtr.asFunction(); - - void wire_prepare_onchain_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_onchain_payment( - port_, - req, - ); - } - - late final _wire_prepare_onchain_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_prepare_onchain_payment'); - late final _wire_prepare_onchain_payment = _wire_prepare_onchain_paymentPtr - .asFunction)>(); - - void wire_in_progress_onchain_payments( - int port_, - ) { - return _wire_in_progress_onchain_payments( - port_, - ); - } - - late final _wire_in_progress_onchain_paymentsPtr = - _lookup>('wire_in_progress_onchain_payments'); - late final _wire_in_progress_onchain_payments = - _wire_in_progress_onchain_paymentsPtr.asFunction(); - - void wire_recommended_fees( - int port_, - ) { - return _wire_recommended_fees( - port_, - ); - } - - late final _wire_recommended_feesPtr = - _lookup>('wire_recommended_fees'); - late final _wire_recommended_fees = _wire_recommended_feesPtr.asFunction(); - - void wire_execute_command( - int port_, - ffi.Pointer command, - ) { - return _wire_execute_command( - port_, - command, - ); - } - - late final _wire_execute_commandPtr = - _lookup)>>( - 'wire_execute_command'); - late final _wire_execute_command = - _wire_execute_commandPtr.asFunction)>(); - - void wire_generate_diagnostic_data( - int port_, - ) { - return _wire_generate_diagnostic_data( - port_, - ); - } - - late final _wire_generate_diagnostic_dataPtr = - _lookup>('wire_generate_diagnostic_data'); - late final _wire_generate_diagnostic_data = - _wire_generate_diagnostic_dataPtr.asFunction(); - - ffi.Pointer new_box_autoadd_bool_0( - bool value, - ) { - return _new_box_autoadd_bool_0( - value, - ); - } - - late final _new_box_autoadd_bool_0Ptr = - _lookup Function(ffi.Bool)>>('new_box_autoadd_bool_0'); - late final _new_box_autoadd_bool_0 = - _new_box_autoadd_bool_0Ptr.asFunction Function(bool)>(); - - ffi.Pointer new_box_autoadd_buy_bitcoin_request_0() { - return _new_box_autoadd_buy_bitcoin_request_0(); - } - - late final _new_box_autoadd_buy_bitcoin_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_buy_bitcoin_request_0'); - late final _new_box_autoadd_buy_bitcoin_request_0 = - _new_box_autoadd_buy_bitcoin_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_check_message_request_0() { - return _new_box_autoadd_check_message_request_0(); - } - - late final _new_box_autoadd_check_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_check_message_request_0'); - late final _new_box_autoadd_check_message_request_0 = _new_box_autoadd_check_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_configure_node_request_0() { - return _new_box_autoadd_configure_node_request_0(); - } - - late final _new_box_autoadd_configure_node_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_configure_node_request_0'); - late final _new_box_autoadd_configure_node_request_0 = _new_box_autoadd_configure_node_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_connect_request_0() { - return _new_box_autoadd_connect_request_0(); - } - - late final _new_box_autoadd_connect_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_connect_request_0'); - late final _new_box_autoadd_connect_request_0 = - _new_box_autoadd_connect_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_credentials_0() { - return _new_box_autoadd_greenlight_credentials_0(); - } - - late final _new_box_autoadd_greenlight_credentials_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_credentials_0'); - late final _new_box_autoadd_greenlight_credentials_0 = _new_box_autoadd_greenlight_credentials_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_node_config_0() { - return _new_box_autoadd_greenlight_node_config_0(); - } - - late final _new_box_autoadd_greenlight_node_config_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_node_config_0'); - late final _new_box_autoadd_greenlight_node_config_0 = _new_box_autoadd_greenlight_node_config_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_i64_0( - int value, - ) { - return _new_box_autoadd_i64_0( - value, - ); - } - - late final _new_box_autoadd_i64_0Ptr = - _lookup Function(ffi.Int64)>>('new_box_autoadd_i64_0'); - late final _new_box_autoadd_i64_0 = - _new_box_autoadd_i64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_list_payments_request_0() { - return _new_box_autoadd_list_payments_request_0(); - } - - late final _new_box_autoadd_list_payments_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_list_payments_request_0'); - late final _new_box_autoadd_list_payments_request_0 = _new_box_autoadd_list_payments_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_auth_request_data_0() { - return _new_box_autoadd_ln_url_auth_request_data_0(); - } - - late final _new_box_autoadd_ln_url_auth_request_data_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_auth_request_data_0'); - late final _new_box_autoadd_ln_url_auth_request_data_0 = _new_box_autoadd_ln_url_auth_request_data_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_pay_request_0() { - return _new_box_autoadd_ln_url_pay_request_0(); - } - - late final _new_box_autoadd_ln_url_pay_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_pay_request_0'); - late final _new_box_autoadd_ln_url_pay_request_0 = - _new_box_autoadd_ln_url_pay_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_withdraw_request_0() { - return _new_box_autoadd_ln_url_withdraw_request_0(); - } - - late final _new_box_autoadd_ln_url_withdraw_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_withdraw_request_0'); - late final _new_box_autoadd_ln_url_withdraw_request_0 = _new_box_autoadd_ln_url_withdraw_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_node_config_0() { - return _new_box_autoadd_node_config_0(); - } - - late final _new_box_autoadd_node_config_0Ptr = - _lookup Function()>>('new_box_autoadd_node_config_0'); - late final _new_box_autoadd_node_config_0 = - _new_box_autoadd_node_config_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_open_channel_fee_request_0() { - return _new_box_autoadd_open_channel_fee_request_0(); - } - - late final _new_box_autoadd_open_channel_fee_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_open_channel_fee_request_0'); - late final _new_box_autoadd_open_channel_fee_request_0 = _new_box_autoadd_open_channel_fee_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_opening_fee_params_0() { - return _new_box_autoadd_opening_fee_params_0(); - } - - late final _new_box_autoadd_opening_fee_params_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_opening_fee_params_0'); - late final _new_box_autoadd_opening_fee_params_0 = - _new_box_autoadd_opening_fee_params_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_pay_onchain_request_0() { - return _new_box_autoadd_pay_onchain_request_0(); - } - - late final _new_box_autoadd_pay_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_pay_onchain_request_0'); - late final _new_box_autoadd_pay_onchain_request_0 = - _new_box_autoadd_pay_onchain_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_onchain_payment_request_0() { - return _new_box_autoadd_prepare_onchain_payment_request_0(); - } - - late final _new_box_autoadd_prepare_onchain_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_onchain_payment_request_0'); - late final _new_box_autoadd_prepare_onchain_payment_request_0 = - _new_box_autoadd_prepare_onchain_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer - new_box_autoadd_prepare_redeem_onchain_funds_request_0() { - return _new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0 = - _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_refund_request_0() { - return _new_box_autoadd_prepare_refund_request_0(); - } - - late final _new_box_autoadd_prepare_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_refund_request_0'); - late final _new_box_autoadd_prepare_refund_request_0 = _new_box_autoadd_prepare_refund_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_onchain_request_0() { - return _new_box_autoadd_receive_onchain_request_0(); - } - - late final _new_box_autoadd_receive_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_onchain_request_0'); - late final _new_box_autoadd_receive_onchain_request_0 = _new_box_autoadd_receive_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_payment_request_0() { - return _new_box_autoadd_receive_payment_request_0(); - } - - late final _new_box_autoadd_receive_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_payment_request_0'); - late final _new_box_autoadd_receive_payment_request_0 = _new_box_autoadd_receive_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_redeem_onchain_funds_request_0() { - return _new_box_autoadd_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_redeem_onchain_funds_request_0 = - _new_box_autoadd_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_refund_request_0() { - return _new_box_autoadd_refund_request_0(); - } - - late final _new_box_autoadd_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_refund_request_0'); - late final _new_box_autoadd_refund_request_0 = - _new_box_autoadd_refund_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_issue_request_0() { - return _new_box_autoadd_report_issue_request_0(); - } - - late final _new_box_autoadd_report_issue_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_issue_request_0'); - late final _new_box_autoadd_report_issue_request_0 = _new_box_autoadd_report_issue_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_payment_failure_details_0() { - return _new_box_autoadd_report_payment_failure_details_0(); - } - - late final _new_box_autoadd_report_payment_failure_details_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_payment_failure_details_0'); - late final _new_box_autoadd_report_payment_failure_details_0 = - _new_box_autoadd_report_payment_failure_details_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_reverse_swap_fees_request_0() { - return _new_box_autoadd_reverse_swap_fees_request_0(); - } - - late final _new_box_autoadd_reverse_swap_fees_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_reverse_swap_fees_request_0'); - late final _new_box_autoadd_reverse_swap_fees_request_0 = _new_box_autoadd_reverse_swap_fees_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_onchain_request_0() { - return _new_box_autoadd_send_onchain_request_0(); - } - - late final _new_box_autoadd_send_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_onchain_request_0'); - late final _new_box_autoadd_send_onchain_request_0 = _new_box_autoadd_send_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_payment_request_0() { - return _new_box_autoadd_send_payment_request_0(); - } - - late final _new_box_autoadd_send_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_payment_request_0'); - late final _new_box_autoadd_send_payment_request_0 = _new_box_autoadd_send_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_spontaneous_payment_request_0() { - return _new_box_autoadd_send_spontaneous_payment_request_0(); - } - - late final _new_box_autoadd_send_spontaneous_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_spontaneous_payment_request_0'); - late final _new_box_autoadd_send_spontaneous_payment_request_0 = - _new_box_autoadd_send_spontaneous_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_sign_message_request_0() { - return _new_box_autoadd_sign_message_request_0(); - } - - late final _new_box_autoadd_sign_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_sign_message_request_0'); - late final _new_box_autoadd_sign_message_request_0 = _new_box_autoadd_sign_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_static_backup_request_0() { - return _new_box_autoadd_static_backup_request_0(); - } - - late final _new_box_autoadd_static_backup_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_static_backup_request_0'); - late final _new_box_autoadd_static_backup_request_0 = _new_box_autoadd_static_backup_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_u32_0( - int value, - ) { - return _new_box_autoadd_u32_0( - value, - ); - } - - late final _new_box_autoadd_u32_0Ptr = - _lookup Function(ffi.Uint32)>>('new_box_autoadd_u32_0'); - late final _new_box_autoadd_u32_0 = - _new_box_autoadd_u32_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_u64_0( - int value, - ) { - return _new_box_autoadd_u64_0( - value, - ); - } - - late final _new_box_autoadd_u64_0Ptr = - _lookup Function(ffi.Uint64)>>('new_box_autoadd_u64_0'); - late final _new_box_autoadd_u64_0 = - _new_box_autoadd_u64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_metadata_filter_0( - int len, - ) { - return _new_list_metadata_filter_0( - len, - ); - } - - late final _new_list_metadata_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_metadata_filter_0'); - late final _new_list_metadata_filter_0 = - _new_list_metadata_filter_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_payment_type_filter_0( - int len, - ) { - return _new_list_payment_type_filter_0( - len, - ); - } - - late final _new_list_payment_type_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_payment_type_filter_0'); - late final _new_list_payment_type_filter_0 = _new_list_payment_type_filter_0Ptr - .asFunction Function(int)>(); - - ffi.Pointer new_list_tlv_entry_0( - int len, - ) { - return _new_list_tlv_entry_0( - len, - ); - } - - late final _new_list_tlv_entry_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_tlv_entry_0'); - late final _new_list_tlv_entry_0 = - _new_list_tlv_entry_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_uint_8_list_0( - int len, - ) { - return _new_uint_8_list_0( - len, - ); - } - - late final _new_uint_8_list_0Ptr = - _lookup Function(ffi.Int32)>>('new_uint_8_list_0'); - late final _new_uint_8_list_0 = - _new_uint_8_list_0Ptr.asFunction Function(int)>(); - - ffi.Pointer inflate_NodeConfig_Greenlight() { - return _inflate_NodeConfig_Greenlight(); - } - - late final _inflate_NodeConfig_GreenlightPtr = - _lookup Function()>>('inflate_NodeConfig_Greenlight'); - late final _inflate_NodeConfig_Greenlight = - _inflate_NodeConfig_GreenlightPtr.asFunction Function()>(); - - ffi.Pointer inflate_ReportIssueRequest_PaymentFailure() { - return _inflate_ReportIssueRequest_PaymentFailure(); - } - - late final _inflate_ReportIssueRequest_PaymentFailurePtr = - _lookup Function()>>( - 'inflate_ReportIssueRequest_PaymentFailure'); - late final _inflate_ReportIssueRequest_PaymentFailure = _inflate_ReportIssueRequest_PaymentFailurePtr - .asFunction Function()>(); - - void free_WireSyncReturn( - WireSyncReturn ptr, - ) { - return _free_WireSyncReturn( - ptr, - ); - } - - late final _free_WireSyncReturnPtr = - _lookup>('free_WireSyncReturn'); - late final _free_WireSyncReturn = _free_WireSyncReturnPtr.asFunction(); -} - -final class _Dart_Handle extends ffi.Opaque {} - -final class wire_uint_8_list extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_GreenlightCredentials extends ffi.Struct { - external ffi.Pointer developer_key; - - external ffi.Pointer developer_cert; -} - -final class wire_GreenlightNodeConfig extends ffi.Struct { - external ffi.Pointer partner_credentials; - - external ffi.Pointer invite_code; -} - -final class wire_NodeConfig_Greenlight extends ffi.Struct { - external ffi.Pointer config; -} - -final class NodeConfigKind extends ffi.Union { - external ffi.Pointer Greenlight; -} - -final class wire_NodeConfig extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_Config extends ffi.Struct { - external ffi.Pointer breezserver; - - external ffi.Pointer chainnotifier_url; - - external ffi.Pointer mempoolspace_url; - - external ffi.Pointer working_dir; - - @ffi.Int32() - external int network; - - @ffi.Uint32() - external int payment_timeout_sec; - - external ffi.Pointer default_lsp_id; - - external ffi.Pointer api_key; - - @ffi.Double() - external double maxfee_percent; - - @ffi.Uint64() - external int exemptfee_msat; - - external wire_NodeConfig node_config; -} - -final class wire_ConnectRequest extends ffi.Struct { - external wire_Config config; - - external ffi.Pointer seed; - - external ffi.Pointer restore_only; -} - -final class wire_ConfigureNodeRequest extends ffi.Struct { - external ffi.Pointer close_to_address; -} - -final class wire_SignMessageRequest extends ffi.Struct { - external ffi.Pointer message; -} - -final class wire_CheckMessageRequest extends ffi.Struct { - external ffi.Pointer message; - - external ffi.Pointer pubkey; - - external ffi.Pointer signature; -} - -final class wire_StaticBackupRequest extends ffi.Struct { - external ffi.Pointer working_dir; -} - -final class wire_list_payment_type_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_MetadataFilter extends ffi.Struct { - external ffi.Pointer json_path; - - external ffi.Pointer json_value; -} - -final class wire_list_metadata_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_ListPaymentsRequest extends ffi.Struct { - external ffi.Pointer filters; - - external ffi.Pointer metadata_filters; - - external ffi.Pointer from_timestamp; - - external ffi.Pointer to_timestamp; - - external ffi.Pointer include_failures; - - external ffi.Pointer offset; - - external ffi.Pointer limit; -} - -final class wire_SendPaymentRequest extends ffi.Struct { - external ffi.Pointer bolt11; - - @ffi.Bool() - external bool use_trampoline; - - external ffi.Pointer amount_msat; - - external ffi.Pointer label; -} - -final class wire_TlvEntry extends ffi.Struct { - @ffi.Uint64() - external int field_number; - - external ffi.Pointer value; -} - -final class wire_list_tlv_entry extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_SendSpontaneousPaymentRequest extends ffi.Struct { - external ffi.Pointer node_id; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer extra_tlvs; - - external ffi.Pointer label; -} - -final class wire_OpeningFeeParams extends ffi.Struct { - @ffi.Uint64() - external int min_msat; - - @ffi.Uint32() - external int proportional; - - external ffi.Pointer valid_until; - - @ffi.Uint32() - external int max_idle_time; - - @ffi.Uint32() - external int max_client_to_self_delay; - - external ffi.Pointer promise; -} - -final class wire_ReceivePaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; - - external ffi.Pointer preimage; - - external ffi.Pointer opening_fee_params; - - external ffi.Pointer use_description_hash; - - external ffi.Pointer expiry; - - external ffi.Pointer cltv; -} - -final class wire_LnUrlPayRequestData extends ffi.Struct { - external ffi.Pointer callback; - - @ffi.Uint64() - external int min_sendable; - - @ffi.Uint64() - external int max_sendable; - - external ffi.Pointer metadata_str; - - @ffi.Uint16() - external int comment_allowed; - - external ffi.Pointer domain; - - @ffi.Bool() - external bool allows_nostr; - - external ffi.Pointer nostr_pubkey; - - external ffi.Pointer ln_address; -} - -final class wire_LnUrlPayRequest extends ffi.Struct { - external wire_LnUrlPayRequestData data; - - @ffi.Uint64() - external int amount_msat; - - @ffi.Bool() - external bool use_trampoline; - - external ffi.Pointer comment; - - external ffi.Pointer payment_label; - - external ffi.Pointer validate_success_action_url; -} - -final class wire_LnUrlWithdrawRequestData extends ffi.Struct { - external ffi.Pointer callback; - - external ffi.Pointer k1; - - external ffi.Pointer default_description; - - @ffi.Uint64() - external int min_withdrawable; - - @ffi.Uint64() - external int max_withdrawable; -} - -final class wire_LnUrlWithdrawRequest extends ffi.Struct { - external wire_LnUrlWithdrawRequestData data; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; -} - -final class wire_LnUrlAuthRequestData extends ffi.Struct { - external ffi.Pointer k1; - - external ffi.Pointer action; - - external ffi.Pointer domain; - - external ffi.Pointer url; -} - -final class wire_ReportPaymentFailureDetails extends ffi.Struct { - external ffi.Pointer payment_hash; - - external ffi.Pointer comment; -} - -final class wire_ReportIssueRequest_PaymentFailure extends ffi.Struct { - external ffi.Pointer data; -} - -final class ReportIssueRequestKind extends ffi.Union { - external ffi.Pointer PaymentFailure; -} - -final class wire_ReportIssueRequest extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_SendOnchainRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - external ffi.Pointer onchain_recipient_address; - - external ffi.Pointer pair_hash; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareOnchainPaymentResponse extends ffi.Struct { - external ffi.Pointer fees_hash; - - @ffi.Double() - external double fees_percentage; - - @ffi.Uint64() - external int fees_lockup; - - @ffi.Uint64() - external int fees_claim; - - @ffi.Uint64() - external int sender_amount_sat; - - @ffi.Uint64() - external int recipient_amount_sat; - - @ffi.Uint64() - external int total_fees; -} - -final class wire_PayOnchainRequest extends ffi.Struct { - external ffi.Pointer recipient_address; - - external wire_PrepareOnchainPaymentResponse prepare_res; -} - -final class wire_ReceiveOnchainRequest extends ffi.Struct { - external ffi.Pointer opening_fee_params; -} - -final class wire_BuyBitcoinRequest extends ffi.Struct { - @ffi.Int32() - external int provider; - - external ffi.Pointer opening_fee_params; - - external ffi.Pointer redirect_url; -} - -final class wire_RedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_RefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_OpenChannelFeeRequest extends ffi.Struct { - external ffi.Pointer amount_msat; - - external ffi.Pointer expiry; -} - -final class wire_ReverseSwapFeesRequest extends ffi.Struct { - external ffi.Pointer send_amount_sat; - - external ffi.Pointer claim_tx_feerate; -} - -final class wire_PrepareOnchainPaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - @ffi.Int32() - external int amount_type; - - @ffi.Uint32() - external int claim_tx_feerate; -} - -typedef DartPostCObjectFnType - = ffi.Pointer message)>>; -typedef DartPort = ffi.Int64; - -const int SWAP_PAYMENT_FEE_EXPIRY_SECONDS = 172800; - -const int INVOICE_PAYMENT_FEE_EXPIRY_SECONDS = 3600; - -const int ESTIMATED_CLAIM_TX_VSIZE = 138; - -const int ESTIMATED_LOCKUP_TX_VSIZE = 153; - -const int MOCK_REVERSE_SWAP_MIN = 50000; - -const int MOCK_REVERSE_SWAP_MAX = 1000000; diff --git a/libs/sdk-flutter/lib/bridge_generated.freezed.dart b/libs/sdk-flutter/lib/bridge_generated.freezed.dart deleted file mode 100644 index 15ddfc256..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.freezed.dart +++ /dev/null @@ -1,6327 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'bridge_generated.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$AesSuccessActionDataResult { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AesSuccessActionDataResultCopyWith<$Res> { - factory $AesSuccessActionDataResultCopyWith( - AesSuccessActionDataResult value, $Res Function(AesSuccessActionDataResult) then) = - _$AesSuccessActionDataResultCopyWithImpl<$Res, AesSuccessActionDataResult>; -} - -/// @nodoc -class _$AesSuccessActionDataResultCopyWithImpl<$Res, $Val extends AesSuccessActionDataResult> - implements $AesSuccessActionDataResultCopyWith<$Res> { - _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( - _$AesSuccessActionDataResult_DecryptedImpl value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataDecrypted data}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_DecryptedImpl> - implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl(_$AesSuccessActionDataResult_DecryptedImpl _value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$AesSuccessActionDataResult_DecryptedImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataDecrypted, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_DecryptedImpl implements AesSuccessActionDataResult_Decrypted { - const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}); - - @override - final AesSuccessActionDataDecrypted data; - - @override - String toString() { - return 'AesSuccessActionDataResult.decrypted(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_DecryptedImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< - _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return decrypted(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return decrypted?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return decrypted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return decrypted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_Decrypted implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_Decrypted({required final AesSuccessActionDataDecrypted data}) = - _$AesSuccessActionDataResult_DecryptedImpl; - - AesSuccessActionDataDecrypted get data; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_DecryptedImplCopyWith<_$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( - _$AesSuccessActionDataResult_ErrorStatusImpl value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({String reason}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, _$AesSuccessActionDataResult_ErrorStatusImpl> - implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( - _$AesSuccessActionDataResult_ErrorStatusImpl _value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? reason = null, - }) { - return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_ErrorStatusImpl implements AesSuccessActionDataResult_ErrorStatus { - const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}); - - @override - final String reason; - - @override - String toString() { - return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_ErrorStatusImpl && - (identical(other.reason, reason) || other.reason == reason)); - } - - @override - int get hashCode => Object.hash(runtimeType, reason); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< - _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return errorStatus(reason); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return errorStatus?.call(reason); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(reason); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_ErrorStatus implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_ErrorStatus({required final String reason}) = - _$AesSuccessActionDataResult_ErrorStatusImpl; - - String get reason; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<_$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BreezEvent { - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BreezEventCopyWith<$Res> { - factory $BreezEventCopyWith(BreezEvent value, $Res Function(BreezEvent) then) = - _$BreezEventCopyWithImpl<$Res, BreezEvent>; -} - -/// @nodoc -class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> implements $BreezEventCopyWith<$Res> { - _$BreezEventCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { - factory _$$BreezEvent_NewBlockImplCopyWith( - _$BreezEvent_NewBlockImpl value, $Res Function(_$BreezEvent_NewBlockImpl) then) = - __$$BreezEvent_NewBlockImplCopyWithImpl<$Res>; - @useResult - $Res call({int block}); -} - -/// @nodoc -class __$$BreezEvent_NewBlockImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_NewBlockImpl> - implements _$$BreezEvent_NewBlockImplCopyWith<$Res> { - __$$BreezEvent_NewBlockImplCopyWithImpl( - _$BreezEvent_NewBlockImpl _value, $Res Function(_$BreezEvent_NewBlockImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? block = null, - }) { - return _then(_$BreezEvent_NewBlockImpl( - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$BreezEvent_NewBlockImpl implements BreezEvent_NewBlock { - const _$BreezEvent_NewBlockImpl({required this.block}); - - @override - final int block; - - @override - String toString() { - return 'BreezEvent.newBlock(block: $block)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_NewBlockImpl && - (identical(other.block, block) || other.block == block)); - } - - @override - int get hashCode => Object.hash(runtimeType, block); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return newBlock(block); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return newBlock?.call(block); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(block); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return newBlock(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return newBlock?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(this); - } - return orElse(); - } -} - -abstract class BreezEvent_NewBlock implements BreezEvent { - const factory BreezEvent_NewBlock({required final int block}) = _$BreezEvent_NewBlockImpl; - - int get block; - @JsonKey(ignore: true) - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - factory _$$BreezEvent_InvoicePaidImplCopyWith( - _$BreezEvent_InvoicePaidImpl value, $Res Function(_$BreezEvent_InvoicePaidImpl) then) = - __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res>; - @useResult - $Res call({InvoicePaidDetails details}); -} - -/// @nodoc -class __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_InvoicePaidImpl> - implements _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - __$$BreezEvent_InvoicePaidImplCopyWithImpl( - _$BreezEvent_InvoicePaidImpl _value, $Res Function(_$BreezEvent_InvoicePaidImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_InvoicePaidImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as InvoicePaidDetails, - )); - } -} - -/// @nodoc - -class _$BreezEvent_InvoicePaidImpl implements BreezEvent_InvoicePaid { - const _$BreezEvent_InvoicePaidImpl({required this.details}); - - @override - final InvoicePaidDetails details; - - @override - String toString() { - return 'BreezEvent.invoicePaid(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_InvoicePaidImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => - __$$BreezEvent_InvoicePaidImplCopyWithImpl<_$BreezEvent_InvoicePaidImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return invoicePaid(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return invoicePaid?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return invoicePaid(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return invoicePaid?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(this); - } - return orElse(); - } -} - -abstract class BreezEvent_InvoicePaid implements BreezEvent { - const factory BreezEvent_InvoicePaid({required final InvoicePaidDetails details}) = - _$BreezEvent_InvoicePaidImpl; - - InvoicePaidDetails get details; - @JsonKey(ignore: true) - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { - factory _$$BreezEvent_SyncedImplCopyWith( - _$BreezEvent_SyncedImpl value, $Res Function(_$BreezEvent_SyncedImpl) then) = - __$$BreezEvent_SyncedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_SyncedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SyncedImpl> - implements _$$BreezEvent_SyncedImplCopyWith<$Res> { - __$$BreezEvent_SyncedImplCopyWithImpl( - _$BreezEvent_SyncedImpl _value, $Res Function(_$BreezEvent_SyncedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_SyncedImpl implements BreezEvent_Synced { - const _$BreezEvent_SyncedImpl(); - - @override - String toString() { - return 'BreezEvent.synced()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return synced(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return synced?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return synced(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return synced?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(this); - } - return orElse(); - } -} - -abstract class BreezEvent_Synced implements BreezEvent { - const factory BreezEvent_Synced() = _$BreezEvent_SyncedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentSucceedImplCopyWith( - _$BreezEvent_PaymentSucceedImpl value, $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = - __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res>; - @useResult - $Res call({Payment details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentSucceedImpl> - implements _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - __$$BreezEvent_PaymentSucceedImplCopyWithImpl( - _$BreezEvent_PaymentSucceedImpl _value, $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentSucceedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as Payment, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentSucceedImpl implements BreezEvent_PaymentSucceed { - const _$BreezEvent_PaymentSucceedImpl({required this.details}); - - @override - final Payment details; - - @override - String toString() { - return 'BreezEvent.paymentSucceed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentSucceedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => - __$$BreezEvent_PaymentSucceedImplCopyWithImpl<_$BreezEvent_PaymentSucceedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentSucceed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentSucceed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentSucceed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentSucceed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentSucceed implements BreezEvent { - const factory BreezEvent_PaymentSucceed({required final Payment details}) = _$BreezEvent_PaymentSucceedImpl; - - Payment get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentFailedImplCopyWith( - _$BreezEvent_PaymentFailedImpl value, $Res Function(_$BreezEvent_PaymentFailedImpl) then) = - __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({PaymentFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentFailedImpl> - implements _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - __$$BreezEvent_PaymentFailedImplCopyWithImpl( - _$BreezEvent_PaymentFailedImpl _value, $Res Function(_$BreezEvent_PaymentFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as PaymentFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentFailedImpl implements BreezEvent_PaymentFailed { - const _$BreezEvent_PaymentFailedImpl({required this.details}); - - @override - final PaymentFailedData details; - - @override - String toString() { - return 'BreezEvent.paymentFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => - __$$BreezEvent_PaymentFailedImplCopyWithImpl<_$BreezEvent_PaymentFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentFailed implements BreezEvent { - const factory BreezEvent_PaymentFailed({required final PaymentFailedData details}) = - _$BreezEvent_PaymentFailedImpl; - - PaymentFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupStartedImplCopyWith( - _$BreezEvent_BackupStartedImpl value, $Res Function(_$BreezEvent_BackupStartedImpl) then) = - __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupStartedImpl> - implements _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - __$$BreezEvent_BackupStartedImplCopyWithImpl( - _$BreezEvent_BackupStartedImpl _value, $Res Function(_$BreezEvent_BackupStartedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupStartedImpl implements BreezEvent_BackupStarted { - const _$BreezEvent_BackupStartedImpl(); - - @override - String toString() { - return 'BreezEvent.backupStarted()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_BackupStartedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupStarted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupStarted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupStarted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupStarted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupStarted implements BreezEvent { - const factory BreezEvent_BackupStarted() = _$BreezEvent_BackupStartedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - factory _$$BreezEvent_BackupSucceededImplCopyWith( - _$BreezEvent_BackupSucceededImpl value, $Res Function(_$BreezEvent_BackupSucceededImpl) then) = - __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupSucceededImpl> - implements _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - __$$BreezEvent_BackupSucceededImplCopyWithImpl( - _$BreezEvent_BackupSucceededImpl _value, $Res Function(_$BreezEvent_BackupSucceededImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupSucceededImpl implements BreezEvent_BackupSucceeded { - const _$BreezEvent_BackupSucceededImpl(); - - @override - String toString() { - return 'BreezEvent.backupSucceeded()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_BackupSucceededImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupSucceeded(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupSucceeded?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupSucceeded(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupSucceeded?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupSucceeded implements BreezEvent { - const factory BreezEvent_BackupSucceeded() = _$BreezEvent_BackupSucceededImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupFailedImplCopyWith( - _$BreezEvent_BackupFailedImpl value, $Res Function(_$BreezEvent_BackupFailedImpl) then) = - __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({BackupFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupFailedImpl> - implements _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - __$$BreezEvent_BackupFailedImplCopyWithImpl( - _$BreezEvent_BackupFailedImpl _value, $Res Function(_$BreezEvent_BackupFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_BackupFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as BackupFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_BackupFailedImpl implements BreezEvent_BackupFailed { - const _$BreezEvent_BackupFailedImpl({required this.details}); - - @override - final BackupFailedData details; - - @override - String toString() { - return 'BreezEvent.backupFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => - __$$BreezEvent_BackupFailedImplCopyWithImpl<_$BreezEvent_BackupFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupFailed implements BreezEvent { - const factory BreezEvent_BackupFailed({required final BackupFailedData details}) = - _$BreezEvent_BackupFailedImpl; - - BackupFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { - factory _$$BreezEvent_ReverseSwapUpdatedImplCopyWith(_$BreezEvent_ReverseSwapUpdatedImpl value, - $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) then) = - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res>; - @useResult - $Res call({ReverseSwapInfo details}); -} - -/// @nodoc -class __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_ReverseSwapUpdatedImpl> - implements _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl( - _$BreezEvent_ReverseSwapUpdatedImpl _value, $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_ReverseSwapUpdatedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as ReverseSwapInfo, - )); - } -} - -/// @nodoc - -class _$BreezEvent_ReverseSwapUpdatedImpl implements BreezEvent_ReverseSwapUpdated { - const _$BreezEvent_ReverseSwapUpdatedImpl({required this.details}); - - @override - final ReverseSwapInfo details; - - @override - String toString() { - return 'BreezEvent.reverseSwapUpdated(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_ReverseSwapUpdatedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => - __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<_$BreezEvent_ReverseSwapUpdatedImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return reverseSwapUpdated(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return reverseSwapUpdated?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (reverseSwapUpdated != null) { - return reverseSwapUpdated(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return reverseSwapUpdated(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return reverseSwapUpdated?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (reverseSwapUpdated != null) { - return reverseSwapUpdated(this); - } - return orElse(); - } -} - -abstract class BreezEvent_ReverseSwapUpdated implements BreezEvent { - const factory BreezEvent_ReverseSwapUpdated({required final ReverseSwapInfo details}) = - _$BreezEvent_ReverseSwapUpdatedImpl; - - ReverseSwapInfo get details; - @JsonKey(ignore: true) - _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - factory _$$BreezEvent_SwapUpdatedImplCopyWith( - _$BreezEvent_SwapUpdatedImpl value, $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = - __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res>; - @useResult - $Res call({SwapInfo details}); -} - -/// @nodoc -class __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SwapUpdatedImpl> - implements _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - __$$BreezEvent_SwapUpdatedImplCopyWithImpl( - _$BreezEvent_SwapUpdatedImpl _value, $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_SwapUpdatedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as SwapInfo, - )); - } -} - -/// @nodoc - -class _$BreezEvent_SwapUpdatedImpl implements BreezEvent_SwapUpdated { - const _$BreezEvent_SwapUpdatedImpl({required this.details}); - - @override - final SwapInfo details; - - @override - String toString() { - return 'BreezEvent.swapUpdated(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_SwapUpdatedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => - __$$BreezEvent_SwapUpdatedImplCopyWithImpl<_$BreezEvent_SwapUpdatedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return swapUpdated(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return swapUpdated?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return swapUpdated(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return swapUpdated?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(this); - } - return orElse(); - } -} - -abstract class BreezEvent_SwapUpdated implements BreezEvent { - const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = _$BreezEvent_SwapUpdatedImpl; - - SwapInfo get details; - @JsonKey(ignore: true) - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$InputType { - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $InputTypeCopyWith<$Res> { - factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = - _$InputTypeCopyWithImpl<$Res, InputType>; -} - -/// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> implements $InputTypeCopyWith<$Res> { - _$InputTypeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { - factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, $Res Function(_$InputType_BitcoinAddressImpl) then) = - __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; - @useResult - $Res call({BitcoinAddressData address}); -} - -/// @nodoc -class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> - implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { - __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, $Res Function(_$InputType_BitcoinAddressImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_$InputType_BitcoinAddressImpl( - address: null == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as BitcoinAddressData, - )); - } -} - -/// @nodoc - -class _$InputType_BitcoinAddressImpl implements InputType_BitcoinAddress { - const _$InputType_BitcoinAddressImpl({required this.address}); - - @override - final BitcoinAddressData address; - - @override - String toString() { - return 'InputType.bitcoinAddress(address: $address)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_BitcoinAddressImpl && - (identical(other.address, address) || other.address == address)); - } - - @override - int get hashCode => Object.hash(runtimeType, address); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - __$$InputType_BitcoinAddressImplCopyWithImpl<_$InputType_BitcoinAddressImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bitcoinAddress(address); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bitcoinAddress?.call(address); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(address); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bitcoinAddress(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bitcoinAddress?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(this); - } - return orElse(); - } -} - -abstract class InputType_BitcoinAddress implements InputType { - const factory InputType_BitcoinAddress({required final BitcoinAddressData address}) = - _$InputType_BitcoinAddressImpl; - - BitcoinAddressData get address; - @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith( - _$InputType_Bolt11Impl value, $Res Function(_$InputType_Bolt11Impl) then) = - __$$InputType_Bolt11ImplCopyWithImpl<$Res>; - @useResult - $Res call({LNInvoice invoice}); -} - -/// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> - implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl( - _$InputType_Bolt11Impl _value, $Res Function(_$InputType_Bolt11Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? invoice = null, - }) { - return _then(_$InputType_Bolt11Impl( - invoice: null == invoice - ? _value.invoice - : invoice // ignore: cast_nullable_to_non_nullable - as LNInvoice, - )); - } -} - -/// @nodoc - -class _$InputType_Bolt11Impl implements InputType_Bolt11 { - const _$InputType_Bolt11Impl({required this.invoice}); - - @override - final LNInvoice invoice; - - @override - String toString() { - return 'InputType.bolt11(invoice: $invoice)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_Bolt11Impl && - (identical(other.invoice, invoice) || other.invoice == invoice)); - } - - @override - int get hashCode => Object.hash(runtimeType, invoice); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bolt11(invoice); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bolt11?.call(invoice); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(invoice); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bolt11(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bolt11?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(this); - } - return orElse(); - } -} - -abstract class InputType_Bolt11 implements InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = _$InputType_Bolt11Impl; - - LNInvoice get invoice; - @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith( - _$InputType_NodeIdImpl value, $Res Function(_$InputType_NodeIdImpl) then) = - __$$InputType_NodeIdImplCopyWithImpl<$Res>; - @useResult - $Res call({String nodeId}); -} - -/// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> - implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl( - _$InputType_NodeIdImpl _value, $Res Function(_$InputType_NodeIdImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? nodeId = null, - }) { - return _then(_$InputType_NodeIdImpl( - nodeId: null == nodeId - ? _value.nodeId - : nodeId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_NodeIdImpl implements InputType_NodeId { - const _$InputType_NodeIdImpl({required this.nodeId}); - - @override - final String nodeId; - - @override - String toString() { - return 'InputType.nodeId(nodeId: $nodeId)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_NodeIdImpl && - (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); - } - - @override - int get hashCode => Object.hash(runtimeType, nodeId); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return nodeId(this.nodeId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return nodeId?.call(this.nodeId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this.nodeId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return nodeId(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return nodeId?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this); - } - return orElse(); - } -} - -abstract class InputType_NodeId implements InputType { - const factory InputType_NodeId({required final String nodeId}) = _$InputType_NodeIdImpl; - - String get nodeId; - @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith(_$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = - __$$InputType_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({String url}); -} - -/// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> - implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl(_$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - }) { - return _then(_$InputType_UrlImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_UrlImpl implements InputType_Url { - const _$InputType_UrlImpl({required this.url}); - - @override - final String url; - - @override - String toString() { - return 'InputType.url(url: $url)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_UrlImpl && - (identical(other.url, url) || other.url == url)); - } - - @override - int get hashCode => Object.hash(runtimeType, url); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return url(this.url); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return url?.call(this.url); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this.url); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class InputType_Url implements InputType { - const factory InputType_Url({required final String url}) = _$InputType_UrlImpl; - - String get url; - @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith( - _$InputType_LnUrlPayImpl value, $Res Function(_$InputType_LnUrlPayImpl) then) = - __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> - implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl( - _$InputType_LnUrlPayImpl _value, $Res Function(_$InputType_LnUrlPayImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlPayImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlPayImpl implements InputType_LnUrlPay { - const _$InputType_LnUrlPayImpl({required this.data}); - - @override - final LnUrlPayRequestData data; - - @override - String toString() { - return 'InputType.lnUrlPay(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlPayImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlPay(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlPay?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlPay(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlPay?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlPay implements InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = _$InputType_LnUrlPayImpl; - - LnUrlPayRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, $Res Function(_$InputType_LnUrlWithdrawImpl) then) = - __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> - implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, $Res Function(_$InputType_LnUrlWithdrawImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlWithdrawImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlWithdrawImpl implements InputType_LnUrlWithdraw { - const _$InputType_LnUrlWithdrawImpl({required this.data}); - - @override - final LnUrlWithdrawRequestData data; - - @override - String toString() { - return 'InputType.lnUrlWithdraw(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlWithdrawImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - __$$InputType_LnUrlWithdrawImplCopyWithImpl<_$InputType_LnUrlWithdrawImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlWithdraw(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlWithdraw?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlWithdraw(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlWithdraw?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlWithdraw implements InputType { - const factory InputType_LnUrlWithdraw({required final LnUrlWithdrawRequestData data}) = - _$InputType_LnUrlWithdrawImpl; - - LnUrlWithdrawRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith( - _$InputType_LnUrlAuthImpl value, $Res Function(_$InputType_LnUrlAuthImpl) then) = - __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlAuthRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> - implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl( - _$InputType_LnUrlAuthImpl _value, $Res Function(_$InputType_LnUrlAuthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlAuthImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlAuthRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlAuthImpl implements InputType_LnUrlAuth { - const _$InputType_LnUrlAuthImpl({required this.data}); - - @override - final LnUrlAuthRequestData data; - - @override - String toString() { - return 'InputType.lnUrlAuth(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlAuthImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlAuth(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlAuth?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlAuth(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlAuth?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlAuth implements InputType { - const factory InputType_LnUrlAuth({required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; - - LnUrlAuthRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith( - _$InputType_LnUrlErrorImpl value, $Res Function(_$InputType_LnUrlErrorImpl) then) = - __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> - implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl( - _$InputType_LnUrlErrorImpl _value, $Res Function(_$InputType_LnUrlErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlErrorImpl implements InputType_LnUrlError { - const _$InputType_LnUrlErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'InputType.lnUrlError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlError implements InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = _$InputType_LnUrlErrorImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlCallbackStatus { - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlCallbackStatusCopyWith<$Res> { - factory $LnUrlCallbackStatusCopyWith(LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = - _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; -} - -/// @nodoc -class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> - implements $LnUrlCallbackStatusCopyWith<$Res> { - _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_OkImplCopyWith( - _$LnUrlCallbackStatus_OkImpl value, $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = - __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_OkImpl> - implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_OkImplCopyWithImpl( - _$LnUrlCallbackStatus_OkImpl _value, $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$LnUrlCallbackStatus_OkImpl implements LnUrlCallbackStatus_Ok { - const _$LnUrlCallbackStatus_OkImpl(); - - @override - String toString() { - return 'LnUrlCallbackStatus.ok()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$LnUrlCallbackStatus_OkImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_Ok implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith(_$LnUrlCallbackStatus_ErrorStatusImpl value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, _$LnUrlCallbackStatus_ErrorStatusImpl> - implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl(_$LnUrlCallbackStatus_ErrorStatusImpl _value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlCallbackStatus_ErrorStatusImpl implements LnUrlCallbackStatus_ErrorStatus { - const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlCallbackStatus.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<_$LnUrlCallbackStatus_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_ErrorStatus implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlCallbackStatus_ErrorStatusImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<_$LnUrlCallbackStatus_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlPayResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlPayResultCopyWith<$Res> { - factory $LnUrlPayResultCopyWith(LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = - _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; -} - -/// @nodoc -class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> - implements $LnUrlPayResultCopyWith<$Res> { - _$LnUrlPayResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith(_$LnUrlPayResult_EndpointSuccessImpl value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPaySuccessData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointSuccessImpl> - implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( - _$LnUrlPayResult_EndpointSuccessImpl _value, $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointSuccessImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPaySuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointSuccessImpl implements LnUrlPayResult_EndpointSuccess { - const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}); - - @override - final LnUrlPaySuccessData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointSuccess(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointSuccessImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<_$LnUrlPayResult_EndpointSuccessImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointSuccess(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointSuccess?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointSuccess(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointSuccess?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointSuccess implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointSuccess({required final LnUrlPaySuccessData data}) = - _$LnUrlPayResult_EndpointSuccessImpl; - - @override - LnUrlPaySuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointSuccessImplCopyWith<_$LnUrlPayResult_EndpointSuccessImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( - _$LnUrlPayResult_EndpointErrorImpl value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_EndpointErrorImpl> - implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( - _$LnUrlPayResult_EndpointErrorImpl _value, $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointErrorImpl implements LnUrlPayResult_EndpointError { - const _$LnUrlPayResult_EndpointErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<_$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointError implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointError({required final LnUrlErrorData data}) = - _$LnUrlPayResult_EndpointErrorImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointErrorImplCopyWith<_$LnUrlPayResult_EndpointErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_PayErrorImplCopyWith( - _$LnUrlPayResult_PayErrorImpl value, $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> - implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_PayErrorImplCopyWithImpl( - _$LnUrlPayResult_PayErrorImpl _value, $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_PayErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_PayErrorImpl implements LnUrlPayResult_PayError { - const _$LnUrlPayResult_PayErrorImpl({required this.data}); - - @override - final LnUrlPayErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.payError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_PayErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<_$LnUrlPayResult_PayErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return payError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return payError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return payError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return payError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_PayError implements LnUrlPayResult { - const factory LnUrlPayResult_PayError({required final LnUrlPayErrorData data}) = - _$LnUrlPayResult_PayErrorImpl; - - @override - LnUrlPayErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlWithdrawResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlWithdrawResultCopyWith<$Res> { - factory $LnUrlWithdrawResultCopyWith(LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = - _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; -} - -/// @nodoc -class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> - implements $LnUrlWithdrawResultCopyWith<$Res> { - _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_OkImplCopyWith( - _$LnUrlWithdrawResult_OkImpl value, $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_OkImpl> - implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_OkImplCopyWithImpl( - _$LnUrlWithdrawResult_OkImpl _value, $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_OkImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_OkImpl implements LnUrlWithdrawResult_Ok { - const _$LnUrlWithdrawResult_OkImpl({required this.data}); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.ok(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_OkImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<_$LnUrlWithdrawResult_OkImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Ok implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Ok({required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_OkImpl; - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_TimeoutImplCopyWith( - _$LnUrlWithdrawResult_TimeoutImpl value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) then) = - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_TimeoutImpl> - implements _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl( - _$LnUrlWithdrawResult_TimeoutImpl _value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_TimeoutImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_TimeoutImpl implements LnUrlWithdrawResult_Timeout { - const _$LnUrlWithdrawResult_TimeoutImpl({required this.data}); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.timeout(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_TimeoutImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => - __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<_$LnUrlWithdrawResult_TimeoutImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return timeout(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return timeout?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (timeout != null) { - return timeout(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return timeout(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return timeout?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (timeout != null) { - return timeout(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Timeout implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Timeout({required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_TimeoutImpl; - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_ErrorStatusImpl> - implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl(_$LnUrlWithdrawResult_ErrorStatusImpl _value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_ErrorStatusImpl implements LnUrlWithdrawResult_ErrorStatus { - const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<_$LnUrlWithdrawResult_ErrorStatusImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlWithdrawSuccessData data) timeout, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlWithdrawSuccessData data)? timeout, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlWithdrawSuccessData data)? timeout, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_ErrorStatus implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_ErrorStatus({required final LnUrlErrorData data}) = - _$LnUrlWithdrawResult_ErrorStatusImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<_$LnUrlWithdrawResult_ErrorStatusImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeConfig { - GreenlightNodeConfig get config => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeConfigCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeConfigCopyWith<$Res> { - factory $NodeConfigCopyWith(NodeConfig value, $Res Function(NodeConfig) then) = - _$NodeConfigCopyWithImpl<$Res, NodeConfig>; - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> implements $NodeConfigCopyWith<$Res> { - _$NodeConfigCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_value.copyWith( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> implements $NodeConfigCopyWith<$Res> { - factory _$$NodeConfig_GreenlightImplCopyWith( - _$NodeConfig_GreenlightImpl value, $Res Function(_$NodeConfig_GreenlightImpl) then) = - __$$NodeConfig_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class __$$NodeConfig_GreenlightImplCopyWithImpl<$Res> - extends _$NodeConfigCopyWithImpl<$Res, _$NodeConfig_GreenlightImpl> - implements _$$NodeConfig_GreenlightImplCopyWith<$Res> { - __$$NodeConfig_GreenlightImplCopyWithImpl( - _$NodeConfig_GreenlightImpl _value, $Res Function(_$NodeConfig_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$NodeConfig_GreenlightImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - )); - } -} - -/// @nodoc - -class _$NodeConfig_GreenlightImpl implements NodeConfig_Greenlight { - const _$NodeConfig_GreenlightImpl({required this.config}); - - @override - final GreenlightNodeConfig config; - - @override - String toString() { - return 'NodeConfig.greenlight(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeConfig_GreenlightImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => - __$$NodeConfig_GreenlightImplCopyWithImpl<_$NodeConfig_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) { - return greenlight(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) { - return greenlight?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeConfig_Greenlight implements NodeConfig { - const factory NodeConfig_Greenlight({required final GreenlightNodeConfig config}) = - _$NodeConfig_GreenlightImpl; - - @override - GreenlightNodeConfig get config; - @override - @JsonKey(ignore: true) - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeCredentials { - GreenlightDeviceCredentials get credentials => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightDeviceCredentials credentials) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightDeviceCredentials credentials)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeCredentialsCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeCredentialsCopyWith<$Res> { - factory $NodeCredentialsCopyWith(NodeCredentials value, $Res Function(NodeCredentials) then) = - _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; - @useResult - $Res call({GreenlightDeviceCredentials credentials}); -} - -/// @nodoc -class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> - implements $NodeCredentialsCopyWith<$Res> { - _$NodeCredentialsCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? credentials = null, - }) { - return _then(_value.copyWith( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightDeviceCredentials, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> implements $NodeCredentialsCopyWith<$Res> { - factory _$$NodeCredentials_GreenlightImplCopyWith( - _$NodeCredentials_GreenlightImpl value, $Res Function(_$NodeCredentials_GreenlightImpl) then) = - __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightDeviceCredentials credentials}); -} - -/// @nodoc -class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> - extends _$NodeCredentialsCopyWithImpl<$Res, _$NodeCredentials_GreenlightImpl> - implements _$$NodeCredentials_GreenlightImplCopyWith<$Res> { - __$$NodeCredentials_GreenlightImplCopyWithImpl( - _$NodeCredentials_GreenlightImpl _value, $Res Function(_$NodeCredentials_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? credentials = null, - }) { - return _then(_$NodeCredentials_GreenlightImpl( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightDeviceCredentials, - )); - } -} - -/// @nodoc - -class _$NodeCredentials_GreenlightImpl implements NodeCredentials_Greenlight { - const _$NodeCredentials_GreenlightImpl({required this.credentials}); - - @override - final GreenlightDeviceCredentials credentials; - - @override - String toString() { - return 'NodeCredentials.greenlight(credentials: $credentials)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeCredentials_GreenlightImpl && - (identical(other.credentials, credentials) || other.credentials == credentials)); - } - - @override - int get hashCode => Object.hash(runtimeType, credentials); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => - __$$NodeCredentials_GreenlightImplCopyWithImpl<_$NodeCredentials_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightDeviceCredentials credentials) greenlight, - }) { - return greenlight(credentials); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightDeviceCredentials credentials)? greenlight, - }) { - return greenlight?.call(credentials); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightDeviceCredentials credentials)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(credentials); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeCredentials_Greenlight implements NodeCredentials { - const factory NodeCredentials_Greenlight({required final GreenlightDeviceCredentials credentials}) = - _$NodeCredentials_GreenlightImpl; - - @override - GreenlightDeviceCredentials get credentials; - @override - @JsonKey(ignore: true) - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$PaymentDetails { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PaymentDetailsCopyWith<$Res> { - factory $PaymentDetailsCopyWith(PaymentDetails value, $Res Function(PaymentDetails) then) = - _$PaymentDetailsCopyWithImpl<$Res, PaymentDetails>; -} - -/// @nodoc -class _$PaymentDetailsCopyWithImpl<$Res, $Val extends PaymentDetails> - implements $PaymentDetailsCopyWith<$Res> { - _$PaymentDetailsCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { - factory _$$PaymentDetails_LnImplCopyWith( - _$PaymentDetails_LnImpl value, $Res Function(_$PaymentDetails_LnImpl) then) = - __$$PaymentDetails_LnImplCopyWithImpl<$Res>; - @useResult - $Res call({LnPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_LnImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_LnImpl> - implements _$$PaymentDetails_LnImplCopyWith<$Res> { - __$$PaymentDetails_LnImplCopyWithImpl( - _$PaymentDetails_LnImpl _value, $Res Function(_$PaymentDetails_LnImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_LnImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_LnImpl implements PaymentDetails_Ln { - const _$PaymentDetails_LnImpl({required this.data}); - - @override - final LnPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.ln(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_LnImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return ln(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return ln?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return ln(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return ln?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_Ln implements PaymentDetails { - const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = _$PaymentDetails_LnImpl; - - @override - LnPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - factory _$$PaymentDetails_ClosedChannelImplCopyWith( - _$PaymentDetails_ClosedChannelImpl value, $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = - __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res>; - @useResult - $Res call({ClosedChannelPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_ClosedChannelImpl> - implements _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - __$$PaymentDetails_ClosedChannelImplCopyWithImpl( - _$PaymentDetails_ClosedChannelImpl _value, $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_ClosedChannelImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ClosedChannelPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_ClosedChannelImpl implements PaymentDetails_ClosedChannel { - const _$PaymentDetails_ClosedChannelImpl({required this.data}); - - @override - final ClosedChannelPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.closedChannel(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_ClosedChannelImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => - __$$PaymentDetails_ClosedChannelImplCopyWithImpl<_$PaymentDetails_ClosedChannelImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return closedChannel(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return closedChannel?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return closedChannel(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return closedChannel?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_ClosedChannel implements PaymentDetails { - const factory PaymentDetails_ClosedChannel({required final ClosedChannelPaymentDetails data}) = - _$PaymentDetails_ClosedChannelImpl; - - @override - ClosedChannelPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_ClosedChannelImplCopyWith<_$PaymentDetails_ClosedChannelImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$ReportIssueRequest { - ReportPaymentFailureDetails get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ReportIssueRequestCopyWith get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ReportIssueRequestCopyWith<$Res> { - factory $ReportIssueRequestCopyWith(ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = - _$ReportIssueRequestCopyWithImpl<$Res, ReportIssueRequest>; - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class _$ReportIssueRequestCopyWithImpl<$Res, $Val extends ReportIssueRequest> - implements $ReportIssueRequestCopyWith<$Res> { - _$ReportIssueRequestCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> - implements $ReportIssueRequestCopyWith<$Res> { - factory _$$ReportIssueRequest_PaymentFailureImplCopyWith(_$ReportIssueRequest_PaymentFailureImpl value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) then) = - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> - extends _$ReportIssueRequestCopyWithImpl<$Res, _$ReportIssueRequest_PaymentFailureImpl> - implements _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> { - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl(_$ReportIssueRequest_PaymentFailureImpl _value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$ReportIssueRequest_PaymentFailureImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - )); - } -} - -/// @nodoc - -class _$ReportIssueRequest_PaymentFailureImpl implements ReportIssueRequest_PaymentFailure { - const _$ReportIssueRequest_PaymentFailureImpl({required this.data}); - - @override - final ReportPaymentFailureDetails data; - - @override - String toString() { - return 'ReportIssueRequest.paymentFailure(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ReportIssueRequest_PaymentFailureImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<_$ReportIssueRequest_PaymentFailureImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) { - return paymentFailure(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) { - return paymentFailure?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) paymentFailure, - }) { - return paymentFailure(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) { - return paymentFailure?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(this); - } - return orElse(); - } -} - -abstract class ReportIssueRequest_PaymentFailure implements ReportIssueRequest { - const factory ReportIssueRequest_PaymentFailure({required final ReportPaymentFailureDetails data}) = - _$ReportIssueRequest_PaymentFailureImpl; - - @override - ReportPaymentFailureDetails get data; - @override - @JsonKey(ignore: true) - _$$ReportIssueRequest_PaymentFailureImplCopyWith<_$ReportIssueRequest_PaymentFailureImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$SuccessActionProcessed { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SuccessActionProcessedCopyWith<$Res> { - factory $SuccessActionProcessedCopyWith( - SuccessActionProcessed value, $Res Function(SuccessActionProcessed) then) = - _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; -} - -/// @nodoc -class _$SuccessActionProcessedCopyWithImpl<$Res, $Val extends SuccessActionProcessed> - implements $SuccessActionProcessedCopyWith<$Res> { - _$SuccessActionProcessedCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_AesImplCopyWith( - _$SuccessActionProcessed_AesImpl value, $Res Function(_$SuccessActionProcessed_AesImpl) then) = - __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataResult result}); - - $AesSuccessActionDataResultCopyWith<$Res> get result; -} - -/// @nodoc -class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_AesImpl> - implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - __$$SuccessActionProcessed_AesImplCopyWithImpl( - _$SuccessActionProcessed_AesImpl _value, $Res Function(_$SuccessActionProcessed_AesImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? result = null, - }) { - return _then(_$SuccessActionProcessed_AesImpl( - result: null == result - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataResult, - )); - } - - @override - @pragma('vm:prefer-inline') - $AesSuccessActionDataResultCopyWith<$Res> get result { - return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { - return _then(_value.copyWith(result: value)); - }); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_AesImpl implements SuccessActionProcessed_Aes { - const _$SuccessActionProcessed_AesImpl({required this.result}); - - @override - final AesSuccessActionDataResult result; - - @override - String toString() { - return 'SuccessActionProcessed.aes(result: $result)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_AesImpl && - (identical(other.result, result) || other.result == result)); - } - - @override - int get hashCode => Object.hash(runtimeType, result); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - __$$SuccessActionProcessed_AesImplCopyWithImpl<_$SuccessActionProcessed_AesImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return aes(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return aes?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return aes(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return aes?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Aes implements SuccessActionProcessed { - const factory SuccessActionProcessed_Aes({required final AesSuccessActionDataResult result}) = - _$SuccessActionProcessed_AesImpl; - - AesSuccessActionDataResult get result; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_MessageImplCopyWith(_$SuccessActionProcessed_MessageImpl value, - $Res Function(_$SuccessActionProcessed_MessageImpl) then) = - __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; - @useResult - $Res call({MessageSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_MessageImpl> - implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - __$$SuccessActionProcessed_MessageImplCopyWithImpl( - _$SuccessActionProcessed_MessageImpl _value, $Res Function(_$SuccessActionProcessed_MessageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_MessageImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as MessageSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_MessageImpl implements SuccessActionProcessed_Message { - const _$SuccessActionProcessed_MessageImpl({required this.data}); - - @override - final MessageSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.message(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_MessageImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - __$$SuccessActionProcessed_MessageImplCopyWithImpl<_$SuccessActionProcessed_MessageImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return message(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return message?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return message(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return message?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Message implements SuccessActionProcessed { - const factory SuccessActionProcessed_Message({required final MessageSuccessActionData data}) = - _$SuccessActionProcessed_MessageImpl; - - MessageSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_MessageImplCopyWith<_$SuccessActionProcessed_MessageImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_UrlImplCopyWith( - _$SuccessActionProcessed_UrlImpl value, $Res Function(_$SuccessActionProcessed_UrlImpl) then) = - __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({UrlSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, _$SuccessActionProcessed_UrlImpl> - implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - __$$SuccessActionProcessed_UrlImplCopyWithImpl( - _$SuccessActionProcessed_UrlImpl _value, $Res Function(_$SuccessActionProcessed_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_UrlImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as UrlSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_UrlImpl implements SuccessActionProcessed_Url { - const _$SuccessActionProcessed_UrlImpl({required this.data}); - - @override - final UrlSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.url(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_UrlImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - __$$SuccessActionProcessed_UrlImplCopyWithImpl<_$SuccessActionProcessed_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return url(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return url?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Url implements SuccessActionProcessed { - const factory SuccessActionProcessed_Url({required final UrlSuccessActionData data}) = - _$SuccessActionProcessed_UrlImpl; - - UrlSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 060e15390..85803f00d 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -211,6 +211,10 @@ Future inProgressSwap() => BreezSdkBindings.instance.api.crateBinding Future> inProgressReverseSwaps() => BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(); +/// See [BreezServices::claim_reverse_swap] +Future claimReverseSwap({required String lockupAddress}) => + BreezSdkBindings.instance.api.crateBindingClaimReverseSwap(lockupAddress: lockupAddress); + /// See [BreezServices::open_channel_fee] Future openChannelFee({required OpenChannelFeeRequest req}) => BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req); @@ -550,18 +554,28 @@ class LnUrlPayErrorData { class LnUrlPayRequest { final LnUrlPayRequestData data; final BigInt amountMsat; + final bool useTrampoline; final String? comment; final String? paymentLabel; + final bool? validateSuccessActionUrl; const LnUrlPayRequest({ required this.data, required this.amountMsat, + required this.useTrampoline, this.comment, this.paymentLabel, + this.validateSuccessActionUrl, }); @override - int get hashCode => data.hashCode ^ amountMsat.hashCode ^ comment.hashCode ^ paymentLabel.hashCode; + int get hashCode => + data.hashCode ^ + amountMsat.hashCode ^ + useTrampoline.hashCode ^ + comment.hashCode ^ + paymentLabel.hashCode ^ + validateSuccessActionUrl.hashCode; @override bool operator ==(Object other) => @@ -570,8 +584,10 @@ class LnUrlPayRequest { runtimeType == other.runtimeType && data == other.data && amountMsat == other.amountMsat && + useTrampoline == other.useTrampoline && comment == other.comment && - paymentLabel == other.paymentLabel; + paymentLabel == other.paymentLabel && + validateSuccessActionUrl == other.validateSuccessActionUrl; } class LnUrlPayRequestData { @@ -691,6 +707,9 @@ sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { const factory LnUrlWithdrawResult.ok({ required LnUrlWithdrawSuccessData data, }) = LnUrlWithdrawResult_Ok; + const factory LnUrlWithdrawResult.timeout({ + required LnUrlWithdrawSuccessData data, + }) = LnUrlWithdrawResult_Timeout; const factory LnUrlWithdrawResult.errorStatus({ required LnUrlErrorData data, }) = LnUrlWithdrawResult_ErrorStatus; @@ -816,7 +835,7 @@ class RouteHint { class RouteHintHop { final String srcNodeId; - final BigInt shortChannelId; + final String shortChannelId; final int feesBaseMsat; final int feesProportionalMillionths; final BigInt cltvExpiryDelta; @@ -902,14 +921,16 @@ class Symbol { class UrlSuccessActionData { final String description; final String url; + final bool matchesCallbackDomain; const UrlSuccessActionData({ required this.description, required this.url, + required this.matchesCallbackDomain, }); @override - int get hashCode => description.hashCode ^ url.hashCode; + int get hashCode => description.hashCode ^ url.hashCode ^ matchesCallbackDomain.hashCode; @override bool operator ==(Object other) => @@ -917,5 +938,6 @@ class UrlSuccessActionData { other is UrlSuccessActionData && runtimeType == other.runtimeType && description == other.description && - url == other.url; + url == other.url && + matchesCallbackDomain == other.matchesCallbackDomain; } diff --git a/libs/sdk-flutter/lib/generated/binding.freezed.dart b/libs/sdk-flutter/lib/generated/binding.freezed.dart index 931c6318d..f1489b1ee 100644 --- a/libs/sdk-flutter/lib/generated/binding.freezed.dart +++ b/libs/sdk-flutter/lib/generated/binding.freezed.dart @@ -2101,18 +2101,21 @@ mixin _$LnUrlWithdrawResult { @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) => @@ -2120,18 +2123,21 @@ mixin _$LnUrlWithdrawResult { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) => @@ -2220,6 +2226,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) { return ok(data); @@ -2229,6 +2236,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) { return ok?.call(data); @@ -2238,6 +2246,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) { @@ -2251,6 +2260,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return ok(this); @@ -2260,6 +2270,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) { return ok?.call(this); @@ -2269,6 +2280,7 @@ class _$LnUrlWithdrawResult_OkImpl extends LnUrlWithdrawResult_Ok { @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) { @@ -2291,6 +2303,148 @@ abstract class LnUrlWithdrawResult_Ok extends LnUrlWithdrawResult { throw _privateConstructorUsedError; } +/// @nodoc +abstract class _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { + factory _$$LnUrlWithdrawResult_TimeoutImplCopyWith( + _$LnUrlWithdrawResult_TimeoutImpl value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) then) = + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res>; + @useResult + $Res call({LnUrlWithdrawSuccessData data}); +} + +/// @nodoc +class __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<$Res> + extends _$LnUrlWithdrawResultCopyWithImpl<$Res, _$LnUrlWithdrawResult_TimeoutImpl> + implements _$$LnUrlWithdrawResult_TimeoutImplCopyWith<$Res> { + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl( + _$LnUrlWithdrawResult_TimeoutImpl _value, $Res Function(_$LnUrlWithdrawResult_TimeoutImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? data = null, + }) { + return _then(_$LnUrlWithdrawResult_TimeoutImpl( + data: null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as LnUrlWithdrawSuccessData, + )); + } +} + +/// @nodoc + +class _$LnUrlWithdrawResult_TimeoutImpl extends LnUrlWithdrawResult_Timeout { + const _$LnUrlWithdrawResult_TimeoutImpl({required this.data}) : super._(); + + @override + final LnUrlWithdrawSuccessData data; + + @override + String toString() { + return 'LnUrlWithdrawResult.timeout(data: $data)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$LnUrlWithdrawResult_TimeoutImpl && + (identical(other.data, data) || other.data == data)); + } + + @override + int get hashCode => Object.hash(runtimeType, data); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => + __$$LnUrlWithdrawResult_TimeoutImplCopyWithImpl<_$LnUrlWithdrawResult_TimeoutImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, + required TResult Function(LnUrlErrorData data) errorStatus, + }) { + return timeout(data); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, + TResult? Function(LnUrlErrorData data)? errorStatus, + }) { + return timeout?.call(data); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, + TResult Function(LnUrlErrorData data)? errorStatus, + required TResult orElse(), + }) { + if (timeout != null) { + return timeout(data); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, + required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, + }) { + return timeout(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, + TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + }) { + return timeout?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, + TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, + required TResult orElse(), + }) { + if (timeout != null) { + return timeout(this); + } + return orElse(); + } +} + +abstract class LnUrlWithdrawResult_Timeout extends LnUrlWithdrawResult { + const factory LnUrlWithdrawResult_Timeout({required final LnUrlWithdrawSuccessData data}) = + _$LnUrlWithdrawResult_TimeoutImpl; + const LnUrlWithdrawResult_Timeout._() : super._(); + + @override + LnUrlWithdrawSuccessData get data; + @JsonKey(ignore: true) + _$$LnUrlWithdrawResult_TimeoutImplCopyWith<_$LnUrlWithdrawResult_TimeoutImpl> get copyWith => + throw _privateConstructorUsedError; +} + /// @nodoc abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith(_$LnUrlWithdrawResult_ErrorStatusImpl value, @@ -2357,6 +2511,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult when({ required TResult Function(LnUrlWithdrawSuccessData data) ok, + required TResult Function(LnUrlWithdrawSuccessData data) timeout, required TResult Function(LnUrlErrorData data) errorStatus, }) { return errorStatus(data); @@ -2366,6 +2521,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult? whenOrNull({ TResult? Function(LnUrlWithdrawSuccessData data)? ok, + TResult? Function(LnUrlWithdrawSuccessData data)? timeout, TResult? Function(LnUrlErrorData data)? errorStatus, }) { return errorStatus?.call(data); @@ -2375,6 +2531,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult maybeWhen({ TResult Function(LnUrlWithdrawSuccessData data)? ok, + TResult Function(LnUrlWithdrawSuccessData data)? timeout, TResult Function(LnUrlErrorData data)? errorStatus, required TResult orElse(), }) { @@ -2388,6 +2545,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult map({ required TResult Function(LnUrlWithdrawResult_Ok value) ok, + required TResult Function(LnUrlWithdrawResult_Timeout value) timeout, required TResult Function(LnUrlWithdrawResult_ErrorStatus value) errorStatus, }) { return errorStatus(this); @@ -2397,6 +2555,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult? mapOrNull({ TResult? Function(LnUrlWithdrawResult_Ok value)? ok, + TResult? Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, }) { return errorStatus?.call(this); @@ -2406,6 +2565,7 @@ class _$LnUrlWithdrawResult_ErrorStatusImpl extends LnUrlWithdrawResult_ErrorSta @optionalTypeArgs TResult maybeMap({ TResult Function(LnUrlWithdrawResult_Ok value)? ok, + TResult Function(LnUrlWithdrawResult_Timeout value)? timeout, TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, required TResult orElse(), }) { diff --git a/libs/sdk-flutter/lib/generated/breez_services.dart b/libs/sdk-flutter/lib/generated/breez_services.dart index 7ae7bfbdd..559bee335 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -63,6 +63,15 @@ sealed class BreezEvent with _$BreezEvent { const factory BreezEvent.backupFailed({ required BackupFailedData details, }) = BreezEvent_BackupFailed; + + /// Indicates that a reverse swap has been updated which may also + /// include a status change + const factory BreezEvent.reverseSwapUpdated({ + required ReverseSwapInfo details, + }) = BreezEvent_ReverseSwapUpdated; + + /// Indicates that a swap has been updated which may also + /// include a status change const factory BreezEvent.swapUpdated({ required SwapInfo details, }) = BreezEvent_SwapUpdated; diff --git a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart index 9bac18922..bc7b77769 100644 --- a/libs/sdk-flutter/lib/generated/breez_services.freezed.dart +++ b/libs/sdk-flutter/lib/generated/breez_services.freezed.dart @@ -26,6 +26,7 @@ mixin _$BreezEvent { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) => throw _privateConstructorUsedError; @@ -39,6 +40,7 @@ mixin _$BreezEvent { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) => throw _privateConstructorUsedError; @@ -52,6 +54,7 @@ mixin _$BreezEvent { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) => @@ -66,6 +69,7 @@ mixin _$BreezEvent { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) => throw _privateConstructorUsedError; @@ -79,6 +83,7 @@ mixin _$BreezEvent { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) => throw _privateConstructorUsedError; @@ -92,6 +97,7 @@ mixin _$BreezEvent { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) => @@ -186,6 +192,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return newBlock(block); @@ -202,6 +209,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return newBlock?.call(block); @@ -218,6 +226,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -238,6 +247,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return newBlock(this); @@ -254,6 +264,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return newBlock?.call(this); @@ -270,6 +281,7 @@ class _$BreezEvent_NewBlockImpl extends BreezEvent_NewBlock { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -362,6 +374,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return invoicePaid(details); @@ -378,6 +391,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return invoicePaid?.call(details); @@ -394,6 +408,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -414,6 +429,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return invoicePaid(this); @@ -430,6 +446,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return invoicePaid?.call(this); @@ -446,6 +463,7 @@ class _$BreezEvent_InvoicePaidImpl extends BreezEvent_InvoicePaid { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -512,6 +530,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return synced(); @@ -528,6 +547,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return synced?.call(); @@ -544,6 +564,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -564,6 +585,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return synced(this); @@ -580,6 +602,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return synced?.call(this); @@ -596,6 +619,7 @@ class _$BreezEvent_SyncedImpl extends BreezEvent_Synced { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -683,6 +707,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return paymentSucceed(details); @@ -699,6 +724,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return paymentSucceed?.call(details); @@ -715,6 +741,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -735,6 +762,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return paymentSucceed(this); @@ -751,6 +779,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return paymentSucceed?.call(this); @@ -767,6 +796,7 @@ class _$BreezEvent_PaymentSucceedImpl extends BreezEvent_PaymentSucceed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -859,6 +889,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return paymentFailed(details); @@ -875,6 +906,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return paymentFailed?.call(details); @@ -891,6 +923,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -911,6 +944,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return paymentFailed(this); @@ -927,6 +961,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return paymentFailed?.call(this); @@ -943,6 +978,7 @@ class _$BreezEvent_PaymentFailedImpl extends BreezEvent_PaymentFailed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1010,6 +1046,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupStarted(); @@ -1026,6 +1063,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupStarted?.call(); @@ -1042,6 +1080,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1062,6 +1101,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupStarted(this); @@ -1078,6 +1118,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupStarted?.call(this); @@ -1094,6 +1135,7 @@ class _$BreezEvent_BackupStartedImpl extends BreezEvent_BackupStarted { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1155,6 +1197,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupSucceeded(); @@ -1171,6 +1214,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupSucceeded?.call(); @@ -1187,6 +1231,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1207,6 +1252,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupSucceeded(this); @@ -1223,6 +1269,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupSucceeded?.call(this); @@ -1239,6 +1286,7 @@ class _$BreezEvent_BackupSucceededImpl extends BreezEvent_BackupSucceeded { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1326,6 +1374,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return backupFailed(details); @@ -1342,6 +1391,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return backupFailed?.call(details); @@ -1358,6 +1408,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1378,6 +1429,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return backupFailed(this); @@ -1394,6 +1446,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return backupFailed?.call(this); @@ -1410,6 +1463,7 @@ class _$BreezEvent_BackupFailedImpl extends BreezEvent_BackupFailed { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { @@ -1431,6 +1485,190 @@ abstract class BreezEvent_BackupFailed extends BreezEvent { throw _privateConstructorUsedError; } +/// @nodoc +abstract class _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { + factory _$$BreezEvent_ReverseSwapUpdatedImplCopyWith(_$BreezEvent_ReverseSwapUpdatedImpl value, + $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) then) = + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res>; + @useResult + $Res call({ReverseSwapInfo details}); +} + +/// @nodoc +class __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<$Res> + extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_ReverseSwapUpdatedImpl> + implements _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<$Res> { + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl( + _$BreezEvent_ReverseSwapUpdatedImpl _value, $Res Function(_$BreezEvent_ReverseSwapUpdatedImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? details = null, + }) { + return _then(_$BreezEvent_ReverseSwapUpdatedImpl( + details: null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as ReverseSwapInfo, + )); + } +} + +/// @nodoc + +class _$BreezEvent_ReverseSwapUpdatedImpl extends BreezEvent_ReverseSwapUpdated { + const _$BreezEvent_ReverseSwapUpdatedImpl({required this.details}) : super._(); + + @override + final ReverseSwapInfo details; + + @override + String toString() { + return 'BreezEvent.reverseSwapUpdated(details: $details)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$BreezEvent_ReverseSwapUpdatedImpl && + (identical(other.details, details) || other.details == details)); + } + + @override + int get hashCode => Object.hash(runtimeType, details); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => + __$$BreezEvent_ReverseSwapUpdatedImplCopyWithImpl<_$BreezEvent_ReverseSwapUpdatedImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(int block) newBlock, + required TResult Function(InvoicePaidDetails details) invoicePaid, + required TResult Function() synced, + required TResult Function(Payment details) paymentSucceed, + required TResult Function(PaymentFailedData details) paymentFailed, + required TResult Function() backupStarted, + required TResult Function() backupSucceeded, + required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, + required TResult Function(SwapInfo details) swapUpdated, + }) { + return reverseSwapUpdated(details); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(int block)? newBlock, + TResult? Function(InvoicePaidDetails details)? invoicePaid, + TResult? Function()? synced, + TResult? Function(Payment details)? paymentSucceed, + TResult? Function(PaymentFailedData details)? paymentFailed, + TResult? Function()? backupStarted, + TResult? Function()? backupSucceeded, + TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, + TResult? Function(SwapInfo details)? swapUpdated, + }) { + return reverseSwapUpdated?.call(details); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(int block)? newBlock, + TResult Function(InvoicePaidDetails details)? invoicePaid, + TResult Function()? synced, + TResult Function(Payment details)? paymentSucceed, + TResult Function(PaymentFailedData details)? paymentFailed, + TResult Function()? backupStarted, + TResult Function()? backupSucceeded, + TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, + TResult Function(SwapInfo details)? swapUpdated, + required TResult orElse(), + }) { + if (reverseSwapUpdated != null) { + return reverseSwapUpdated(details); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(BreezEvent_NewBlock value) newBlock, + required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, + required TResult Function(BreezEvent_Synced value) synced, + required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, + required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, + required TResult Function(BreezEvent_BackupStarted value) backupStarted, + required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, + required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, + required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, + }) { + return reverseSwapUpdated(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(BreezEvent_NewBlock value)? newBlock, + TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult? Function(BreezEvent_Synced value)? synced, + TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult? Function(BreezEvent_BackupStarted value)? backupStarted, + TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, + TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, + }) { + return reverseSwapUpdated?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(BreezEvent_NewBlock value)? newBlock, + TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, + TResult Function(BreezEvent_Synced value)? synced, + TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, + TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, + TResult Function(BreezEvent_BackupStarted value)? backupStarted, + TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, + TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, + TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, + required TResult orElse(), + }) { + if (reverseSwapUpdated != null) { + return reverseSwapUpdated(this); + } + return orElse(); + } +} + +abstract class BreezEvent_ReverseSwapUpdated extends BreezEvent { + const factory BreezEvent_ReverseSwapUpdated({required final ReverseSwapInfo details}) = + _$BreezEvent_ReverseSwapUpdatedImpl; + const BreezEvent_ReverseSwapUpdated._() : super._(); + + ReverseSwapInfo get details; + @JsonKey(ignore: true) + _$$BreezEvent_ReverseSwapUpdatedImplCopyWith<_$BreezEvent_ReverseSwapUpdatedImpl> get copyWith => + throw _privateConstructorUsedError; +} + /// @nodoc abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { factory _$$BreezEvent_SwapUpdatedImplCopyWith( @@ -1503,6 +1741,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { required TResult Function() backupStarted, required TResult Function() backupSucceeded, required TResult Function(BackupFailedData details) backupFailed, + required TResult Function(ReverseSwapInfo details) reverseSwapUpdated, required TResult Function(SwapInfo details) swapUpdated, }) { return swapUpdated(details); @@ -1519,6 +1758,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult? Function()? backupStarted, TResult? Function()? backupSucceeded, TResult? Function(BackupFailedData details)? backupFailed, + TResult? Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult? Function(SwapInfo details)? swapUpdated, }) { return swapUpdated?.call(details); @@ -1535,6 +1775,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult Function()? backupStarted, TResult Function()? backupSucceeded, TResult Function(BackupFailedData details)? backupFailed, + TResult Function(ReverseSwapInfo details)? reverseSwapUpdated, TResult Function(SwapInfo details)? swapUpdated, required TResult orElse(), }) { @@ -1555,6 +1796,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { required TResult Function(BreezEvent_BackupStarted value) backupStarted, required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, required TResult Function(BreezEvent_BackupFailed value) backupFailed, + required TResult Function(BreezEvent_ReverseSwapUpdated value) reverseSwapUpdated, required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, }) { return swapUpdated(this); @@ -1571,6 +1813,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult? Function(BreezEvent_BackupStarted value)? backupStarted, TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult? Function(BreezEvent_BackupFailed value)? backupFailed, + TResult? Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, }) { return swapUpdated?.call(this); @@ -1587,6 +1830,7 @@ class _$BreezEvent_SwapUpdatedImpl extends BreezEvent_SwapUpdated { TResult Function(BreezEvent_BackupStarted value)? backupStarted, TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, TResult Function(BreezEvent_BackupFailed value)? backupFailed, + TResult Function(BreezEvent_ReverseSwapUpdated value)? reverseSwapUpdated, TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, required TResult orElse(), }) { diff --git a/libs/sdk-flutter/lib/generated/chain.dart b/libs/sdk-flutter/lib/generated/chain.dart index 3cdc41bb6..fe717f193 100644 --- a/libs/sdk-flutter/lib/generated/chain.dart +++ b/libs/sdk-flutter/lib/generated/chain.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 2ac58a617..342ace360 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -36,6 +36,16 @@ class BreezSdkBindings ); } + /// Initialize flutter_rust_bridge in mock mode. + /// No libraries for FFI are loaded. + static void initMock({ + required BreezSdkBindingsApi api, + }) { + instance.initMockImpl( + api: api, + ); + } + /// Dispose flutter_rust_bridge /// /// The call to this function is optional, since flutter_rust_bridge (and everything else) @@ -56,10 +66,10 @@ class BreezSdkBindings ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig => kDefaultExternalLibraryLoaderConfig; @override - String get codegenVersion => '2.0.0'; + String get codegenVersion => '2.5.1'; @override - int get rustContentHash => 847148110; + int get rustContentHash => -488953100; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( stem: 'breez_sdk_core', @@ -84,6 +94,8 @@ abstract class BreezSdkBindingsApi extends BaseApi { Future crateBindingCheckMessage({required CheckMessageRequest req}); + Future crateBindingClaimReverseSwap({required String lockupAddress}); + Future crateBindingCloseLspChannels(); Future crateBindingConfigureNode({required ConfigureNodeRequest req}); @@ -365,6 +377,28 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements argNames: ["req"], ); + @override + Future crateBindingClaimReverseSwap({required String lockupAddress}) { + return handler.executeNormal(NormalTask( + callFfi: (port_) { + var arg0 = cst_encode_String(lockupAddress); + return wire.wire__crate__binding__claim_reverse_swap(port_, arg0); + }, + codec: DcoCodec( + decodeSuccessData: dco_decode_unit, + decodeErrorData: dco_decode_AnyhowException, + ), + constMeta: kCrateBindingClaimReverseSwapConstMeta, + argValues: [lockupAddress], + apiImpl: this, + )); + } + + TaskConstMeta get kCrateBindingClaimReverseSwapConstMeta => const TaskConstMeta( + debugName: "claim_reverse_swap", + argNames: ["lockupAddress"], + ); + @override Future crateBindingCloseLspChannels() { return handler.executeNormal(NormalTask( @@ -2055,6 +2089,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements details: dco_decode_box_autoadd_backup_failed_data(raw[1]), ); case 8: + return BreezEvent_ReverseSwapUpdated( + details: dco_decode_box_autoadd_reverse_swap_info(raw[1]), + ); + case 9: return BreezEvent_SwapUpdated( details: dco_decode_box_autoadd_swap_info(raw[1]), ); @@ -2073,10 +2111,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BuyBitcoinRequest dco_decode_buy_bitcoin_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return BuyBitcoinRequest( provider: dco_decode_buy_bitcoin_provider(arr[0]), openingFeeParams: dco_decode_opt_box_autoadd_opening_fee_params(arr[1]), + redirectUrl: dco_decode_opt_String(arr[2]), ); } @@ -2533,12 +2572,14 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements LnUrlPayRequest dco_decode_ln_url_pay_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); + if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); return LnUrlPayRequest( data: dco_decode_ln_url_pay_request_data(arr[0]), amountMsat: dco_decode_u_64(arr[1]), - comment: dco_decode_opt_String(arr[2]), - paymentLabel: dco_decode_opt_String(arr[3]), + useTrampoline: dco_decode_bool(arr[2]), + comment: dco_decode_opt_String(arr[3]), + paymentLabel: dco_decode_opt_String(arr[4]), + validateSuccessActionUrl: dco_decode_opt_box_autoadd_bool(arr[5]), ); } @@ -2627,6 +2668,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements data: dco_decode_box_autoadd_ln_url_withdraw_success_data(raw[1]), ); case 1: + return LnUrlWithdrawResult_Timeout( + data: dco_decode_box_autoadd_ln_url_withdraw_success_data(raw[1]), + ); + case 2: return LnUrlWithdrawResult_ErrorStatus( data: dco_decode_box_autoadd_ln_url_error_data(raw[1]), ); @@ -2766,7 +2811,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements NodeState dco_decode_node_state(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); + if (arr.length != 13) throw Exception('unexpected arr length: expect 13 but see ${arr.length}'); return NodeState( id: dco_decode_String(arr[0]), blockHeight: dco_decode_u_32(arr[1]), @@ -2779,7 +2824,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements maxSinglePaymentAmountMsat: dco_decode_u_64(arr[8]), maxChanReserveMsats: dco_decode_u_64(arr[9]), connectedPeers: dco_decode_list_String(arr[10]), - inboundLiquidityMsats: dco_decode_u_64(arr[11]), + maxReceivableSinglePaymentAmountMsat: dco_decode_u_64(arr[11]), + totalInboundLiquidityMsats: dco_decode_u_64(arr[12]), ); } @@ -2787,10 +2833,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements OnchainPaymentLimitsResponse dco_decode_onchain_payment_limits_response(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return OnchainPaymentLimitsResponse( minSat: dco_decode_u_64(arr[0]), maxSat: dco_decode_u_64(arr[1]), + maxPayableSat: dco_decode_u_64(arr[2]), ); } @@ -3317,7 +3364,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); return RouteHintHop( srcNodeId: dco_decode_String(arr[0]), - shortChannelId: dco_decode_u_64(arr[1]), + shortChannelId: dco_decode_String(arr[1]), feesBaseMsat: dco_decode_u_32(arr[2]), feesProportionalMillionths: dco_decode_u_32(arr[3]), cltvExpiryDelta: dco_decode_u_64(arr[4]), @@ -3353,11 +3400,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements SendPaymentRequest dco_decode_send_payment_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); + if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); return SendPaymentRequest( bolt11: dco_decode_String(arr[0]), - amountMsat: dco_decode_opt_box_autoadd_u_64(arr[1]), - label: dco_decode_opt_String(arr[2]), + useTrampoline: dco_decode_bool(arr[1]), + amountMsat: dco_decode_opt_box_autoadd_u_64(arr[2]), + label: dco_decode_opt_String(arr[3]), ); } @@ -3572,10 +3620,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements UrlSuccessActionData dco_decode_url_success_action_data(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); + if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); return UrlSuccessActionData( description: dco_decode_String(arr[0]), url: dco_decode_String(arr[1]), + matchesCallbackDomain: dco_decode_bool(arr[2]), ); } @@ -4070,6 +4119,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_details = sse_decode_box_autoadd_backup_failed_data(deserializer); return BreezEvent_BackupFailed(details: var_details); case 8: + var var_details = sse_decode_box_autoadd_reverse_swap_info(deserializer); + return BreezEvent_ReverseSwapUpdated(details: var_details); + case 9: var var_details = sse_decode_box_autoadd_swap_info(deserializer); return BreezEvent_SwapUpdated(details: var_details); default: @@ -4089,7 +4141,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_provider = sse_decode_buy_bitcoin_provider(deserializer); var var_openingFeeParams = sse_decode_opt_box_autoadd_opening_fee_params(deserializer); - return BuyBitcoinRequest(provider: var_provider, openingFeeParams: var_openingFeeParams); + var var_redirectUrl = sse_decode_opt_String(deserializer); + return BuyBitcoinRequest( + provider: var_provider, openingFeeParams: var_openingFeeParams, redirectUrl: var_redirectUrl); } @protected @@ -4641,10 +4695,17 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_data = sse_decode_ln_url_pay_request_data(deserializer); var var_amountMsat = sse_decode_u_64(deserializer); + var var_useTrampoline = sse_decode_bool(deserializer); var var_comment = sse_decode_opt_String(deserializer); var var_paymentLabel = sse_decode_opt_String(deserializer); + var var_validateSuccessActionUrl = sse_decode_opt_box_autoadd_bool(deserializer); return LnUrlPayRequest( - data: var_data, amountMsat: var_amountMsat, comment: var_comment, paymentLabel: var_paymentLabel); + data: var_data, + amountMsat: var_amountMsat, + useTrampoline: var_useTrampoline, + comment: var_comment, + paymentLabel: var_paymentLabel, + validateSuccessActionUrl: var_validateSuccessActionUrl); } @protected @@ -4734,6 +4795,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_data = sse_decode_box_autoadd_ln_url_withdraw_success_data(deserializer); return LnUrlWithdrawResult_Ok(data: var_data); case 1: + var var_data = sse_decode_box_autoadd_ln_url_withdraw_success_data(deserializer); + return LnUrlWithdrawResult_Timeout(data: var_data); + case 2: var var_data = sse_decode_box_autoadd_ln_url_error_data(deserializer); return LnUrlWithdrawResult_ErrorStatus(data: var_data); default: @@ -4872,7 +4936,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements var var_maxSinglePaymentAmountMsat = sse_decode_u_64(deserializer); var var_maxChanReserveMsats = sse_decode_u_64(deserializer); var var_connectedPeers = sse_decode_list_String(deserializer); - var var_inboundLiquidityMsats = sse_decode_u_64(deserializer); + var var_maxReceivableSinglePaymentAmountMsat = sse_decode_u_64(deserializer); + var var_totalInboundLiquidityMsats = sse_decode_u_64(deserializer); return NodeState( id: var_id, blockHeight: var_blockHeight, @@ -4885,7 +4950,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements maxSinglePaymentAmountMsat: var_maxSinglePaymentAmountMsat, maxChanReserveMsats: var_maxChanReserveMsats, connectedPeers: var_connectedPeers, - inboundLiquidityMsats: var_inboundLiquidityMsats); + maxReceivableSinglePaymentAmountMsat: var_maxReceivableSinglePaymentAmountMsat, + totalInboundLiquidityMsats: var_totalInboundLiquidityMsats); } @protected @@ -4893,7 +4959,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_minSat = sse_decode_u_64(deserializer); var var_maxSat = sse_decode_u_64(deserializer); - return OnchainPaymentLimitsResponse(minSat: var_minSat, maxSat: var_maxSat); + var var_maxPayableSat = sse_decode_u_64(deserializer); + return OnchainPaymentLimitsResponse( + minSat: var_minSat, maxSat: var_maxSat, maxPayableSat: var_maxPayableSat); } @protected @@ -5491,7 +5559,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements RouteHintHop sse_decode_route_hint_hop(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_srcNodeId = sse_decode_String(deserializer); - var var_shortChannelId = sse_decode_u_64(deserializer); + var var_shortChannelId = sse_decode_String(deserializer); var var_feesBaseMsat = sse_decode_u_32(deserializer); var var_feesProportionalMillionths = sse_decode_u_32(deserializer); var var_cltvExpiryDelta = sse_decode_u_64(deserializer); @@ -5532,9 +5600,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements SendPaymentRequest sse_decode_send_payment_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs var var_bolt11 = sse_decode_String(deserializer); + var var_useTrampoline = sse_decode_bool(deserializer); var var_amountMsat = sse_decode_opt_box_autoadd_u_64(deserializer); var var_label = sse_decode_opt_String(deserializer); - return SendPaymentRequest(bolt11: var_bolt11, amountMsat: var_amountMsat, label: var_label); + return SendPaymentRequest( + bolt11: var_bolt11, useTrampoline: var_useTrampoline, amountMsat: var_amountMsat, label: var_label); } @protected @@ -5746,7 +5816,9 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs var var_description = sse_decode_String(deserializer); var var_url = sse_decode_String(deserializer); - return UrlSuccessActionData(description: var_description, url: var_url); + var var_matchesCallbackDomain = sse_decode_bool(deserializer); + return UrlSuccessActionData( + description: var_description, url: var_url, matchesCallbackDomain: var_matchesCallbackDomain); } @protected @@ -6349,8 +6421,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case BreezEvent_BackupFailed(details: final details): sse_encode_i_32(7, serializer); sse_encode_box_autoadd_backup_failed_data(details, serializer); - case BreezEvent_SwapUpdated(details: final details): + case BreezEvent_ReverseSwapUpdated(details: final details): sse_encode_i_32(8, serializer); + sse_encode_box_autoadd_reverse_swap_info(details, serializer); + case BreezEvent_SwapUpdated(details: final details): + sse_encode_i_32(9, serializer); sse_encode_box_autoadd_swap_info(details, serializer); default: throw UnimplementedError(''); @@ -6368,6 +6443,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_buy_bitcoin_provider(self.provider, serializer); sse_encode_opt_box_autoadd_opening_fee_params(self.openingFeeParams, serializer); + sse_encode_opt_String(self.redirectUrl, serializer); } @protected @@ -6789,8 +6865,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_ln_url_pay_request_data(self.data, serializer); sse_encode_u_64(self.amountMsat, serializer); + sse_encode_bool(self.useTrampoline, serializer); sse_encode_opt_String(self.comment, serializer); sse_encode_opt_String(self.paymentLabel, serializer); + sse_encode_opt_box_autoadd_bool(self.validateSuccessActionUrl, serializer); } @protected @@ -6857,8 +6935,11 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements case LnUrlWithdrawResult_Ok(data: final data): sse_encode_i_32(0, serializer); sse_encode_box_autoadd_ln_url_withdraw_success_data(data, serializer); - case LnUrlWithdrawResult_ErrorStatus(data: final data): + case LnUrlWithdrawResult_Timeout(data: final data): sse_encode_i_32(1, serializer); + sse_encode_box_autoadd_ln_url_withdraw_success_data(data, serializer); + case LnUrlWithdrawResult_ErrorStatus(data: final data): + sse_encode_i_32(2, serializer); sse_encode_box_autoadd_ln_url_error_data(data, serializer); default: throw UnimplementedError(''); @@ -6973,7 +7054,8 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_u_64(self.maxSinglePaymentAmountMsat, serializer); sse_encode_u_64(self.maxChanReserveMsats, serializer); sse_encode_list_String(self.connectedPeers, serializer); - sse_encode_u_64(self.inboundLiquidityMsats, serializer); + sse_encode_u_64(self.maxReceivableSinglePaymentAmountMsat, serializer); + sse_encode_u_64(self.totalInboundLiquidityMsats, serializer); } @protected @@ -6982,6 +7064,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_u_64(self.minSat, serializer); sse_encode_u_64(self.maxSat, serializer); + sse_encode_u_64(self.maxPayableSat, serializer); } @protected @@ -7475,7 +7558,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements void sse_encode_route_hint_hop(RouteHintHop self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.srcNodeId, serializer); - sse_encode_u_64(self.shortChannelId, serializer); + sse_encode_String(self.shortChannelId, serializer); sse_encode_u_32(self.feesBaseMsat, serializer); sse_encode_u_32(self.feesProportionalMillionths, serializer); sse_encode_u_64(self.cltvExpiryDelta, serializer); @@ -7502,6 +7585,7 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements void sse_encode_send_payment_request(SendPaymentRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.bolt11, serializer); + sse_encode_bool(self.useTrampoline, serializer); sse_encode_opt_box_autoadd_u_64(self.amountMsat, serializer); sse_encode_opt_String(self.label, serializer); } @@ -7671,5 +7755,6 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements // Codec=Sse (Serialization based), see doc to use other codecs sse_encode_String(self.description, serializer); sse_encode_String(self.url, serializer); + sse_encode_bool(self.matchesCallbackDomain, serializer); } } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index 63824be8b..2eea7aebc 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field @@ -2603,9 +2603,15 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl)>(); + void wire__crate__binding__claim_reverse_swap( + int port_, + ffi.Pointer lockup_address, + ) { + return _wire__crate__binding__claim_reverse_swap( + port_, + lockup_address, + ); + } + + late final _wire__crate__binding__claim_reverse_swapPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__claim_reverse_swap'); + late final _wire__crate__binding__claim_reverse_swap = _wire__crate__binding__claim_reverse_swapPtr + .asFunction)>(); + void wire__crate__binding__close_lsp_channels( int port_, ) { @@ -6128,6 +6164,9 @@ final class wire_cst_url_success_action_data extends ffi.Struct { external ffi.Pointer description; external ffi.Pointer url; + + @ffi.Bool() + external bool matches_callback_domain; } final class wire_cst_SuccessActionProcessed_Url extends ffi.Struct { @@ -6363,8 +6402,7 @@ final class wire_cst_BreezEvent_PaymentSucceed extends ffi.Struct { final class wire_cst_route_hint_hop extends ffi.Struct { external ffi.Pointer src_node_id; - @ffi.Uint64() - external int short_channel_id; + external ffi.Pointer short_channel_id; @ffi.Uint32() external int fees_base_msat; @@ -6450,6 +6488,10 @@ final class wire_cst_BreezEvent_BackupFailed extends ffi.Struct { external ffi.Pointer details; } +final class wire_cst_BreezEvent_ReverseSwapUpdated extends ffi.Struct { + external ffi.Pointer details; +} + final class wire_cst_BreezEvent_SwapUpdated extends ffi.Struct { external ffi.Pointer details; } @@ -6465,6 +6507,8 @@ final class BreezEventKind extends ffi.Union { external wire_cst_BreezEvent_BackupFailed BackupFailed; + external wire_cst_BreezEvent_ReverseSwapUpdated ReverseSwapUpdated; + external wire_cst_BreezEvent_SwapUpdated SwapUpdated; } @@ -6480,6 +6524,8 @@ final class wire_cst_buy_bitcoin_request extends ffi.Struct { external int provider; external ffi.Pointer opening_fee_params; + + external ffi.Pointer redirect_url; } final class wire_cst_check_message_request extends ffi.Struct { @@ -6639,9 +6685,14 @@ final class wire_cst_ln_url_pay_request extends ffi.Struct { @ffi.Uint64() external int amount_msat; + @ffi.Bool() + external bool use_trampoline; + external ffi.Pointer comment; external ffi.Pointer payment_label; + + external ffi.Pointer validate_success_action_url; } final class wire_cst_ln_url_withdraw_request_data extends ffi.Struct { @@ -6801,6 +6852,9 @@ final class wire_cst_send_onchain_request extends ffi.Struct { final class wire_cst_send_payment_request extends ffi.Struct { external ffi.Pointer bolt11; + @ffi.Bool() + external bool use_trampoline; + external ffi.Pointer amount_msat; external ffi.Pointer label; @@ -7183,6 +7237,10 @@ final class wire_cst_LnUrlWithdrawResult_Ok extends ffi.Struct { external ffi.Pointer data; } +final class wire_cst_LnUrlWithdrawResult_Timeout extends ffi.Struct { + external ffi.Pointer data; +} + final class wire_cst_LnUrlWithdrawResult_ErrorStatus extends ffi.Struct { external ffi.Pointer data; } @@ -7190,6 +7248,8 @@ final class wire_cst_LnUrlWithdrawResult_ErrorStatus extends ffi.Struct { final class LnUrlWithdrawResultKind extends ffi.Union { external wire_cst_LnUrlWithdrawResult_Ok Ok; + external wire_cst_LnUrlWithdrawResult_Timeout Timeout; + external wire_cst_LnUrlWithdrawResult_ErrorStatus ErrorStatus; } @@ -7243,7 +7303,10 @@ final class wire_cst_node_state extends ffi.Struct { external ffi.Pointer connected_peers; @ffi.Uint64() - external int inbound_liquidity_msats; + external int max_receivable_single_payment_amount_msat; + + @ffi.Uint64() + external int total_inbound_liquidity_msats; } final class wire_cst_onchain_payment_limits_response extends ffi.Struct { @@ -7252,6 +7315,9 @@ final class wire_cst_onchain_payment_limits_response extends ffi.Struct { @ffi.Uint64() external int max_sat; + + @ffi.Uint64() + external int max_payable_sat; } final class wire_cst_open_channel_fee_response extends ffi.Struct { diff --git a/libs/sdk-flutter/lib/generated/lnurl/pay.dart b/libs/sdk-flutter/lib/generated/lnurl/pay.dart index ae8095aed..12a6496ff 100644 --- a/libs/sdk-flutter/lib/generated/lnurl/pay.dart +++ b/libs/sdk-flutter/lib/generated/lnurl/pay.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/lsp.dart b/libs/sdk-flutter/lib/generated/lsp.dart index a8193dc21..1a745668e 100644 --- a/libs/sdk-flutter/lib/generated/lsp.dart +++ b/libs/sdk-flutter/lib/generated/lsp.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import diff --git a/libs/sdk-flutter/lib/generated/models.dart b/libs/sdk-flutter/lib/generated/models.dart index e46eea34b..cb9b0ccbc 100644 --- a/libs/sdk-flutter/lib/generated/models.dart +++ b/libs/sdk-flutter/lib/generated/models.dart @@ -1,5 +1,5 @@ // This file is automatically generated, so please do not edit it. -// Generated by `flutter_rust_bridge`@ 2.0.0. +// @generated by `flutter_rust_bridge`@ 2.5.1. // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import @@ -42,13 +42,19 @@ class BuyBitcoinRequest { final BuyBitcoinProvider provider; final OpeningFeeParams? openingFeeParams; + /// The optional URL to redirect to after completing the buy. + /// + /// For Moonpay, see + final String? redirectUrl; + const BuyBitcoinRequest({ required this.provider, this.openingFeeParams, + this.redirectUrl, }); @override - int get hashCode => provider.hashCode ^ openingFeeParams.hashCode; + int get hashCode => provider.hashCode ^ openingFeeParams.hashCode ^ redirectUrl.hashCode; @override bool operator ==(Object other) => @@ -56,7 +62,8 @@ class BuyBitcoinRequest { other is BuyBitcoinRequest && runtimeType == other.runtimeType && provider == other.provider && - openingFeeParams == other.openingFeeParams; + openingFeeParams == other.openingFeeParams && + redirectUrl == other.redirectUrl; } class BuyBitcoinResponse { @@ -564,7 +571,12 @@ class NodeState { final BigInt maxSinglePaymentAmountMsat; final BigInt maxChanReserveMsats; final List connectedPeers; - final BigInt inboundLiquidityMsats; + + /// Maximum receivable in a single payment without requiring a new channel open. + final BigInt maxReceivableSinglePaymentAmountMsat; + + /// Total receivable on all available channels + final BigInt totalInboundLiquidityMsats; const NodeState({ required this.id, @@ -578,7 +590,8 @@ class NodeState { required this.maxSinglePaymentAmountMsat, required this.maxChanReserveMsats, required this.connectedPeers, - required this.inboundLiquidityMsats, + required this.maxReceivableSinglePaymentAmountMsat, + required this.totalInboundLiquidityMsats, }); @override @@ -594,7 +607,8 @@ class NodeState { maxSinglePaymentAmountMsat.hashCode ^ maxChanReserveMsats.hashCode ^ connectedPeers.hashCode ^ - inboundLiquidityMsats.hashCode; + maxReceivableSinglePaymentAmountMsat.hashCode ^ + totalInboundLiquidityMsats.hashCode; @override bool operator ==(Object other) => @@ -612,27 +626,28 @@ class NodeState { maxSinglePaymentAmountMsat == other.maxSinglePaymentAmountMsat && maxChanReserveMsats == other.maxChanReserveMsats && connectedPeers == other.connectedPeers && - inboundLiquidityMsats == other.inboundLiquidityMsats; + maxReceivableSinglePaymentAmountMsat == other.maxReceivableSinglePaymentAmountMsat && + totalInboundLiquidityMsats == other.totalInboundLiquidityMsats; } class OnchainPaymentLimitsResponse { - /// Minimum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the lower limit of what the reverse swap service accepts as a send amount + /// Minimum amount the reverse swap service accepts as a send amount final BigInt minSat; - /// Maximum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the upper limit of what the reverse swap service accepts as a send amount + /// Maximum amount the reverse swap service accepts as a send amount final BigInt maxSat; + /// Maximum amount this node can send with the current channels and the current local balance + final BigInt maxPayableSat; + const OnchainPaymentLimitsResponse({ required this.minSat, required this.maxSat, + required this.maxPayableSat, }); @override - int get hashCode => minSat.hashCode ^ maxSat.hashCode; + int get hashCode => minSat.hashCode ^ maxSat.hashCode ^ maxPayableSat.hashCode; @override bool operator ==(Object other) => @@ -640,7 +655,8 @@ class OnchainPaymentLimitsResponse { other is OnchainPaymentLimitsResponse && runtimeType == other.runtimeType && minSat == other.minSat && - maxSat == other.maxSat; + maxSat == other.maxSat && + maxPayableSat == other.maxPayableSat; } class OpenChannelFeeRequest { @@ -1481,6 +1497,11 @@ class SendPaymentRequest { /// The bolt11 invoice final String bolt11; + /// Trampoline payments outsource pathfinding to the LSP. Trampoline payments can improve + /// payment performance, but are generally more expensive in terms of fees and they + /// compromise on privacy. + final bool useTrampoline; + /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. final BigInt? amountMsat; @@ -1489,12 +1510,13 @@ class SendPaymentRequest { const SendPaymentRequest({ required this.bolt11, + required this.useTrampoline, this.amountMsat, this.label, }); @override - int get hashCode => bolt11.hashCode ^ amountMsat.hashCode ^ label.hashCode; + int get hashCode => bolt11.hashCode ^ useTrampoline.hashCode ^ amountMsat.hashCode ^ label.hashCode; @override bool operator ==(Object other) => @@ -1502,6 +1524,7 @@ class SendPaymentRequest { other is SendPaymentRequest && runtimeType == other.runtimeType && bolt11 == other.bolt11 && + useTrampoline == other.useTrampoline && amountMsat == other.amountMsat && label == other.label; } @@ -1652,7 +1675,7 @@ class SwapInfo { /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. final BigInt paidMsat; - /// Total amount of transactions sent to the swap address. + /// Total count of transactions sent to the swap address. final BigInt totalIncomingTxs; /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. diff --git a/libs/sdk-flutter/makefile b/libs/sdk-flutter/makefile index 101028e25..9afb20783 100644 --- a/libs/sdk-flutter/makefile +++ b/libs/sdk-flutter/makefile @@ -12,7 +12,7 @@ init: all: ios android flutter_rust_bridge: - cargo install flutter_rust_bridge_codegen --version 2.0.0 + cargo install flutter_rust_bridge_codegen --version 2.5.1 mkdir -p ./lib/generated flutter_rust_bridge_codegen generate diff --git a/libs/sdk-flutter/pubspec.lock b/libs/sdk-flutter/pubspec.lock index 966b705f5..e7f291662 100644 --- a/libs/sdk-flutter/pubspec.lock +++ b/libs/sdk-flutter/pubspec.lock @@ -17,22 +17,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.4.1" - archive: - dependency: transitive - description: - name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d - url: "https://pub.dev" - source: hosted - version: "3.6.1" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.6.0" async: dependency: transitive description: @@ -141,10 +133,10 @@ packages: dependency: transitive description: name: cli_util - sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c url: "https://pub.dev" source: hosted - version: "0.4.1" + version: "0.4.2" clock: dependency: transitive description: @@ -173,18 +165,18 @@ packages: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" dart_style: dependency: transitive description: @@ -213,26 +205,26 @@ packages: dependency: "direct dev" description: name: ffigen - sha256: "3a80687577e7e51ba915114742f389a128e8aa241c52ce69a0f70aecb8e14365" + sha256: dead012f29db2be71ea152458f5eab600de98fbc244e01088ae6bf2616bceca7 url: "https://pub.dev" source: hosted - version: "9.0.1" + version: "11.0.0" file: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -250,17 +242,17 @@ packages: dependency: "direct main" description: name: flutter_rust_bridge - sha256: "02720226035257ad0b571c1256f43df3e1556a499f6bcb004849a0faaa0e87f0" + sha256: "5fe868d3cb8cbc4d83091748552e03f00ccfa41b8e44691bc382611f831d5f8b" url: "https://pub.dev" source: hosted - version: "1.82.6" + version: "2.5.1" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" freezed: - dependency: "direct main" + dependency: "direct dev" description: name: freezed sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1 @@ -299,14 +291,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.2" - http: - dependency: transitive - description: - name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 - url: "https://pub.dev" - source: hosted - version: "1.2.2" http_multi_server: dependency: transitive description: @@ -335,10 +319,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: @@ -383,10 +367,10 @@ packages: dependency: transitive description: name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" matcher: dependency: transitive description: @@ -415,10 +399,10 @@ packages: dependency: transitive description: name: mime - sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.6" package_config: dependency: transitive description: @@ -435,14 +419,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" pool: dependency: transitive description: @@ -467,22 +443,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" - puppeteer: - dependency: transitive - description: - name: puppeteer - sha256: de3f921154e5d336b14cdc05b674ac3db5701a5338f3cb0042868a5146f16e67 - url: "https://pub.dev" - source: hosted - version: "3.12.0" quiver: dependency: transitive description: name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.2.2" rxdart: dependency: "direct main" description: @@ -499,22 +467,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.1" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e - url: "https://pub.dev" - source: hosted - version: "1.1.2" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -536,14 +496,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.dev" - source: hosted - version: "7.0.0" stack_trace: dependency: transitive description: @@ -600,14 +552,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.1" - tuple: - dependency: transitive - description: - name: tuple - sha256: a97ce2013f240b2f3807bcbaf218765b6f301c3eff91092bcfa23a039e7dd151 - url: "https://pub.dev" - source: hosted - version: "2.0.2" typed_data: dependency: transitive description: @@ -616,14 +560,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.2" - uuid: - dependency: transitive - description: - name: uuid - sha256: "83d37c7ad7aaf9aa8e275490669535c8080377cfa7a7004c24dfac53afffaa90" - url: "https://pub.dev" - source: hosted - version: "4.4.2" vector_math: dependency: transitive description: @@ -652,18 +588,26 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.4.5" + version: "3.0.1" yaml: dependency: transitive description: diff --git a/libs/sdk-flutter/pubspec.yaml b/libs/sdk-flutter/pubspec.yaml index 0cb7b9dcb..1bed50950 100644 --- a/libs/sdk-flutter/pubspec.yaml +++ b/libs/sdk-flutter/pubspec.yaml @@ -12,8 +12,8 @@ dependencies: sdk: flutter ### flutter_rust_bridge_codegen dependencies ffi: ^2.1.2 # requires Dart >=3.3.0(Flutter 3.19) - flutter_rust_bridge: ^2.0.0 - freezed_annotation: ^2.4.1 + flutter_rust_bridge: ">=2.0.0 <=2.5.1" + freezed_annotation: ^2.4.2 ### rxdart: ^0.28.0