diff --git a/libs/sdk-core/src/binding.rs b/libs/sdk-core/src/binding.rs index 3e5e8cde7..f05615e6a 100644 --- a/libs/sdk-core/src/binding.rs +++ b/libs/sdk-core/src/binding.rs @@ -10,14 +10,12 @@ //! The first option loses the `SdkError` type. The second option keeps the type, which we can retrieve //! with `anyhow::Error::downcast_ref` (or equivalent Dart method). We therefore use the second approach. -use std::future::Future; use std::sync::Arc; use crate::frb_generated::StreamSink; use anyhow::{anyhow, Result}; use log::{Level, LevelFilter, Metadata, Record}; -use once_cell::sync::{Lazy, OnceCell}; -use tokio::sync::Mutex; +use once_cell::sync::OnceCell; use crate::breez_services::{self, BreezEvent, BreezServices, EventListener}; use crate::chain::RecommendedFees; @@ -47,501 +45,474 @@ use crate::{ SignMessageResponse, StaticBackupRequest, StaticBackupResponse, }; -/* -The format Lazy>> for the following variables allows them to be instance-global, -meaning they can be set only once per instance, but calling disconnect() will unset them. - */ -static BREEZ_SERVICES_INSTANCE: Lazy>>> = - Lazy::new(|| Mutex::new(None)); static NOTIFICATION_STREAM: OnceCell> = OnceCell::new(); -static RT: Lazy = Lazy::new(|| tokio::runtime::Runtime::new().unwrap()); static LOG_INIT: OnceCell = OnceCell::new(); -/* Breez Services API's */ - /// Wrapper around [BreezServices::connect] which also initializes SDK logging -pub fn connect(req: ConnectRequest) -> Result<()> { - block_on(async move { - let mut locked = BREEZ_SERVICES_INSTANCE.lock().await; - match *locked { - None => { - let breez_services = - BreezServices::connect(req, Box::new(BindingEventListener {})).await?; - - *locked = Some(breez_services); - Ok(()) - } - Some(_) => Err(ConnectError::Generic { - err: "Static node services already set, please call disconnect() first".into(), - }), - } - }) - .map_err(anyhow::Error::new::) +pub async fn connect(req: ConnectRequest) -> Result { + let breez_services = BreezServices::connect(req, Box::new(BindingEventListener {})) + .await + .map_err(anyhow::Error::new::) + .unwrap(); + Ok(BindingBreezServices { breez_services }) } -/// Check whether node service is initialized or not -pub fn is_initialized() -> bool { - block_on(async { get_breez_services().await.is_ok() }) +pub struct BindingBreezServices { + breez_services: Arc, } -/// See [BreezServices::sync] -pub fn sync() -> Result<()> { - block_on(async { get_breez_services().await?.sync().await }) - .map_err(anyhow::Error::new::) -} +/* Breez Services API's */ + +impl BindingBreezServices { + /// See [BreezServices::sync] + pub async fn sync(&self) -> Result<()> { + self.breez_services + .sync() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::node_credentials] -pub fn node_credentials() -> Result> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::node_credentials] + pub fn node_credentials(&self) -> Result> { + self.breez_services .node_credentials() .map_err(anyhow::Error::new::) - }) -} + } -/// See [BreezServices::node_info] -pub fn node_info() -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::node_info] + pub fn node_info(&self) -> Result { + self.breez_services .node_info() .map_err(anyhow::Error::new::) - }) -} - -/// See [BreezServices::configure_node] -pub fn configure_node(req: ConfigureNodeRequest) -> Result<()> { - block_on(async { get_breez_services().await?.configure_node(req).await }) - .map_err(anyhow::Error::new::) -} - -/// Cleanup node resources and stop the signer. -pub fn disconnect() -> Result<()> { - block_on(async { - // To avoid deadlock: first disconnect SDK, then acquire lock and unset global instance - get_breez_services().await?.disconnect().await?; - let mut locked_sdk_instance = BREEZ_SERVICES_INSTANCE.lock().await; - *locked_sdk_instance = None; - - Ok(()) - }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::sign_message] -pub fn sign_message(req: SignMessageRequest) -> Result { - block_on(async { get_breez_services().await?.sign_message(req).await }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::check_message] -pub fn check_message(req: CheckMessageRequest) -> Result { - block_on(async { get_breez_services().await?.check_message(req).await }) - .map_err(anyhow::Error::new::) -} - -/* Breez Services Helper API's */ - -/// See [breez_services::mnemonic_to_seed] -pub fn mnemonic_to_seed(phrase: String) -> Result> { - breez_services::mnemonic_to_seed(phrase) -} - -/// See [BreezServices::default_config] -pub fn default_config( - env_type: EnvironmentType, - api_key: String, - node_config: NodeConfig, -) -> Config { - BreezServices::default_config(env_type, api_key, node_config) -} - -/// See [BreezServices::static_backup] -pub fn static_backup(req: StaticBackupRequest) -> Result { - BreezServices::static_backup(req).map_err(anyhow::Error::new::) -} + } -/// See [BreezServices::service_health_check] -pub fn service_health_check(api_key: String) -> Result { - block_on(async { BreezServices::service_health_check(api_key).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::configure_node] + pub async fn configure_node(&self, req: ConfigureNodeRequest) -> Result<()> { + self.breez_services + .configure_node(req) + .await + .map_err(anyhow::Error::new::) + } -/* Stream API's */ + /// Cleanup node resources and stop the signer. + pub async fn disconnect(&self) -> Result<()> { + self.breez_services + .disconnect() + .await + .map_err(anyhow::Error::new::) + } -/// If used, this must be called before `connect`. It can only be called once. -pub fn breez_events_stream(s: StreamSink) -> Result<()> { - NOTIFICATION_STREAM - .set(s) - .map_err(|_| anyhow!("Events stream already created"))?; - Ok(()) -} + /// See [BreezServices::sign_message] + pub async fn sign_message(&self, req: SignMessageRequest) -> Result { + self.breez_services + .sign_message(req) + .await + .map_err(anyhow::Error::new::) + } -/// If used, this must be called before `connect`. It can only be called once. -pub fn breez_log_stream(s: StreamSink) -> Result<()> { - LOG_INIT - .set(true) - .map_err(|_| anyhow!("Log stream already created"))?; - BindingLogger::init(s); - Ok(()) -} + /// See [BreezServices::check_message] + pub async fn check_message(&self, req: CheckMessageRequest) -> Result { + self.breez_services + .check_message(req) + .await + .map_err(anyhow::Error::new::) + } -/* LSP API's */ + /* LSP API's */ -/// See [BreezServices::list_lsps] -pub fn list_lsps() -> Result> { - block_on(async { get_breez_services().await?.list_lsps().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_lsps] + pub async fn list_lsps(&self) -> Result> { + self.breez_services + .list_lsps() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::connect_lsp] -pub fn connect_lsp(lsp_id: String) -> Result<()> { - block_on(async { get_breez_services().await?.connect_lsp(lsp_id).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::connect_lsp] + pub async fn connect_lsp(&self, lsp_id: String) -> Result<()> { + self.breez_services + .connect_lsp(lsp_id) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lsp_id] -pub fn lsp_id() -> Result> { - block_on(async { get_breez_services().await?.lsp_id().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lsp_id] + pub async fn lsp_id(&self) -> Result> { + self.breez_services + .lsp_id() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::fetch_lsp_info] -pub fn fetch_lsp_info(id: String) -> Result> { - block_on(async { get_breez_services().await?.fetch_lsp_info(id).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::fetch_lsp_info] + pub async fn fetch_lsp_info(&self, id: String) -> Result> { + self.breez_services + .fetch_lsp_info(id) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lsp_info] -pub fn lsp_info() -> Result { - block_on(async { get_breez_services().await?.lsp_info().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lsp_info] + pub async fn lsp_info(&self) -> Result { + self.breez_services + .lsp_info() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::close_lsp_channels] -pub fn close_lsp_channels() -> Result<()> { - block_on(async { - _ = get_breez_services().await?.close_lsp_channels().await?; + /// See [BreezServices::close_lsp_channels] + pub async fn close_lsp_channels(&self) -> Result<()> { + self.breez_services.close_lsp_channels().await?; Ok(()) - }) -} + } -pub fn register_webhook(webhook_url: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + pub async fn register_webhook(&self, webhook_url: String) -> Result<()> { + self.breez_services .register_webhook(webhook_url) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -pub fn unregister_webhook(webhook_url: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + pub async fn unregister_webhook(&self, webhook_url: String) -> Result<()> { + self.breez_services .unregister_webhook(webhook_url) .await - }) - .map_err(anyhow::Error::new::) -} - -/* Backup API's */ - -/// See [BreezServices::backup] -pub fn backup() -> Result<()> { - block_on(async { get_breez_services().await?.backup().await }) - .map_err(anyhow::Error::new::) -} - -/// See [BreezServices::backup_status] -pub fn backup_status() -> Result { - block_on(async { get_breez_services().await?.backup_status() }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Parse API's */ + /* Backup API's */ -pub fn parse_invoice(invoice: String) -> Result { - invoice::parse_invoice(&invoice).map_err(|e| anyhow::Error::new::(e.into())) -} + /// See [BreezServices::backup] + pub async fn backup(&self) -> Result<()> { + self.breez_services + .backup() + .await + .map_err(anyhow::Error::new::) + } -pub fn parse_input(input: String) -> Result { - block_on(async { input_parser::parse(&input).await }) -} + /// See [BreezServices::backup_status] + pub fn backup_status(&self) -> Result { + self.breez_services + .backup_status() + .map_err(anyhow::Error::new::) + } -/* Payment API's */ + /* Payment API's */ -/// See [BreezServices::list_payments] -pub fn list_payments(req: ListPaymentsRequest) -> Result> { - block_on(async { get_breez_services().await?.list_payments(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_payments] + pub async fn list_payments(&self, req: ListPaymentsRequest) -> Result> { + self.breez_services + .list_payments(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::list_payments] -pub fn payment_by_hash(hash: String) -> Result> { - block_on(async { get_breez_services().await?.payment_by_hash(hash).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_payments] + pub async fn payment_by_hash(&self, hash: String) -> Result> { + self.breez_services + .payment_by_hash(hash) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::set_payment_metadata] -pub fn set_payment_metadata(hash: String, metadata: String) -> Result<()> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::set_payment_metadata] + pub async fn set_payment_metadata(&self, hash: String, metadata: String) -> Result<()> { + self.breez_services .set_payment_metadata(hash, metadata) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Lightning Payment API's */ + /* Lightning Payment API's */ -/// See [BreezServices::send_payment] -pub fn send_payment(req: SendPaymentRequest) -> Result { - block_on(async { get_breez_services().await?.send_payment(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::send_payment] + pub async fn send_payment(&self, req: SendPaymentRequest) -> Result { + self.breez_services + .send_payment(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::send_spontaneous_payment] -pub fn send_spontaneous_payment(req: SendSpontaneousPaymentRequest) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::send_spontaneous_payment] + pub async fn send_spontaneous_payment( + &self, + req: SendSpontaneousPaymentRequest, + ) -> Result { + self.breez_services .send_spontaneous_payment(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::receive_payment] -pub fn receive_payment(req: ReceivePaymentRequest) -> Result { - block_on(async { get_breez_services().await?.receive_payment(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::receive_payment] + pub async fn receive_payment( + &self, + req: ReceivePaymentRequest, + ) -> Result { + self.breez_services + .receive_payment(req) + .await + .map_err(anyhow::Error::new::) + } -/* LNURL API's */ + /* LNURL API's */ -/// See [BreezServices::lnurl_pay] -pub fn lnurl_pay(req: LnUrlPayRequest) -> Result { - block_on(async { get_breez_services().await?.lnurl_pay(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lnurl_pay] + pub async fn lnurl_pay(&self, req: LnUrlPayRequest) -> Result { + self.breez_services + .lnurl_pay(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lnurl_withdraw] -pub fn lnurl_withdraw(req: LnUrlWithdrawRequest) -> Result { - block_on(async { get_breez_services().await?.lnurl_withdraw(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lnurl_withdraw] + pub async fn lnurl_withdraw(&self, req: LnUrlWithdrawRequest) -> Result { + self.breez_services + .lnurl_withdraw(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::lnurl_auth] -pub fn lnurl_auth(req_data: LnUrlAuthRequestData) -> Result { - block_on(async { get_breez_services().await?.lnurl_auth(req_data).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::lnurl_auth] + pub async fn lnurl_auth(&self, req_data: LnUrlAuthRequestData) -> Result { + self.breez_services + .lnurl_auth(req_data) + .await + .map_err(anyhow::Error::new::) + } -/* Support API */ + /* Support API */ -/// See [BreezServices::report_issue] -pub fn report_issue(req: ReportIssueRequest) -> Result<()> { - block_on(async { get_breez_services().await?.report_issue(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::report_issue] + pub async fn report_issue(&self, req: ReportIssueRequest) -> Result<()> { + self.breez_services + .report_issue(req) + .await + .map_err(anyhow::Error::new::) + } -/* Fiat Currency API's */ + /* Fiat Currency API's */ -/// See [BreezServices::fetch_fiat_rates] -pub fn fetch_fiat_rates() -> Result> { - block_on(async { get_breez_services().await?.fetch_fiat_rates().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::fetch_fiat_rates] + pub async fn fetch_fiat_rates(&self) -> Result> { + self.breez_services + .fetch_fiat_rates() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::list_fiat_currencies] -pub fn list_fiat_currencies() -> Result> { - block_on(async { get_breez_services().await?.list_fiat_currencies().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_fiat_currencies] + pub async fn list_fiat_currencies(&self) -> Result> { + self.breez_services + .list_fiat_currencies() + .await + .map_err(anyhow::Error::new::) + } -/* On-Chain Swap API's */ + /* On-Chain Swap API's */ -/// See [BreezServices::max_reverse_swap_amount] -pub fn max_reverse_swap_amount() -> Result { - #[allow(deprecated)] - block_on(async { get_breez_services().await?.max_reverse_swap_amount().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::max_reverse_swap_amount] + pub async fn max_reverse_swap_amount(&self) -> Result { + #[allow(deprecated)] + self.breez_services + .max_reverse_swap_amount() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::send_onchain] -pub fn send_onchain(req: SendOnchainRequest) -> Result { - #[allow(deprecated)] - block_on(async { get_breez_services().await?.send_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::send_onchain] + pub async fn send_onchain(&self, req: SendOnchainRequest) -> Result { + #[allow(deprecated)] + self.breez_services + .send_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::pay_onchain] -pub fn pay_onchain(req: PayOnchainRequest) -> Result { - block_on(async { get_breez_services().await?.pay_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::pay_onchain] + pub async fn pay_onchain(&self, req: PayOnchainRequest) -> Result { + self.breez_services + .pay_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::receive_onchain] -pub fn receive_onchain(req: ReceiveOnchainRequest) -> Result { - block_on(async { get_breez_services().await?.receive_onchain(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::receive_onchain] + pub async fn receive_onchain(&self, req: ReceiveOnchainRequest) -> Result { + self.breez_services + .receive_onchain(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::buy_bitcoin] -pub fn buy_bitcoin(req: BuyBitcoinRequest) -> Result { - block_on(async { get_breez_services().await?.buy_bitcoin(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::buy_bitcoin] + pub async fn buy_bitcoin(&self, req: BuyBitcoinRequest) -> Result { + self.breez_services + .buy_bitcoin(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::redeem_onchain_funds] -pub fn redeem_onchain_funds(req: RedeemOnchainFundsRequest) -> Result { - block_on(async { get_breez_services().await?.redeem_onchain_funds(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::redeem_onchain_funds] + pub async fn redeem_onchain_funds( + &self, + req: RedeemOnchainFundsRequest, + ) -> Result { + self.breez_services + .redeem_onchain_funds(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_redeem_onchain_funds] -pub fn prepare_redeem_onchain_funds( - req: PrepareRedeemOnchainFundsRequest, -) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::prepare_redeem_onchain_funds] + pub async fn prepare_redeem_onchain_funds( + &self, + req: PrepareRedeemOnchainFundsRequest, + ) -> Result { + self.breez_services .prepare_redeem_onchain_funds(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Refundables API's */ + /* Refundables API's */ -/// See [BreezServices::list_refundables] -pub fn list_refundables() -> Result> { - block_on(async { get_breez_services().await?.list_refundables().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::list_refundables] + pub async fn list_refundables(&self) -> Result> { + self.breez_services + .list_refundables() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_refund] -pub fn prepare_refund(req: PrepareRefundRequest) -> Result { - block_on(async { get_breez_services().await?.prepare_refund(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::prepare_refund] + pub async fn prepare_refund(&self, req: PrepareRefundRequest) -> Result { + self.breez_services + .prepare_refund(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::refund] -pub fn refund(req: RefundRequest) -> Result { - block_on(async { get_breez_services().await?.refund(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::refund] + pub async fn refund(&self, req: RefundRequest) -> Result { + self.breez_services + .refund(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::rescan_swaps] -pub fn rescan_swaps() -> Result<()> { - block_on(async { get_breez_services().await?.rescan_swaps().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::rescan_swaps] + pub async fn rescan_swaps(&self) -> Result<()> { + self.breez_services + .rescan_swaps() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::redeem_swap] -pub fn redeem_swap(swap_address: String) -> Result<()> { - block_on(async { get_breez_services().await?.redeem_swap(swap_address).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::redeem_swap] + pub async fn redeem_swap(&self, swap_address: String) -> Result<()> { + self.breez_services + .redeem_swap(swap_address) + .await + .map_err(anyhow::Error::new::) + } -/* In Progress Swap API's */ + /* In Progress Swap API's */ -/// See [BreezServices::in_progress_swap] -pub fn in_progress_swap() -> Result> { - block_on(async { get_breez_services().await?.in_progress_swap().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::in_progress_swap] + pub async fn in_progress_swap(&self) -> Result> { + self.breez_services + .in_progress_swap() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::in_progress_reverse_swaps] -pub fn in_progress_reverse_swaps() -> Result> { - #[allow(deprecated)] - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::in_progress_reverse_swaps] + pub async fn in_progress_reverse_swaps(&self) -> Result> { + #[allow(deprecated)] + self.breez_services .in_progress_reverse_swaps() .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/* Swap Fee API's */ + /* Swap Fee API's */ -/// See [BreezServices::open_channel_fee] -pub fn open_channel_fee(req: OpenChannelFeeRequest) -> Result { - block_on(async { get_breez_services().await?.open_channel_fee(req).await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::open_channel_fee] + pub async fn open_channel_fee( + &self, + req: OpenChannelFeeRequest, + ) -> Result { + self.breez_services + .open_channel_fee(req) + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::fetch_reverse_swap_fees] -pub fn fetch_reverse_swap_fees(req: ReverseSwapFeesRequest) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::fetch_reverse_swap_fees] + pub async fn fetch_reverse_swap_fees( + &self, + req: ReverseSwapFeesRequest, + ) -> Result { + self.breez_services .fetch_reverse_swap_fees(req) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::onchain_payment_limits] -pub fn onchain_payment_limits() -> Result { - block_on(async { get_breez_services().await?.onchain_payment_limits().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::onchain_payment_limits] + pub async fn onchain_payment_limits(&self) -> Result { + self.breez_services + .onchain_payment_limits() + .await + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::prepare_onchain_payment] -pub fn prepare_onchain_payment( - req: PrepareOnchainPaymentRequest, -) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::prepare_onchain_payment] + pub async fn prepare_onchain_payment( + &self, + req: PrepareOnchainPaymentRequest, + ) -> Result { + self.breez_services .prepare_onchain_payment(req) .await .map_err(anyhow::Error::new::) - }) -} + } -/// See [BreezServices::in_progress_onchain_payments] -pub fn in_progress_onchain_payments() -> Result> { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::in_progress_onchain_payments] + pub async fn in_progress_onchain_payments(&self) -> Result> { + self.breez_services .in_progress_onchain_payments() .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::recommended_fees] -pub fn recommended_fees() -> Result { - block_on(async { get_breez_services().await?.recommended_fees().await }) - .map_err(anyhow::Error::new::) -} + /// See [BreezServices::recommended_fees] + pub async fn recommended_fees(&self) -> Result { + self.breez_services + .recommended_fees() + .await + .map_err(anyhow::Error::new::) + } -/* CLI API's */ + /* CLI API's */ -/// See [BreezServices::execute_dev_command] -pub fn execute_command(command: String) -> Result { - block_on(async { - get_breez_services() - .await? + /// See [BreezServices::execute_dev_command] + pub async fn execute_command(&self, command: String) -> Result { + self.breez_services .execute_dev_command(command) .await - }) - .map_err(anyhow::Error::new::) -} + .map_err(anyhow::Error::new::) + } -/// See [BreezServices::generate_diagnostic_data] -pub fn generate_diagnostic_data() -> Result { - block_on(async { get_breez_services().await?.generate_diagnostic_data().await }) - .map_err(anyhow::Error::new::) + /// See [BreezServices::generate_diagnostic_data] + pub async fn generate_diagnostic_data(&self) -> Result { + self.breez_services + .generate_diagnostic_data() + .await + .map_err(anyhow::Error::new::) + } } - /* Binding Related Logic */ struct BindingEventListener; @@ -582,19 +553,59 @@ impl log::Log for BindingLogger { fn flush(&self) {} } -async fn get_breez_services() -> Result, SdkError> { - match BREEZ_SERVICES_INSTANCE.lock().await.as_ref() { - None => Err(SdkError::Generic { - err: "Node service was not initialized".into(), - }), - Some(sdk) => Ok(sdk.clone()), - } +/* Parse API's */ + +pub fn parse_invoice(invoice: String) -> Result { + invoice::parse_invoice(&invoice).map_err(|e| anyhow::Error::new::(e.into())) +} + +pub async fn parse_input(input: String) -> Result { + input_parser::parse(&input).await +} + +/* Breez Services Helper API's */ + +/// See [breez_services::mnemonic_to_seed] +pub fn mnemonic_to_seed(phrase: String) -> Result> { + breez_services::mnemonic_to_seed(phrase) +} + +/// See [BreezServices::default_config] +pub fn default_config( + env_type: EnvironmentType, + api_key: String, + node_config: NodeConfig, +) -> Config { + BreezServices::default_config(env_type, api_key, node_config) } -fn block_on(future: F) -> F::Output { - rt().block_on(future) +/// See [BreezServices::static_backup] +pub fn static_backup(req: StaticBackupRequest) -> Result { + BreezServices::static_backup(req).map_err(anyhow::Error::new::) } -pub(crate) fn rt() -> &'static tokio::runtime::Runtime { - &RT +/// See [BreezServices::service_health_check] +pub async fn service_health_check(api_key: String) -> Result { + BreezServices::service_health_check(api_key) + .await + .map_err(anyhow::Error::new::) +} + +/* Stream API's */ + +/// If used, this must be called before `connect`. It can only be called once. +pub fn breez_events_stream(s: StreamSink) -> Result<()> { + NOTIFICATION_STREAM + .set(s) + .map_err(|_| anyhow!("Events stream already created"))?; + Ok(()) +} + +/// If used, this must be called before `connect`. It can only be called once. +pub fn breez_log_stream(s: StreamSink) -> Result<()> { + LOG_INIT + .set(true) + .map_err(|_| anyhow!("Log stream already created"))?; + BindingLogger::init(s); + Ok(()) } diff --git a/libs/sdk-core/src/frb_generated.io.rs b/libs/sdk-core/src/frb_generated.io.rs index 873db2bd9..eeb9870af 100644 --- a/libs/sdk-core/src/frb_generated.io.rs +++ b/libs/sdk-core/src/frb_generated.io.rs @@ -4,6 +4,7 @@ // Section: imports use super::*; +use crate::binding::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::transform_result_dco; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -22,6 +23,33 @@ impl CstDecode unimplemented!() } } +impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> BindingBreezServices { + flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(CstDecode::< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >::cst_decode( + self + )) + } +} +impl + CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + > for usize +{ + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode( + self, + ) -> RustOpaqueNom> + { + unsafe { decode_rust_opaque_nom(self as _) } + } +} impl CstDecode< StreamSink, @@ -666,6 +694,32 @@ impl CstDecode for wire_cst_configure_node_ } } } +impl CstDecode for wire_cst_connect_error { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> crate::error::ConnectError { + match self.tag { + 0 => { + let ans = unsafe { self.kind.Generic }; + crate::error::ConnectError::Generic { + err: ans.err.cst_decode(), + } + } + 1 => { + let ans = unsafe { self.kind.RestoreOnly }; + crate::error::ConnectError::RestoreOnly { + err: ans.err.cst_decode(), + } + } + 2 => { + let ans = unsafe { self.kind.ServiceConnectivity }; + crate::error::ConnectError::ServiceConnectivity { + err: ans.err.cst_decode(), + } + } + _ => unreachable!(), + } + } +} impl CstDecode for wire_cst_connect_request { // Codec=Cst (C-struct based), see doc to use other codecs fn cst_decode(self) -> crate::models::ConnectRequest { @@ -2021,6 +2075,19 @@ impl Default for wire_cst_configure_node_request { Self::new_with_null_ptr() } } +impl NewWithNullPtr for wire_cst_connect_error { + fn new_with_null_ptr() -> Self { + Self { + tag: -1, + kind: ConnectErrorKind { nil__: () }, + } + } +} +impl Default for wire_cst_connect_error { + fn default() -> Self { + Self::new_with_null_ptr() + } +} impl NewWithNullPtr for wire_cst_connect_request { fn new_with_null_ptr() -> Self { Self { @@ -3194,407 +3261,510 @@ impl Default for wire_cst_url_success_action_data { } #[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__breez_events_stream( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup( port_: i64, - s: *mut wire_cst_list_prim_u_8_strict, + that: usize, ) { - wire__crate__binding__breez_events_stream_impl(port_, s) + wire__crate__binding__BindingBreezServices_backup_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_log_stream( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status( port_: i64, - s: *mut wire_cst_list_prim_u_8_strict, + that: usize, ) { - wire__crate__binding__breez_log_stream_impl(port_, s) + wire__crate__binding__BindingBreezServices_backup_status_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__buy_bitcoin( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin( port_: i64, + that: usize, req: *mut wire_cst_buy_bitcoin_request, ) { - wire__crate__binding__buy_bitcoin_impl(port_, req) + wire__crate__binding__BindingBreezServices_buy_bitcoin_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__check_message( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message( port_: i64, + that: usize, req: *mut wire_cst_check_message_request, ) { - wire__crate__binding__check_message_impl(port_, req) -} - -#[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_) + wire__crate__binding__BindingBreezServices_check_message_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__configure_node( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels( port_: i64, - req: *mut wire_cst_configure_node_request, + that: usize, ) { - wire__crate__binding__configure_node_impl(port_, req) + wire__crate__binding__BindingBreezServices_close_lsp_channels_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node( port_: i64, - req: *mut wire_cst_connect_request, + that: usize, + req: *mut wire_cst_configure_node_request, ) { - wire__crate__binding__connect_impl(port_, req) + wire__crate__binding__BindingBreezServices_configure_node_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect_lsp( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp( port_: i64, + that: usize, lsp_id: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__connect_lsp_impl(port_, lsp_id) + wire__crate__binding__BindingBreezServices_connect_lsp_impl(port_, that, lsp_id) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__default_config( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect( port_: i64, - env_type: i32, - api_key: *mut wire_cst_list_prim_u_8_strict, - node_config: *mut wire_cst_node_config, + that: usize, ) { - 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_) + wire__crate__binding__BindingBreezServices_disconnect_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__execute_command( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command( port_: i64, + that: usize, command: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__execute_command_impl(port_, command) + wire__crate__binding__BindingBreezServices_execute_command_impl(port_, that, 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_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_fetch_fiat_rates_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info( port_: i64, + that: usize, id: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__fetch_lsp_info_impl(port_, id) + wire__crate__binding__BindingBreezServices_fetch_lsp_info_impl(port_, that, id) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( port_: i64, + that: usize, req: *mut wire_cst_reverse_swap_fees_request, ) { - wire__crate__binding__fetch_reverse_swap_fees_impl(port_, req) + wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees_impl(port_, that, 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_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_generate_diagnostic_data_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(port_: i64) { - wire__crate__binding__in_progress_reverse_swaps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_onchain_payments_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__in_progress_swap(port_: i64) { - wire__crate__binding__in_progress_swap_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__is_initialized(port_: i64) { - wire__crate__binding__is_initialized_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_in_progress_swap_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(port_: i64) { - wire__crate__binding__list_fiat_currencies_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_fiat_currencies_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_lsps(port_: i64) { - wire__crate__binding__list_lsps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_lsps_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_payments( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments( port_: i64, + that: usize, req: *mut wire_cst_list_payments_request, ) { - wire__crate__binding__list_payments_impl(port_, req) + wire__crate__binding__BindingBreezServices_list_payments_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__list_refundables(port_: i64) { - wire__crate__binding__list_refundables_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_list_refundables_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_auth( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth( port_: i64, + that: usize, req_data: *mut wire_cst_ln_url_auth_request_data, ) { - wire__crate__binding__lnurl_auth_impl(port_, req_data) + wire__crate__binding__BindingBreezServices_lnurl_auth_impl(port_, that, req_data) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_pay( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay( port_: i64, + that: usize, req: *mut wire_cst_ln_url_pay_request, ) { - wire__crate__binding__lnurl_pay_impl(port_, req) + wire__crate__binding__BindingBreezServices_lnurl_pay_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw( port_: i64, + that: usize, req: *mut wire_cst_ln_url_withdraw_request, ) { - wire__crate__binding__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_) + wire__crate__binding__BindingBreezServices_lnurl_withdraw_impl(port_, that, req) } #[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( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id( port_: i64, - phrase: *mut wire_cst_list_prim_u_8_strict, + that: usize, ) { - wire__crate__binding__mnemonic_to_seed_impl(port_, phrase) + wire__crate__binding__BindingBreezServices_lsp_id_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_credentials(port_: i64) { - wire__crate__binding__node_credentials_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_lsp_info_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__node_info(port_: i64) { - wire__crate__binding__node_info_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_max_reverse_swap_amount_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(port_: i64) { - wire__crate__binding__onchain_payment_limits_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_node_credentials_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__open_channel_fee( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info( port_: i64, - req: *mut wire_cst_open_channel_fee_request, + that: usize, ) { - wire__crate__binding__open_channel_fee_impl(port_, req) + wire__crate__binding__BindingBreezServices_node_info_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_input( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits( port_: i64, - input: *mut wire_cst_list_prim_u_8_strict, + that: usize, ) { - wire__crate__binding__parse_input_impl(port_, input) + wire__crate__binding__BindingBreezServices_onchain_payment_limits_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_invoice( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee( port_: i64, - invoice: *mut wire_cst_list_prim_u_8_strict, + that: usize, + req: *mut wire_cst_open_channel_fee_request, ) { - wire__crate__binding__parse_invoice_impl(port_, invoice) + wire__crate__binding__BindingBreezServices_open_channel_fee_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__pay_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain( port_: i64, + that: usize, req: *mut wire_cst_pay_onchain_request, ) { - wire__crate__binding__pay_onchain_impl(port_, req) + wire__crate__binding__BindingBreezServices_pay_onchain_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__payment_by_hash( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash( port_: i64, + that: usize, hash: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__payment_by_hash_impl(port_, hash) + wire__crate__binding__BindingBreezServices_payment_by_hash_impl(port_, that, hash) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment( port_: i64, + that: usize, req: *mut wire_cst_prepare_onchain_payment_request, ) { - wire__crate__binding__prepare_onchain_payment_impl(port_, req) + wire__crate__binding__BindingBreezServices_prepare_onchain_payment_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( port_: i64, + that: usize, req: *mut wire_cst_prepare_redeem_onchain_funds_request, ) { - wire__crate__binding__prepare_redeem_onchain_funds_impl(port_, req) + wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__prepare_refund( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund( port_: i64, + that: usize, req: *mut wire_cst_prepare_refund_request, ) { - wire__crate__binding__prepare_refund_impl(port_, req) + wire__crate__binding__BindingBreezServices_prepare_refund_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain( port_: i64, + that: usize, req: *mut wire_cst_receive_onchain_request, ) { - wire__crate__binding__receive_onchain_impl(port_, req) + wire__crate__binding__BindingBreezServices_receive_onchain_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__receive_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment( port_: i64, + that: usize, req: *mut wire_cst_receive_payment_request, ) { - wire__crate__binding__receive_payment_impl(port_, req) + wire__crate__binding__BindingBreezServices_receive_payment_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__recommended_fees(port_: i64) { - wire__crate__binding__recommended_fees_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_recommended_fees_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds( port_: i64, + that: usize, req: *mut wire_cst_redeem_onchain_funds_request, ) { - wire__crate__binding__redeem_onchain_funds_impl(port_, req) + wire__crate__binding__BindingBreezServices_redeem_onchain_funds_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__redeem_swap( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap( port_: i64, + that: usize, swap_address: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__redeem_swap_impl(port_, swap_address) + wire__crate__binding__BindingBreezServices_redeem_swap_impl(port_, that, swap_address) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__refund( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund( port_: i64, + that: usize, req: *mut wire_cst_refund_request, ) { - wire__crate__binding__refund_impl(port_, req) + wire__crate__binding__BindingBreezServices_refund_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__register_webhook( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook( port_: i64, + that: usize, webhook_url: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__register_webhook_impl(port_, webhook_url) + wire__crate__binding__BindingBreezServices_register_webhook_impl(port_, that, webhook_url) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__report_issue( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue( port_: i64, + that: usize, req: *mut wire_cst_report_issue_request, ) { - wire__crate__binding__report_issue_impl(port_, req) + wire__crate__binding__BindingBreezServices_report_issue_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__rescan_swaps(port_: i64) { - wire__crate__binding__rescan_swaps_impl(port_) +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_rescan_swaps_impl(port_, that) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_onchain( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain( port_: i64, + that: usize, req: *mut wire_cst_send_onchain_request, ) { - wire__crate__binding__send_onchain_impl(port_, req) + wire__crate__binding__BindingBreezServices_send_onchain_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment( port_: i64, + that: usize, req: *mut wire_cst_send_payment_request, ) { - wire__crate__binding__send_payment_impl(port_, req) + wire__crate__binding__BindingBreezServices_send_payment_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment( port_: i64, + that: usize, req: *mut wire_cst_send_spontaneous_payment_request, ) { - wire__crate__binding__send_spontaneous_payment_impl(port_, req) + wire__crate__binding__BindingBreezServices_send_spontaneous_payment_impl(port_, that, req) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__service_health_check( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata( + port_: i64, + that: usize, + hash: *mut wire_cst_list_prim_u_8_strict, + metadata: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_set_payment_metadata_impl( + port_, that, hash, metadata, + ) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message( + port_: i64, + that: usize, + req: *mut wire_cst_sign_message_request, +) { + wire__crate__binding__BindingBreezServices_sign_message_impl(port_, that, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync( + port_: i64, + that: usize, +) { + wire__crate__binding__BindingBreezServices_sync_impl(port_, that) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook( + port_: i64, + that: usize, + webhook_url: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__BindingBreezServices_unregister_webhook_impl(port_, that, webhook_url) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_events_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__breez_events_stream_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__breez_log_stream( + port_: i64, + s: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__breez_log_stream_impl(port_, s) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__connect( + port_: i64, + req: *mut wire_cst_connect_request, +) { + wire__crate__binding__connect_impl(port_, req) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__default_config( port_: i64, + env_type: i32, api_key: *mut wire_cst_list_prim_u_8_strict, + node_config: *mut wire_cst_node_config, ) { - wire__crate__binding__service_health_check_impl(port_, api_key) + 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__set_payment_metadata( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed( port_: i64, - hash: *mut wire_cst_list_prim_u_8_strict, - metadata: *mut wire_cst_list_prim_u_8_strict, + phrase: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__set_payment_metadata_impl(port_, hash, metadata) + wire__crate__binding__mnemonic_to_seed_impl(port_, phrase) } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sign_message( +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_input( port_: i64, - req: *mut wire_cst_sign_message_request, + input: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__parse_input_impl(port_, input) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__parse_invoice( + port_: i64, + invoice: *mut wire_cst_list_prim_u_8_strict, +) { + wire__crate__binding__parse_invoice_impl(port_, invoice) +} + +#[no_mangle] +pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__service_health_check( + port_: i64, + api_key: *mut wire_cst_list_prim_u_8_strict, ) { - wire__crate__binding__sign_message_impl(port_, req) + wire__crate__binding__service_health_check_impl(port_, api_key) } #[no_mangle] @@ -3606,16 +3776,21 @@ pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__static_backup( } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__sync(port_: i64) { - wire__crate__binding__sync_impl(port_) +pub extern "C" fn frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr: *const std::ffi::c_void, +) { + unsafe { + StdArc::>::increment_strong_count(ptr as _); + } } #[no_mangle] -pub extern "C" fn frbgen_breez_sdk_wire__crate__binding__unregister_webhook( - port_: i64, - webhook_url: *mut wire_cst_list_prim_u_8_strict, +pub extern "C" fn frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr: *const std::ffi::c_void, ) { - wire__crate__binding__unregister_webhook_impl(port_, webhook_url) + unsafe { + StdArc::>::decrement_strong_count(ptr as _); + } } #[no_mangle] @@ -4423,6 +4598,35 @@ pub struct wire_cst_configure_node_request { } #[repr(C)] #[derive(Clone, Copy)] +pub struct wire_cst_connect_error { + tag: i32, + kind: ConnectErrorKind, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub union ConnectErrorKind { + Generic: wire_cst_ConnectError_Generic, + RestoreOnly: wire_cst_ConnectError_RestoreOnly, + ServiceConnectivity: wire_cst_ConnectError_ServiceConnectivity, + nil__: (), +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_Generic { + err: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_RestoreOnly { + err: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] +pub struct wire_cst_ConnectError_ServiceConnectivity { + err: *mut wire_cst_list_prim_u_8_strict, +} +#[repr(C)] +#[derive(Clone, Copy)] pub struct wire_cst_connect_request { config: wire_cst_config, seed: *mut wire_cst_list_prim_u_8_strict, diff --git a/libs/sdk-core/src/frb_generated.rs b/libs/sdk-core/src/frb_generated.rs index d3c83e39a..037afadac 100644 --- a/libs/sdk-core/src/frb_generated.rs +++ b/libs/sdk-core/src/frb_generated.rs @@ -21,6 +21,7 @@ // Section: imports +use crate::binding::*; use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt}; use flutter_rust_bridge::for_generated::transform_result_dco; use flutter_rust_bridge::{Handler, IntoIntoDart}; @@ -33,7 +34,7 @@ flutter_rust_bridge::frb_generated_boilerplate!( default_rust_auto_opaque = RustAutoOpaqueNom, ); pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.0.0-dev.36"; -pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1499828454; +pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = -1104475804; // Section: executor @@ -41,888 +42,1367 @@ flutter_rust_bridge::frb_generated_default_handler!(); // Section: wire_funcs -fn wire__crate__binding__backup_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "backup", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::backup())()), - ) -} -fn wire__crate__binding__backup_status_impl( +fn wire__crate__binding__BindingBreezServices_backup_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "backup_status", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::backup_status())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_backup", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::backup(&api_that).await + })().await) + } }) } -fn wire__crate__binding__breez_events_stream_impl( +fn wire__crate__binding__BindingBreezServices_backup_status_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - s: impl CstDecode< - StreamSink, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "breez_events_stream", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_s = s.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::breez_events_stream(api_s))()) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_backup_status", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco((move || { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), } - }, - ) -} -fn wire__crate__binding__breez_log_stream_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - s: impl CstDecode>, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "breez_log_stream", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_s = s.cst_decode(); - move |context| transform_result_dco((move || crate::binding::breez_log_stream(api_s))()) - }, - ) + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::backup_status(&api_that) + })()) + } }) } -fn wire__crate__binding__buy_bitcoin_impl( +fn wire__crate__binding__BindingBreezServices_buy_bitcoin_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "buy_bitcoin", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::buy_bitcoin(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_buy_bitcoin", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::buy_bitcoin(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__check_message_impl( +fn wire__crate__binding__BindingBreezServices_check_message_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "check_message", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::check_message(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_check_message", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::check_message(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__close_lsp_channels_impl( +fn wire__crate__binding__BindingBreezServices_close_lsp_channels_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "close_lsp_channels", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| transform_result_dco((move || crate::binding::close_lsp_channels())()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_close_lsp_channels", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::close_lsp_channels(&api_that).await + })().await) + } }) } -fn wire__crate__binding__configure_node_impl( +fn wire__crate__binding__BindingBreezServices_configure_node_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "configure_node", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::configure_node(api_req))()) - }, - ) -} -fn wire__crate__binding__connect_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "connect", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::connect(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_configure_node", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::configure_node(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__connect_lsp_impl( +fn wire__crate__binding__BindingBreezServices_connect_lsp_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, lsp_id: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "connect_lsp", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_lsp_id = lsp_id.cst_decode(); - move |context| transform_result_dco((move || crate::binding::connect_lsp(api_lsp_id))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_connect_lsp", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_lsp_id = lsp_id.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::connect_lsp(&api_that, api_lsp_id).await + })().await) + } }) } -fn wire__crate__binding__default_config_impl( +fn wire__crate__binding__BindingBreezServices_disconnect_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - env_type: impl CstDecode, - api_key: impl CstDecode, - node_config: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "default_config", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_env_type = env_type.cst_decode(); - let api_api_key = api_key.cst_decode(); - let api_node_config = node_config.cst_decode(); - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::binding::default_config( - api_env_type, - api_api_key, - api_node_config, - )) - })()) - } - }, - ) -} -fn wire__crate__binding__disconnect_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "disconnect", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::disconnect())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_disconnect", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::disconnect(&api_that).await + })().await) + } }) } -fn wire__crate__binding__execute_command_impl( +fn wire__crate__binding__BindingBreezServices_execute_command_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, command: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "execute_command", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_command = command.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::execute_command(api_command))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_execute_command", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_command = command.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::execute_command(&api_that, api_command).await + })().await) + } }) } -fn wire__crate__binding__fetch_fiat_rates_impl( +fn wire__crate__binding__BindingBreezServices_fetch_fiat_rates_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "fetch_fiat_rates", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::fetch_fiat_rates())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_fiat_rates", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_fiat_rates(&api_that).await + })().await) + } }) } -fn wire__crate__binding__fetch_lsp_info_impl( +fn wire__crate__binding__BindingBreezServices_fetch_lsp_info_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, id: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "fetch_lsp_info", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_id = id.cst_decode(); - move |context| transform_result_dco((move || crate::binding::fetch_lsp_info(api_id))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_lsp_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_id = id.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_lsp_info(&api_that, api_id).await + })().await) + } }) } -fn wire__crate__binding__fetch_reverse_swap_fees_impl( +fn wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "fetch_reverse_swap_fees", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::fetch_reverse_swap_fees(api_req))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_fetch_reverse_swap_fees", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::fetch_reverse_swap_fees(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__generate_diagnostic_data_impl( +fn wire__crate__binding__BindingBreezServices_generate_diagnostic_data_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "generate_diagnostic_data", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || crate::binding::generate_diagnostic_data())()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_generate_diagnostic_data", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::generate_diagnostic_data(&api_that).await + })().await) + } }) } -fn wire__crate__binding__in_progress_onchain_payments_impl( +fn wire__crate__binding__BindingBreezServices_in_progress_onchain_payments_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "in_progress_onchain_payments", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || crate::binding::in_progress_onchain_payments())()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_onchain_payments", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_onchain_payments(&api_that).await + })().await) + } }) } -fn wire__crate__binding__in_progress_reverse_swaps_impl( +fn wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "in_progress_reverse_swaps", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || crate::binding::in_progress_reverse_swaps())()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_reverse_swaps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_reverse_swaps(&api_that).await + })().await) + } }) } -fn wire__crate__binding__in_progress_swap_impl( +fn wire__crate__binding__BindingBreezServices_in_progress_swap_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "in_progress_swap", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::in_progress_swap())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_in_progress_swap", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::in_progress_swap(&api_that).await + })().await) + } }) } -fn wire__crate__binding__is_initialized_impl( +fn wire__crate__binding__BindingBreezServices_list_fiat_currencies_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "is_initialized", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || { - Result::<_, ()>::Ok(crate::binding::is_initialized()) - })()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_fiat_currencies", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_fiat_currencies(&api_that).await + })().await) + } }) } -fn wire__crate__binding__list_fiat_currencies_impl( +fn wire__crate__binding__BindingBreezServices_list_lsps_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "list_fiat_currencies", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| transform_result_dco((move || crate::binding::list_fiat_currencies())()) - }, - ) -} -fn wire__crate__binding__list_lsps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "list_lsps", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::list_lsps())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_lsps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_lsps(&api_that).await + })().await) + } }) } -fn wire__crate__binding__list_payments_impl( +fn wire__crate__binding__BindingBreezServices_list_payments_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "list_payments", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::list_payments(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_payments", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_payments(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__list_refundables_impl( +fn wire__crate__binding__BindingBreezServices_list_refundables_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "list_refundables", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::list_refundables())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_list_refundables", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::list_refundables(&api_that).await + })().await) + } }) } -fn wire__crate__binding__lnurl_auth_impl( +fn wire__crate__binding__BindingBreezServices_lnurl_auth_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req_data: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "lnurl_auth", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req_data = req_data.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::lnurl_auth(api_req_data) - })()) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_auth", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req_data = req_data.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_auth(&api_that, api_req_data).await + })().await) } }) } -fn wire__crate__binding__lnurl_pay_impl( +fn wire__crate__binding__BindingBreezServices_lnurl_pay_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "lnurl_pay", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::lnurl_pay(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_pay", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_pay(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__lnurl_withdraw_impl( +fn wire__crate__binding__BindingBreezServices_lnurl_withdraw_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "lnurl_withdraw", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::lnurl_withdraw(api_req))()) - }, - ) -} -fn wire__crate__binding__lsp_id_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "lsp_id", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::lsp_id())()), - ) -} -fn wire__crate__binding__lsp_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "lsp_info", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::lsp_info())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lnurl_withdraw", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lnurl_withdraw(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__max_reverse_swap_amount_impl( +fn wire__crate__binding__BindingBreezServices_lsp_id_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "max_reverse_swap_amount", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - move |context| { - transform_result_dco((move || crate::binding::max_reverse_swap_amount())()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lsp_id", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lsp_id(&api_that).await + })().await) + } }) } -fn wire__crate__binding__mnemonic_to_seed_impl( +fn wire__crate__binding__BindingBreezServices_lsp_info_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - phrase: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "mnemonic_to_seed", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_phrase = phrase.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::mnemonic_to_seed(api_phrase))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_lsp_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::lsp_info(&api_that).await + })().await) + } }) } -fn wire__crate__binding__node_credentials_impl( +fn wire__crate__binding__BindingBreezServices_max_reverse_swap_amount_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "node_credentials", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::node_credentials())()), - ) -} -fn wire__crate__binding__node_info_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "node_info", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::node_info())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_max_reverse_swap_amount", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::max_reverse_swap_amount(&api_that).await + })().await) + } }) } -fn wire__crate__binding__onchain_payment_limits_impl( +fn wire__crate__binding__BindingBreezServices_node_credentials_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { move |context| { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_node_credentials", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { transform_result_dco((move || { - crate::binding::onchain_payment_limits() + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::node_credentials(&api_that) })()) } }) } -fn wire__crate__binding__open_channel_fee_impl( +fn wire__crate__binding__BindingBreezServices_node_info_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "open_channel_fee", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::open_channel_fee(api_req))()) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_node_info", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| { + transform_result_dco((move || { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_sync_ref(&api_that)), + _ => unreachable!(), } - }, - ) + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::node_info(&api_that) + })()) + } }) } -fn wire__crate__binding__parse_input_impl( +fn wire__crate__binding__BindingBreezServices_onchain_payment_limits_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - input: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "parse_input", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_input = input.cst_decode(); - move |context| transform_result_dco((move || crate::binding::parse_input(api_input))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_onchain_payment_limits", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::onchain_payment_limits(&api_that).await + })().await) + } }) } -fn wire__crate__binding__parse_invoice_impl( +fn wire__crate__binding__BindingBreezServices_open_channel_fee_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - invoice: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "parse_invoice", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_invoice = invoice.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::parse_invoice(api_invoice))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_open_channel_fee", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::open_channel_fee(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__pay_onchain_impl( +fn wire__crate__binding__BindingBreezServices_pay_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "pay_onchain", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::pay_onchain(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_pay_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::pay_onchain(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__payment_by_hash_impl( +fn wire__crate__binding__BindingBreezServices_payment_by_hash_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, hash: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "payment_by_hash", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_hash = hash.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::payment_by_hash(api_hash))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_payment_by_hash", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_hash = hash.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::payment_by_hash(&api_that, api_hash).await + })().await) + } }) } -fn wire__crate__binding__prepare_onchain_payment_impl( +fn wire__crate__binding__BindingBreezServices_prepare_onchain_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "prepare_onchain_payment", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::prepare_onchain_payment(api_req))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_onchain_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_onchain_payment(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__prepare_redeem_onchain_funds_impl( +fn wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "prepare_redeem_onchain_funds", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::binding::prepare_redeem_onchain_funds(api_req) - })()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_redeem_onchain_funds", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_redeem_onchain_funds(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__prepare_refund_impl( +fn wire__crate__binding__BindingBreezServices_prepare_refund_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "prepare_refund", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::prepare_refund(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_prepare_refund", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::prepare_refund(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__receive_onchain_impl( +fn wire__crate__binding__BindingBreezServices_receive_onchain_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::receive_onchain(api_req) - })()) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_receive_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::receive_onchain(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_receive_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_receive_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::receive_payment(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_recommended_fees_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_recommended_fees", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::recommended_fees(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_redeem_onchain_funds_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_redeem_onchain_funds", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::redeem_onchain_funds(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_redeem_swap_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + swap_address: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_redeem_swap", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_swap_address = swap_address.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::redeem_swap(&api_that, api_swap_address).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_refund_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_refund", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::refund(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_register_webhook_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + webhook_url: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_register_webhook", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_webhook_url = webhook_url.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::register_webhook(&api_that, api_webhook_url).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_report_issue_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_report_issue", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::report_issue(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_rescan_swaps_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_rescan_swaps", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::rescan_swaps(&api_that).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_send_onchain_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_onchain", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_onchain(&api_that, api_req).await + })().await) + } }) +} +fn wire__crate__binding__BindingBreezServices_send_payment_impl( + port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_payment(&api_that, api_req).await + })().await) } }) } -fn wire__crate__binding__receive_payment_impl( +fn wire__crate__binding__BindingBreezServices_send_spontaneous_payment_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "receive_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_req = req.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::receive_payment(api_req) - })()) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_send_spontaneous_payment", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::send_spontaneous_payment(&api_that, api_req).await + })().await) } }) } -fn wire__crate__binding__recommended_fees_impl( +fn wire__crate__binding__BindingBreezServices_set_payment_metadata_impl( port_: flutter_rust_bridge::for_generated::MessagePort, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + hash: impl CstDecode, + metadata: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "recommended_fees", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::recommended_fees())()), - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_set_payment_metadata", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_hash = hash.cst_decode();let api_metadata = metadata.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::set_payment_metadata(&api_that, api_hash, api_metadata).await + })().await) + } }) } -fn wire__crate__binding__redeem_onchain_funds_impl( +fn wire__crate__binding__BindingBreezServices_sign_message_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "redeem_onchain_funds", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::redeem_onchain_funds(api_req))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_sign_message", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_req = req.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::sign_message(&api_that, api_req).await + })().await) + } }) } -fn wire__crate__binding__redeem_swap_impl( +fn wire__crate__binding__BindingBreezServices_sync_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - swap_address: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "redeem_swap", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_swap_address = swap_address.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::redeem_swap(api_swap_address))()) - } - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_sync", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::sync(&api_that).await + })().await) + } }) } -fn wire__crate__binding__refund_impl( +fn wire__crate__binding__BindingBreezServices_unregister_webhook_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + that: impl CstDecode< + RustOpaqueNom< + flutter_rust_bridge::for_generated::RustAutoOpaqueInner, + >, + >, + webhook_url: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "refund", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::refund(api_req))()) - }, - ) + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::(flutter_rust_bridge::for_generated::TaskInfo{ debug_name: "BindingBreezServices_unregister_webhook", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal }, move || { let api_that = that.cst_decode();let api_webhook_url = webhook_url.cst_decode(); move |context| async move { + transform_result_dco((move || async move { + let mut api_that_decoded = None; +let decode_indices_ = flutter_rust_bridge::for_generated::rust_auto_opaque_decode_compute_order(vec![flutter_rust_bridge::for_generated::rust_auto_opaque_lock_order_info(&api_that, 0, false)]); + for i in decode_indices_ { + match i { + 0 => api_that_decoded = Some(flutter_rust_bridge::for_generated::rust_auto_opaque_decode_async_ref(&api_that).await), + _ => unreachable!(), + } + } + let api_that = api_that_decoded.unwrap(); + crate::binding::BindingBreezServices::unregister_webhook(&api_that, api_webhook_url).await + })().await) + } }) } -fn wire__crate__binding__register_webhook_impl( +fn wire__crate__binding__breez_events_stream_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - webhook_url: impl CstDecode, + s: impl CstDecode< + StreamSink, + >, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "register_webhook", + debug_name: "breez_events_stream", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_webhook_url = webhook_url.cst_decode(); + let api_s = s.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::register_webhook(api_webhook_url))()) + transform_result_dco((move || crate::binding::breez_events_stream(api_s))()) } }, ) } -fn wire__crate__binding__report_issue_impl( +fn wire__crate__binding__breez_log_stream_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + s: impl CstDecode>, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "report_issue", + debug_name: "breez_log_stream", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::report_issue(api_req))()) - }, - ) -} -fn wire__crate__binding__rescan_swaps_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "rescan_swaps", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, + let api_s = s.cst_decode(); + move |context| transform_result_dco((move || crate::binding::breez_log_stream(api_s))()) }, - move || move |context| transform_result_dco((move || crate::binding::rescan_swaps())()), ) } -fn wire__crate__binding__send_onchain_impl( +fn wire__crate__binding__connect_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + req: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "send_onchain", + debug_name: "connect", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::send_onchain(api_req))()) + move |context| async move { + transform_result_dco( + (move || async move { crate::binding::connect(api_req).await })().await, + ) + } }, ) } -fn wire__crate__binding__send_payment_impl( +fn wire__crate__binding__default_config_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + env_type: impl CstDecode, + api_key: impl CstDecode, + node_config: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "send_payment", + debug_name: "default_config", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::send_payment(api_req))()) + let api_env_type = env_type.cst_decode(); + let api_api_key = api_key.cst_decode(); + let api_node_config = node_config.cst_decode(); + move |context| { + transform_result_dco((move || { + Result::<_, ()>::Ok(crate::binding::default_config( + api_env_type, + api_api_key, + api_node_config, + )) + })()) + } }, ) } -fn wire__crate__binding__send_spontaneous_payment_impl( +fn wire__crate__binding__mnemonic_to_seed_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + phrase: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "send_spontaneous_payment", + debug_name: "mnemonic_to_seed", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_req = req.cst_decode(); + let api_phrase = phrase.cst_decode(); move |context| { - transform_result_dco((move || crate::binding::send_spontaneous_payment(api_req))()) + transform_result_dco((move || crate::binding::mnemonic_to_seed(api_phrase))()) } }, ) } -fn wire__crate__binding__service_health_check_impl( +fn wire__crate__binding__parse_input_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - api_key: impl CstDecode, + input: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "service_health_check", + debug_name: "parse_input", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_api_key = api_key.cst_decode(); - move |context| { - transform_result_dco((move || crate::binding::service_health_check(api_api_key))()) + let api_input = input.cst_decode(); + move |context| async move { + transform_result_dco( + (move || async move { crate::binding::parse_input(api_input).await })().await, + ) } }, ) } -fn wire__crate__binding__set_payment_metadata_impl( +fn wire__crate__binding__parse_invoice_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - hash: impl CstDecode, - metadata: impl CstDecode, + invoice: impl CstDecode, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "set_payment_metadata", + debug_name: "parse_invoice", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_hash = hash.cst_decode(); - let api_metadata = metadata.cst_decode(); + let api_invoice = invoice.cst_decode(); move |context| { - transform_result_dco((move || { - crate::binding::set_payment_metadata(api_hash, api_metadata) - })()) + transform_result_dco((move || crate::binding::parse_invoice(api_invoice))()) } }, ) } -fn wire__crate__binding__sign_message_impl( +fn wire__crate__binding__service_health_check_impl( port_: flutter_rust_bridge::for_generated::MessagePort, - req: impl CstDecode, + api_key: impl CstDecode, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( + FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::( flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "sign_message", + debug_name: "service_health_check", port: Some(port_), mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, }, move || { - let api_req = req.cst_decode(); - move |context| transform_result_dco((move || crate::binding::sign_message(api_req))()) + let api_api_key = api_key.cst_decode(); + move |context| async move { + transform_result_dco((move || async move { + crate::binding::service_health_check(api_api_key).await + })().await) + } }, ) } @@ -942,36 +1422,6 @@ fn wire__crate__binding__static_backup_impl( }, ) } -fn wire__crate__binding__sync_impl(port_: flutter_rust_bridge::for_generated::MessagePort) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "sync", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || move |context| transform_result_dco((move || crate::binding::sync())()), - ) -} -fn wire__crate__binding__unregister_webhook_impl( - port_: flutter_rust_bridge::for_generated::MessagePort, - webhook_url: impl CstDecode, -) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::( - flutter_rust_bridge::for_generated::TaskInfo { - debug_name: "unregister_webhook", - port: Some(port_), - mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal, - }, - move || { - let api_webhook_url = webhook_url.cst_decode(); - move |context| { - transform_result_dco((move || { - crate::binding::unregister_webhook(api_webhook_url) - })()) - } - }, - ) -} // Section: dart2rust @@ -1147,6 +1597,12 @@ impl CstDecode for u8 { self } } +impl CstDecode for usize { + // Codec=Cst (C-struct based), see doc to use other codecs + fn cst_decode(self) -> usize { + self + } +} impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -1155,6 +1611,26 @@ impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseDecode for BindingBreezServices { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = , + >>::sse_decode(deserializer); + return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner); + } +} + +impl SseDecode + for RustOpaqueNom> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut inner = ::sse_decode(deserializer); + return unsafe { decode_rust_opaque_nom(inner) }; + } +} + impl SseDecode for StreamSink { @@ -1456,6 +1932,30 @@ impl SseDecode for crate::models::ConfigureNodeRequest { } } +impl SseDecode for crate::error::ConnectError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + let mut tag_ = ::sse_decode(deserializer); + match tag_ { + 0 => { + let mut var_err = ::sse_decode(deserializer); + return crate::error::ConnectError::Generic { err: var_err }; + } + 1 => { + let mut var_err = ::sse_decode(deserializer); + return crate::error::ConnectError::RestoreOnly { err: var_err }; + } + 2 => { + let mut var_err = ::sse_decode(deserializer); + return crate::error::ConnectError::ServiceConnectivity { err: var_err }; + } + _ => { + unimplemented!(""); + } + } + } +} + impl SseDecode for crate::models::ConnectRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { @@ -3436,6 +3936,13 @@ impl SseDecode for crate::lnurl::pay::model::UrlSuccessActionData { } } +impl SseDecode for usize { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { + deserializer.cursor.read_u64::().unwrap() as _ + } +} + fn pde_ffi_dispatcher_primary_impl( func_id: i32, port: flutter_rust_bridge::for_generated::MessagePort, @@ -3463,6 +3970,24 @@ fn pde_ffi_dispatcher_sync_impl( // Section: rust2dart +// Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for FrbWrapper { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self.0) + .into_dart() + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive + for FrbWrapper +{ +} + +impl flutter_rust_bridge::IntoIntoDart> for BindingBreezServices { + fn into_into_dart(self) -> FrbWrapper { + self.into() + } +} + // Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::lnurl::pay::model::AesSuccessActionDataDecrypted { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { @@ -3791,6 +4316,28 @@ impl flutter_rust_bridge::IntoIntoDart } } // Codec=Dco (DartCObject based), see doc to use other codecs +impl flutter_rust_bridge::IntoDart for crate::error::ConnectError { + fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { + match self { + crate::error::ConnectError::Generic { err } => { + [0.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + crate::error::ConnectError::RestoreOnly { err } => { + [1.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + crate::error::ConnectError::ServiceConnectivity { err } => { + [2.into_dart(), err.into_into_dart().into_dart()].into_dart() + } + } + } +} +impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::error::ConnectError {} +impl flutter_rust_bridge::IntoIntoDart for crate::error::ConnectError { + fn into_into_dart(self) -> crate::error::ConnectError { + self + } +} +// Codec=Dco (DartCObject based), see doc to use other codecs impl flutter_rust_bridge::IntoDart for crate::models::ConnectRequest { fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi { [ @@ -5684,6 +6231,29 @@ impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error { } } +impl SseEncode for BindingBreezServices { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + , + >>::sse_encode( + flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self), + serializer, + ); + } +} + +impl SseEncode + for RustOpaqueNom> +{ + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + let (ptr, size) = self.sse_encode_raw(); + ::sse_encode(ptr, serializer); + ::sse_encode(size, serializer); + } +} + impl SseEncode for StreamSink { @@ -5908,6 +6478,26 @@ impl SseEncode for crate::models::ConfigureNodeRequest { } } +impl SseEncode for crate::error::ConnectError { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + match self { + crate::error::ConnectError::Generic { err } => { + ::sse_encode(0, serializer); + ::sse_encode(err, serializer); + } + crate::error::ConnectError::RestoreOnly { err } => { + ::sse_encode(1, serializer); + ::sse_encode(err, serializer); + } + crate::error::ConnectError::ServiceConnectivity { err } => { + ::sse_encode(2, serializer); + ::sse_encode(err, serializer); + } + } + } +} + impl SseEncode for crate::models::ConnectRequest { // Codec=Sse (Serialization based), see doc to use other codecs fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { @@ -7385,6 +7975,16 @@ impl SseEncode for crate::lnurl::pay::model::UrlSuccessActionData { } } +impl SseEncode for usize { + // Codec=Sse (Serialization based), see doc to use other codecs + fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) { + serializer + .cursor + .write_u64::(self as _) + .unwrap(); + } +} + #[cfg(not(target_family = "wasm"))] #[path = "frb_generated.io.rs"] mod io; diff --git a/libs/sdk-flutter/ios/Classes/frb_generated.h b/libs/sdk-flutter/ios/Classes/frb_generated.h index 47168ce1f..756a7f0a3 100644 --- a/libs/sdk-flutter/ios/Classes/frb_generated.h +++ b/libs/sdk-flutter/ios/Classes/frb_generated.h @@ -51,49 +51,6 @@ typedef struct wire_cst_configure_node_request { struct wire_cst_list_prim_u_8_strict *close_to_address; } wire_cst_configure_node_request; -typedef struct wire_cst_greenlight_credentials { - struct wire_cst_list_prim_u_8_strict *device_key; - struct wire_cst_list_prim_u_8_strict *device_cert; -} wire_cst_greenlight_credentials; - -typedef struct wire_cst_greenlight_node_config { - struct wire_cst_greenlight_credentials *partner_credentials; - struct wire_cst_list_prim_u_8_strict *invite_code; -} wire_cst_greenlight_node_config; - -typedef struct wire_cst_NodeConfig_Greenlight { - struct wire_cst_greenlight_node_config *config; -} wire_cst_NodeConfig_Greenlight; - -typedef union NodeConfigKind { - struct wire_cst_NodeConfig_Greenlight Greenlight; -} NodeConfigKind; - -typedef struct wire_cst_node_config { - int32_t tag; - union NodeConfigKind kind; -} wire_cst_node_config; - -typedef struct wire_cst_config { - struct wire_cst_list_prim_u_8_strict *breezserver; - struct wire_cst_list_prim_u_8_strict *chainnotifier_url; - struct wire_cst_list_prim_u_8_strict *mempoolspace_url; - struct wire_cst_list_prim_u_8_strict *working_dir; - int32_t network; - uint32_t payment_timeout_sec; - struct wire_cst_list_prim_u_8_strict *default_lsp_id; - struct wire_cst_list_prim_u_8_strict *api_key; - double maxfee_percent; - uint64_t exemptfee_msat; - struct wire_cst_node_config node_config; -} wire_cst_config; - -typedef struct wire_cst_connect_request { - struct wire_cst_config config; - struct wire_cst_list_prim_u_8_strict *seed; - bool *restore_only; -} wire_cst_connect_request; - typedef struct wire_cst_reverse_swap_fees_request { uint64_t *send_amount_sat; uint32_t *claim_tx_feerate; @@ -278,6 +235,49 @@ typedef struct wire_cst_sign_message_request { struct wire_cst_list_prim_u_8_strict *message; } wire_cst_sign_message_request; +typedef struct wire_cst_greenlight_credentials { + struct wire_cst_list_prim_u_8_strict *device_key; + struct wire_cst_list_prim_u_8_strict *device_cert; +} wire_cst_greenlight_credentials; + +typedef struct wire_cst_greenlight_node_config { + struct wire_cst_greenlight_credentials *partner_credentials; + struct wire_cst_list_prim_u_8_strict *invite_code; +} wire_cst_greenlight_node_config; + +typedef struct wire_cst_NodeConfig_Greenlight { + struct wire_cst_greenlight_node_config *config; +} wire_cst_NodeConfig_Greenlight; + +typedef union NodeConfigKind { + struct wire_cst_NodeConfig_Greenlight Greenlight; +} NodeConfigKind; + +typedef struct wire_cst_node_config { + int32_t tag; + union NodeConfigKind kind; +} wire_cst_node_config; + +typedef struct wire_cst_config { + struct wire_cst_list_prim_u_8_strict *breezserver; + struct wire_cst_list_prim_u_8_strict *chainnotifier_url; + struct wire_cst_list_prim_u_8_strict *mempoolspace_url; + struct wire_cst_list_prim_u_8_strict *working_dir; + int32_t network; + uint32_t payment_timeout_sec; + struct wire_cst_list_prim_u_8_strict *default_lsp_id; + struct wire_cst_list_prim_u_8_strict *api_key; + double maxfee_percent; + uint64_t exemptfee_msat; + struct wire_cst_node_config node_config; +} wire_cst_config; + +typedef struct wire_cst_connect_request { + struct wire_cst_config config; + struct wire_cst_list_prim_u_8_strict *seed; + bool *restore_only; +} wire_cst_connect_request; + typedef struct wire_cst_static_backup_request { struct wire_cst_list_prim_u_8_strict *working_dir; } wire_cst_static_backup_request; @@ -696,6 +696,29 @@ typedef struct wire_cst_check_message_response { bool is_valid; } wire_cst_check_message_response; +typedef struct wire_cst_ConnectError_Generic { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_Generic; + +typedef struct wire_cst_ConnectError_RestoreOnly { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_RestoreOnly; + +typedef struct wire_cst_ConnectError_ServiceConnectivity { + struct wire_cst_list_prim_u_8_strict *err; +} wire_cst_ConnectError_ServiceConnectivity; + +typedef union ConnectErrorKind { + struct wire_cst_ConnectError_Generic Generic; + struct wire_cst_ConnectError_RestoreOnly RestoreOnly; + struct wire_cst_ConnectError_ServiceConnectivity ServiceConnectivity; +} ConnectErrorKind; + +typedef struct wire_cst_connect_error { + int32_t tag; + union ConnectErrorKind kind; +} wire_cst_connect_error; + typedef struct wire_cst_InputType_BitcoinAddress { struct wire_cst_bitcoin_address_data *address; } wire_cst_InputType_BitcoinAddress; @@ -898,169 +921,222 @@ typedef struct wire_cst_static_backup_response { struct wire_cst_list_String *backup; } wire_cst_static_backup_response; -void frbgen_breez_sdk_wire__crate__binding__backup(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__backup_status(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__breez_events_stream(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin(int64_t port_, + uintptr_t that, + struct wire_cst_buy_bitcoin_request *req); -void frbgen_breez_sdk_wire__crate__binding__breez_log_stream(int64_t port_, - struct wire_cst_list_prim_u_8_strict *s); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message(int64_t port_, + uintptr_t that, + struct wire_cst_check_message_request *req); -void frbgen_breez_sdk_wire__crate__binding__buy_bitcoin(int64_t port_, - struct wire_cst_buy_bitcoin_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels(int64_t port_, + uintptr_t that); -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__BindingBreezServices_configure_node(int64_t port_, + uintptr_t that, + struct wire_cst_configure_node_request *req); -void frbgen_breez_sdk_wire__crate__binding__close_lsp_channels(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *lsp_id); -void frbgen_breez_sdk_wire__crate__binding__configure_node(int64_t port_, - struct wire_cst_configure_node_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__connect(int64_t port_, - struct wire_cst_connect_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *command); -void frbgen_breez_sdk_wire__crate__binding__connect_lsp(int64_t port_, - struct wire_cst_list_prim_u_8_strict *lsp_id); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__default_config(int64_t port_, - int32_t env_type, - struct wire_cst_list_prim_u_8_strict *api_key, - struct wire_cst_node_config *node_config); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *id); -void frbgen_breez_sdk_wire__crate__binding__disconnect(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees(int64_t port_, + uintptr_t that, + struct wire_cst_reverse_swap_fees_request *req); -void frbgen_breez_sdk_wire__crate__binding__execute_command(int64_t port_, - struct wire_cst_list_prim_u_8_strict *command); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info(int64_t port_, - struct wire_cst_list_prim_u_8_strict *id); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees(int64_t port_, - struct wire_cst_reverse_swap_fees_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments(int64_t port_, + uintptr_t that, + struct wire_cst_list_payments_request *req); -void frbgen_breez_sdk_wire__crate__binding__in_progress_swap(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__is_initialized(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_auth_request_data *req_data); -void frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_pay_request *req); -void frbgen_breez_sdk_wire__crate__binding__list_lsps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw(int64_t port_, + uintptr_t that, + struct wire_cst_ln_url_withdraw_request *req); -void frbgen_breez_sdk_wire__crate__binding__list_payments(int64_t port_, - struct wire_cst_list_payments_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__list_refundables(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__lnurl_auth(int64_t port_, - struct wire_cst_ln_url_auth_request_data *req_data); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__lnurl_pay(int64_t port_, - struct wire_cst_ln_url_pay_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw(int64_t port_, - struct wire_cst_ln_url_withdraw_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__lsp_id(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__lsp_info(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee(int64_t port_, + uintptr_t that, + struct wire_cst_open_channel_fee_request *req); -void frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_pay_onchain_request *req); -void frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed(int64_t port_, - struct wire_cst_list_prim_u_8_strict *phrase); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *hash); -void frbgen_breez_sdk_wire__crate__binding__node_credentials(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_onchain_payment_request *req); -void frbgen_breez_sdk_wire__crate__binding__node_info(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_redeem_onchain_funds_request *req); -void frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund(int64_t port_, + uintptr_t that, + struct wire_cst_prepare_refund_request *req); -void frbgen_breez_sdk_wire__crate__binding__open_channel_fee(int64_t port_, - struct wire_cst_open_channel_fee_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_receive_onchain_request *req); -void frbgen_breez_sdk_wire__crate__binding__parse_input(int64_t port_, - struct wire_cst_list_prim_u_8_strict *input); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment(int64_t port_, + uintptr_t that, + struct wire_cst_receive_payment_request *req); -void frbgen_breez_sdk_wire__crate__binding__parse_invoice(int64_t port_, - struct wire_cst_list_prim_u_8_strict *invoice); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds(int64_t port_, + uintptr_t that, + struct wire_cst_redeem_onchain_funds_request *req); -void frbgen_breez_sdk_wire__crate__binding__pay_onchain(int64_t port_, - struct wire_cst_pay_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *swap_address); -void frbgen_breez_sdk_wire__crate__binding__payment_by_hash(int64_t port_, - struct wire_cst_list_prim_u_8_strict *hash); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund(int64_t port_, + uintptr_t that, + struct wire_cst_refund_request *req); -void frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment(int64_t port_, - struct wire_cst_prepare_onchain_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *webhook_url); -void frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds(int64_t port_, - struct wire_cst_prepare_redeem_onchain_funds_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue(int64_t port_, + uintptr_t that, + struct wire_cst_report_issue_request *req); -void frbgen_breez_sdk_wire__crate__binding__prepare_refund(int64_t port_, - struct wire_cst_prepare_refund_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps(int64_t port_, + uintptr_t that); -void frbgen_breez_sdk_wire__crate__binding__receive_onchain(int64_t port_, - struct wire_cst_receive_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain(int64_t port_, + uintptr_t that, + struct wire_cst_send_onchain_request *req); -void frbgen_breez_sdk_wire__crate__binding__receive_payment(int64_t port_, - struct wire_cst_receive_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment(int64_t port_, + uintptr_t that, + struct wire_cst_send_payment_request *req); -void frbgen_breez_sdk_wire__crate__binding__recommended_fees(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment(int64_t port_, + uintptr_t that, + struct wire_cst_send_spontaneous_payment_request *req); -void frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds(int64_t port_, - struct wire_cst_redeem_onchain_funds_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *hash, + struct wire_cst_list_prim_u_8_strict *metadata); -void frbgen_breez_sdk_wire__crate__binding__redeem_swap(int64_t port_, - struct wire_cst_list_prim_u_8_strict *swap_address); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message(int64_t port_, + uintptr_t that, + struct wire_cst_sign_message_request *req); -void frbgen_breez_sdk_wire__crate__binding__refund(int64_t port_, - struct wire_cst_refund_request *req); +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync(int64_t port_, + uintptr_t that); + +void frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook(int64_t port_, + uintptr_t that, + struct wire_cst_list_prim_u_8_strict *webhook_url); + +void frbgen_breez_sdk_wire__crate__binding__breez_events_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_breez_sdk_wire__crate__binding__register_webhook(int64_t port_, - struct wire_cst_list_prim_u_8_strict *webhook_url); +void frbgen_breez_sdk_wire__crate__binding__breez_log_stream(int64_t port_, + struct wire_cst_list_prim_u_8_strict *s); -void frbgen_breez_sdk_wire__crate__binding__report_issue(int64_t port_, - struct wire_cst_report_issue_request *req); +void frbgen_breez_sdk_wire__crate__binding__connect(int64_t port_, + struct wire_cst_connect_request *req); -void frbgen_breez_sdk_wire__crate__binding__rescan_swaps(int64_t port_); +void frbgen_breez_sdk_wire__crate__binding__default_config(int64_t port_, + int32_t env_type, + struct wire_cst_list_prim_u_8_strict *api_key, + struct wire_cst_node_config *node_config); -void frbgen_breez_sdk_wire__crate__binding__send_onchain(int64_t port_, - struct wire_cst_send_onchain_request *req); +void frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed(int64_t port_, + struct wire_cst_list_prim_u_8_strict *phrase); -void frbgen_breez_sdk_wire__crate__binding__send_payment(int64_t port_, - struct wire_cst_send_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__parse_input(int64_t port_, + struct wire_cst_list_prim_u_8_strict *input); -void frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment(int64_t port_, - struct wire_cst_send_spontaneous_payment_request *req); +void frbgen_breez_sdk_wire__crate__binding__parse_invoice(int64_t port_, + struct wire_cst_list_prim_u_8_strict *invoice); void frbgen_breez_sdk_wire__crate__binding__service_health_check(int64_t port_, struct wire_cst_list_prim_u_8_strict *api_key); -void frbgen_breez_sdk_wire__crate__binding__set_payment_metadata(int64_t port_, - struct wire_cst_list_prim_u_8_strict *hash, - struct wire_cst_list_prim_u_8_strict *metadata); - -void frbgen_breez_sdk_wire__crate__binding__sign_message(int64_t port_, - struct wire_cst_sign_message_request *req); - void frbgen_breez_sdk_wire__crate__binding__static_backup(int64_t port_, struct wire_cst_static_backup_request *req); -void frbgen_breez_sdk_wire__crate__binding__sync(int64_t port_); +void frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices(const void *ptr); -void frbgen_breez_sdk_wire__crate__binding__unregister_webhook(int64_t port_, - struct wire_cst_list_prim_u_8_strict *webhook_url); +void frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices(const void *ptr); struct wire_cst_aes_success_action_data_decrypted *frbgen_breez_sdk_cst_new_box_autoadd_aes_success_action_data_decrypted(void); @@ -1285,67 +1361,68 @@ static int64_t dummy_method_to_enforce_bundling(void) { dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_swap_info); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_tlv_entry); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_cst_new_list_unspent_transaction_output); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync); + dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_events_stream); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__breez_log_stream); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__buy_bitcoin); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__check_message); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__close_lsp_channels); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__configure_node); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__connect_lsp); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__default_config); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__disconnect); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__execute_command); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__in_progress_swap); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__is_initialized); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_lsps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_payments); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__list_refundables); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_auth); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_pay); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lsp_id); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__lsp_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__node_credentials); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__node_info); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__open_channel_fee); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__parse_input); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__parse_invoice); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__pay_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__payment_by_hash); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__prepare_refund); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__receive_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__receive_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__recommended_fees); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__redeem_swap); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__refund); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__register_webhook); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__report_issue); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__rescan_swaps); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_onchain); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_payment); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__service_health_check); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__set_payment_metadata); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__sign_message); dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__static_backup); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__sync); - dummy_var ^= ((int64_t) (void*) frbgen_breez_sdk_wire__crate__binding__unregister_webhook); dummy_var ^= ((int64_t) (void*) store_dart_post_cobject); return dummy_var; } diff --git a/libs/sdk-flutter/lib/breez_sdk.dart b/libs/sdk-flutter/lib/breez_sdk.dart index f1c592188..c5440af70 100644 --- a/libs/sdk-flutter/lib/breez_sdk.dart +++ b/libs/sdk-flutter/lib/breez_sdk.dart @@ -8,6 +8,8 @@ import 'package:rxdart/rxdart.dart'; import 'generated/binding.dart' as binding; class BreezSDK { + late BindingBreezServices breezServices; + BreezSDK() { verifyInitialized(); } @@ -76,59 +78,31 @@ class BreezSDK { /// Listen to node state Stream get nodeStateStream => nodeStateController.stream; - /// Register for webhook callbacks at the given `webhook_url` whenever a new payment is received. - /// - /// More webhook types may be supported in the future. - Future registerWebhook({required String webhookUrl}) async { - return binding.registerWebhook(webhookUrl: webhookUrl); - } - - /// Unregister webhook callbacks for the given `webhook_url`. - Future unregisterWebhook({required String webhookUrl}) async { - return binding.unregisterWebhook(webhookUrl: webhookUrl); - } - /// connect initializes the global NodeService, schedule the node to run in the cloud and /// run the signer. This must be called in order to start communicate with the node /// /// # Arguments /// /// * `req` - The connect request containing the `config` sdk configuration and `seed` node private key - Future connect({ + Future connect({ required ConnectRequest req, }) async { - await binding.connect(req: req); + breezServices = await binding.connect(req: req); _subscribeToSdkStreams(); await fetchNodeData(); + return breezServices; } - /// Check whether node service is initialized or not - Future isInitialized() async => await binding.isInitialized(); - - /// This method sync the local state with the remote node state. - /// The synced items are as follows: - /// * node state - General information about the node and its liquidity status - /// * channels - The list of channels and their status - /// * payments - The incoming/outgoing payments - Future sync() async => await binding.sync(); - /// get the node state from the persistent storage Future nodeInfo() async { - final nodeState = await binding.nodeInfo(); + final nodeState = await breezServices.nodeInfo(); nodeStateController.add(nodeState); return nodeState; } - /// Configure an optional address to send funds to during a mutual channel close - Future configureNode({ - required ConfigureNodeRequest req, - }) async { - return await binding.configureNode(req: req); - } - /// Cleanup node resources and stop the signer. Future disconnect() async { - await binding.disconnect(); + await breezServices.disconnect(); _unsubscribeFromSdkStreams(); } @@ -152,57 +126,13 @@ class BreezSDK { ); } - /// Sign given message with the private key of the node id. Returns a zbase - /// encoded signature. - Future signMessage({ - required SignMessageRequest req, - }) async { - return await binding.signMessage(req: req); - } - - /// Check whether given message was signed by the private key or the given - /// pubkey and the signature (zbase encoded) is valid. - Future checkMessage({ - required CheckMessageRequest req, - }) async { - return await binding.checkMessage(req: req); - } - - /* LSP API's */ - - /// List available lsps that can be selected by the user - Future> listLsps() async => await binding.listLsps(); - - /// Select the lsp to be used and provide inbound liquidity - Future connectLSP(String lspId) async { - return await binding.connectLsp(lspId: lspId); - } - - /// Get the current LSP's ID - Future lspId() async => await binding.lspId(); - - /// Convenience method to look up LSP info based on current LSP ID - Future lspInfo() async => await binding.lspInfo(); - - /// Convenience method to look up [LspInformation] for a given LSP ID - Future fetchLspInfo(String lspId) async => await binding.fetchLspInfo(id: lspId); - - /// close all channels with the current lsp - Future closeLspChannels() async => await binding.closeLspChannels(); - - /* Backup API's & Streams*/ + /* Backup Streams*/ // Listen to backup results final StreamController _backupStreamController = BehaviorSubject(); Stream get backupStream => _backupStreamController.stream; - /// Start the backup process - Future backup() async => await binding.backup(); - - /// Returns the state of the backup process - Future backupStatus() async => await binding.backupStatus(); - /* Parse API's */ /// Parse a BOLT11 payment request and return a structure contains the parsed fields. @@ -229,97 +159,22 @@ class BreezSDK { Future> listPayments({ required ListPaymentsRequest req, }) async { - final paymentsList = await binding.listPayments(req: req); + final paymentsList = await breezServices.listPayments(req: req); paymentsController.add(paymentsList); return paymentsList; } - /// Fetch a specific payment by its hash. - Future paymentByHash({ - required String hash, - }) async { - return await binding.paymentByHash(hash: hash); - } - - /// Set the external metadata of a payment as a valid JSON string - Future setPaymentMetadata({ - required String hash, - required String metadata, - }) async { - return await binding.setPaymentMetadata(hash: hash, metadata: metadata); - } - - /* Lightning Payment API's */ - - /// pay a bolt11 invoice - Future sendPayment({ - required SendPaymentRequest req, - }) async { - return await binding.sendPayment(req: req); - } - - /// pay directly to a node id using keysend - Future sendSpontaneousPayment({ - required SendSpontaneousPaymentRequest req, - }) async { - return await binding.sendSpontaneousPayment(req: req); - } - - /// Creates an bolt11 payment request. - /// This also works when the node doesn't have any channels and need inbound liquidity. - /// In such case when the invoice is paid a new zero-conf channel will be open by the LSP, - /// providing inbound liquidity and the payment will be routed via this new channel. - Future receivePayment({ - required ReceivePaymentRequest req, - }) async { - return await binding.receivePayment(req: req); - } - - /* LNURL API's */ - - /// Second step of LNURL-pay. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlPayRequestData` payload needed here. - Future lnurlPay({ - required LnUrlPayRequest req, - }) async { - return await binding.lnurlPay(req: req); - } - - /// Second step of LNURL-withdraw. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlWithdrawRequestData` payload needed here. - /// - /// This call will validate the given amount in the `request` against the parameters - /// of the LNURL endpoint data in the `request`. If they match the endpoint requirements, the LNURL withdraw - /// request is made. A successful result here means the endpoint started the payment. - Future lnurlWithdraw({required LnUrlWithdrawRequest req}) async { - return await binding.lnurlWithdraw(req: req); - } - - /// Third and last step of LNURL-auth. The first step is `parse()`, which also validates the LNURL destination - /// and generates the `LnUrlAuthRequestData` payload needed here. The second step is user approval of auth action. - /// - /// This call will sign `k1` of the LNURL endpoint (`req_data`) on `secp256k1` using `linkingPrivKey` and DER-encodes the signature. - /// If they match the endpoint requirements, the LNURL auth request is made. A successful result here means the client signature is verified. - Future lnurlAuth({ - required LnUrlAuthRequestData reqData, - }) async { - return await binding.lnurlAuth(reqData: reqData); - } - /* Fiat Currency API's */ /// Fetch live rates of fiat currencies Future> fetchFiatRates() async { - final List rates = await binding.fetchFiatRates(); + final List rates = await breezServices.fetchFiatRates(); return rates.fold>({}, (map, rate) { map[rate.coin] = rate; return map; }); } - /// List all available fiat currencies - Future> listFiatCurrencies() async => await binding.listFiatCurrencies(); - /* Swap Stream */ final StreamController _swapEventsStreamController = @@ -329,160 +184,15 @@ class BreezSDK { /* On-Chain Swap API's */ - /// Creates a reverse swap and attempts to pay the HODL invoice - @Deprecated( - 'Use payOnchain instead. ' - 'This method was deprecated after v0.3.2', - ) - Future sendOnchain({ - required SendOnchainRequest req, - }) async { - return await binding.sendOnchain(req: req); - } - - Future onchainPaymentLimits() async { - return await binding.onchainPaymentLimits(); - } - - /// Creates a reverse swap and attempts to pay the HODL invoice - Future payOnchain({ - required PayOnchainRequest req, - }) async { - return await binding.payOnchain(req: req); - } - - /// Onchain receive swap API - Future receiveOnchain({ - required ReceiveOnchainRequest req, - }) async { - return await binding.receiveOnchain(req: req); - } - - /// Generates an url that can be used by a third part provider to buy Bitcoin with fiat currency - Future buyBitcoin({ - required BuyBitcoinRequest req, - }) async { - return await binding.buyBitcoin(req: req); - } - /// Withdraw on-chain funds in the wallet to an external btc address Future redeemOnchainFunds({ required RedeemOnchainFundsRequest req, }) async { - final redeemOnchainFundsResponse = await binding.redeemOnchainFunds(req: req); + final redeemOnchainFundsResponse = await breezServices.redeemOnchainFunds(req: req); await listPayments(req: const ListPaymentsRequest()); return redeemOnchainFundsResponse; } - /// Returns the max amount that can be sent on-chain using the send_onchain method. - /// The returned amount is the sum of the max amount that can be sent on each channel - /// minus the expected fees. - /// This is possible since the route to the swapper node is known in advance and is expected - /// to consist of maximum 3 hops. - Future maxReverseSwapAmount() async { - return await binding.maxReverseSwapAmount(); - } - - /* Refundables API's */ - - /// list non-completed expired swaps that should be refunded by calling refund() - Future> listRefundables() async => await binding.listRefundables(); - - /// Construct and broadcast a refund transaction for a failed/expired swap - Future refund({ - required RefundRequest req, - }) async { - return await binding.refund(req: req); - } - - /// Prepares a refund transaction for a failed/expired swap. - /// - /// Can optionally be used before refund to know how much fees will be paid - /// to perform the refund. - Future prepareRefund({ - required PrepareRefundRequest req, - }) async { - return await binding.prepareRefund(req: req); - } - - /// Iterate all historical swap addresses and fetch their current status from the blockchain. - /// The status is then updated in the persistent storage. - Future rescanSwaps() async => await binding.rescanSwaps(); - - /* In Progress Swap API's */ - - /// Returns an optional in-progress [SwapInfo]. - /// A [SwapInfo] is in-progress if it is waiting for confirmation to be redeemed and complete the swap. - Future inProgressSwap() async => await binding.inProgressSwap(); - - /// Redeems an individual swap. - /// - /// To be used only in the context of mobile notifications, where the notification triggers - /// an individual redeem. - /// - /// This is taken care of automatically in the context of typical SDK usage. - Future redeemSwap({ - required String swapAddress, - }) async { - return await binding.redeemSwap(swapAddress: swapAddress); - } - - /// Returns the blocking [ReverseSwapInfo]s that are in progress - @Deprecated( - 'Use inProgressOnchainPayments instead. ' - 'This method was deprecated after v0.3.6', - ) - Future> inProgressReverseSwaps() async => binding.inProgressReverseSwaps(); - - /* Swap Fee API's */ - - /// Gets the fees required to open a channel for a given amount. - Future openChannelFee({ - required OpenChannelFeeRequest req, - }) async { - return await binding.openChannelFee(req: req); - } - - /// Lookup the most recent reverse swap pair info using the Boltz API - @Deprecated( - 'Use prepareOnchainPayment instead. ' - 'This method was deprecated after v0.3.2', - ) - Future fetchReverseSwapFees({ - required ReverseSwapFeesRequest req, - }) async { - return await binding.fetchReverseSwapFees(req: req); - } - - /// Lookup the most recent reverse swap pair info using the Boltz API - Future prepareOnchainPayment({ - required PrepareOnchainPaymentRequest req, - }) async { - return await binding.prepareOnchainPayment(req: req); - } - - /// Returns the blocking [ReverseSwapInfo]s that are in progress - Future> inProgressOnchainPayments() async => binding.inProgressOnchainPayments(); - - /// Fetches the current recommended fees - Future recommendedFees() async => await binding.recommendedFees(); - - Future prepareRedeemOnchainFunds({ - required PrepareRedeemOnchainFundsRequest req, - }) async => - binding.prepareRedeemOnchainFunds(req: req); - - /* Support API's */ - - /// Send an issue report using the Support API. - /// - `ReportIssueRequest.paymentFailure` sends a payment failure report to the Support API - /// using the provided `paymentHash` to lookup the failed `Payment` and the current `NodeState`. - Future reportIssue({ - required ReportIssueRequest req, - }) async { - return await binding.reportIssue(req: req); - } - /// Fetches the service health check from the support API. Future serviceHealthCheck({ required String apiKey, @@ -490,20 +200,6 @@ class BreezSDK { return await binding.serviceHealthCheck(apiKey: apiKey); } - /* CLI API's */ - - /// Execute a command directly on the NodeAPI interface. - /// Mainly used to debugging. - Future executeCommand({required String command}) async { - return await binding.executeCommand(command: command); - } - - /// Generate diagnostic data. - /// Mainly used to debugging. - Future generateDiagnosticData() async { - return await binding.generateDiagnosticData(); - } - /* Helper Methods */ /// Validate if given address is a valid BTC address @@ -590,7 +286,7 @@ extension SDKConfig on Config { String? defaultLspId, String? apiKey, double? maxfeePercent, - int? exemptfeeMsat, + BigInt? exemptfeeMsat, NodeConfig? nodeConfig, }) { return Config( diff --git a/libs/sdk-flutter/lib/bridge_generated.dart b/libs/sdk-flutter/lib/bridge_generated.dart deleted file mode 100644 index 320de4faf..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.dart +++ /dev/null @@ -1,6902 +0,0 @@ -// AUTO GENERATED FILE, DO NOT EDIT. -// Generated by `flutter_rust_bridge`@ 1.82.6. -// ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const - -import 'dart:convert'; -import 'dart:async'; -import 'package:meta/meta.dart'; -import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; -import 'package:uuid/uuid.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; - -import 'dart:ffi' as ffi; - -part 'bridge_generated.freezed.dart'; - -abstract class BreezSdkCore { - /// Wrapper around [BreezServices::connect] which also initializes SDK logging - Future connect({required ConnectRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta; - - /// Check whether node service is initialized or not - Future isInitialized({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta; - - /// See [BreezServices::sync] - Future sync({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta; - - /// See [BreezServices::node_credentials] - Future nodeCredentials({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta; - - /// See [BreezServices::node_info] - Future nodeInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta; - - /// See [BreezServices::configure_node] - Future configureNode({required ConfigureNodeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta; - - /// Cleanup node resources and stop the signer. - Future disconnect({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta; - - /// See [BreezServices::sign_message] - Future signMessage({required SignMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta; - - /// See [BreezServices::check_message] - Future checkMessage({required CheckMessageRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta; - - /// See [breez_services::mnemonic_to_seed] - Future mnemonicToSeed({required String phrase, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta; - - /// See [BreezServices::default_config] - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta; - - /// See [BreezServices::static_backup] - Future staticBackup({required StaticBackupRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta; - - /// See [BreezServices::service_health_check] - Future serviceHealthCheck({required String apiKey, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezEventsStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta; - - /// If used, this must be called before `connect`. It can only be called once. - Stream breezLogStream({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta; - - /// See [BreezServices::list_lsps] - Future> listLsps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta; - - /// See [BreezServices::connect_lsp] - Future connectLsp({required String lspId, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta; - - /// See [BreezServices::lsp_id] - Future lspId({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta; - - /// See [BreezServices::fetch_lsp_info] - Future fetchLspInfo({required String id, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta; - - /// See [BreezServices::lsp_info] - Future lspInfo({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta; - - /// See [BreezServices::close_lsp_channels] - Future closeLspChannels({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta; - - Future registerWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta; - - Future unregisterWebhook({required String webhookUrl, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta; - - /// See [BreezServices::backup] - Future backup({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta; - - /// See [BreezServices::backup_status] - Future backupStatus({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta; - - Future parseInvoice({required String invoice, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta; - - Future parseInput({required String input, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta; - - /// See [BreezServices::list_payments] - Future> listPayments({required ListPaymentsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta; - - /// See [BreezServices::list_payments] - Future paymentByHash({required String hash, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta; - - /// See [BreezServices::set_payment_metadata] - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta; - - /// See [BreezServices::send_payment] - Future sendPayment({required SendPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta; - - /// See [BreezServices::send_spontaneous_payment] - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta; - - /// See [BreezServices::receive_payment] - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta; - - /// See [BreezServices::lnurl_pay] - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta; - - /// See [BreezServices::lnurl_withdraw] - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta; - - /// See [BreezServices::lnurl_auth] - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta; - - /// See [BreezServices::report_issue] - Future reportIssue({required ReportIssueRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta; - - /// See [BreezServices::fetch_fiat_rates] - Future> fetchFiatRates({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta; - - /// See [BreezServices::list_fiat_currencies] - Future> listFiatCurrencies({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta; - - /// See [BreezServices::max_reverse_swap_amount] - Future maxReverseSwapAmount({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta; - - /// See [BreezServices::send_onchain] - Future sendOnchain({required SendOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta; - - /// See [BreezServices::pay_onchain] - Future payOnchain({required PayOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta; - - /// See [BreezServices::receive_onchain] - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta; - - /// See [BreezServices::buy_bitcoin] - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta; - - /// See [BreezServices::redeem_onchain_funds] - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta; - - /// See [BreezServices::prepare_redeem_onchain_funds] - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta; - - /// See [BreezServices::list_refundables] - Future> listRefundables({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta; - - /// See [BreezServices::prepare_refund] - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta; - - /// See [BreezServices::refund] - Future refund({required RefundRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta; - - /// See [BreezServices::rescan_swaps] - Future rescanSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta; - - /// See [BreezServices::redeem_swap] - Future redeemSwap({required String swapAddress, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta; - - /// See [BreezServices::in_progress_swap] - Future inProgressSwap({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta; - - /// See [BreezServices::in_progress_reverse_swaps] - Future> inProgressReverseSwaps({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta; - - /// See [BreezServices::open_channel_fee] - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta; - - /// See [BreezServices::fetch_reverse_swap_fees] - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta; - - /// See [BreezServices::onchain_payment_limits] - Future onchainPaymentLimits({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta; - - /// See [BreezServices::prepare_onchain_payment] - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta; - - /// See [BreezServices::in_progress_onchain_payments] - Future> inProgressOnchainPayments({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta; - - /// See [BreezServices::recommended_fees] - Future recommendedFees({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta; - - /// See [BreezServices::execute_dev_command] - Future executeCommand({required String command, dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta; - - /// See [BreezServices::generate_diagnostic_data] - Future generateDiagnosticData({dynamic hint}); - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta; -} - -/// Wrapper for the decrypted [AesSuccessActionData] payload -class AesSuccessActionDataDecrypted { - /// Contents description, up to 144 characters - final String description; - - /// Decrypted content - final String plaintext; - - const AesSuccessActionDataDecrypted({ - required this.description, - required this.plaintext, - }); -} - -@freezed -sealed class AesSuccessActionDataResult with _$AesSuccessActionDataResult { - const factory AesSuccessActionDataResult.decrypted({ - required AesSuccessActionDataDecrypted data, - }) = AesSuccessActionDataResult_Decrypted; - const factory AesSuccessActionDataResult.errorStatus({ - required String reason, - }) = AesSuccessActionDataResult_ErrorStatus; -} - -class BackupFailedData { - final String error; - - const BackupFailedData({ - required this.error, - }); -} - -class BackupStatus { - final bool backedUp; - - /// Epoch time, in seconds - final int? lastBackupTime; - - const BackupStatus({ - required this.backedUp, - this.lastBackupTime, - }); -} - -/// Wrapped in a [BitcoinAddress], this is the result of [parse] when given a plain or BIP-21 BTC address. -class BitcoinAddressData { - final String address; - final Network network; - final int? amountSat; - final String? label; - final String? message; - - const BitcoinAddressData({ - required this.address, - required this.network, - this.amountSat, - this.label, - this.message, - }); -} - -@freezed -sealed class BreezEvent with _$BreezEvent { - /// Indicates that a new block has just been found - const factory BreezEvent.newBlock({ - required int block, - }) = BreezEvent_NewBlock; - - /// Indicates that a new invoice has just been paid - const factory BreezEvent.invoicePaid({ - required InvoicePaidDetails details, - }) = BreezEvent_InvoicePaid; - - /// Indicates that the local SDK state has just been sync-ed with the remote components - const factory BreezEvent.synced() = BreezEvent_Synced; - - /// Indicates that an outgoing payment has been completed successfully - const factory BreezEvent.paymentSucceed({ - required Payment details, - }) = BreezEvent_PaymentSucceed; - - /// Indicates that an outgoing payment has been failed to complete - const factory BreezEvent.paymentFailed({ - required PaymentFailedData details, - }) = BreezEvent_PaymentFailed; - - /// Indicates that the backup process has just started - const factory BreezEvent.backupStarted() = BreezEvent_BackupStarted; - - /// Indicates that the backup process has just finished successfully - const factory BreezEvent.backupSucceeded() = BreezEvent_BackupSucceeded; - - /// Indicates that the backup process has just failed - const factory BreezEvent.backupFailed({ - required BackupFailedData details, - }) = BreezEvent_BackupFailed; - const factory BreezEvent.swapUpdated({ - required SwapInfo details, - }) = BreezEvent_SwapUpdated; -} - -/// Different providers will demand different behaviours when the user is trying to buy bitcoin. -enum BuyBitcoinProvider { - Moonpay, -} - -class BuyBitcoinRequest { - final BuyBitcoinProvider provider; - final OpeningFeeParams? openingFeeParams; - - const BuyBitcoinRequest({ - required this.provider, - this.openingFeeParams, - }); -} - -class BuyBitcoinResponse { - final String url; - final OpeningFeeParams? openingFeeParams; - - const BuyBitcoinResponse({ - required this.url, - this.openingFeeParams, - }); -} - -/// State of a Lightning channel -enum ChannelState { - PendingOpen, - Opened, - PendingClose, - Closed, -} - -/// Request to check a message was signed by a specific node id. -class CheckMessageRequest { - /// The message that was signed. - final String message; - - /// The public key of the node that signed the message. - final String pubkey; - - /// The zbase encoded signature to verify. - final String signature; - - const CheckMessageRequest({ - required this.message, - required this.pubkey, - required this.signature, - }); -} - -/// Response to a [CheckMessageRequest] -class CheckMessageResponse { - /// Boolean value indicating whether the signature covers the message and - /// was signed by the given pubkey. - final bool isValid; - - const CheckMessageResponse({ - required this.isValid, - }); -} - -/// Represents the funds that were on the user side of the channel at the time it was closed. -class ClosedChannelPaymentDetails { - final ChannelState state; - final String fundingTxid; - final String? shortChannelId; - - /// Can be empty for older closed channels. - final String? closingTxid; - - const ClosedChannelPaymentDetails({ - required this.state, - required this.fundingTxid, - this.shortChannelId, - this.closingTxid, - }); -} - -/// Configuration for the Breez Services -/// -/// Use [Config::production] or [Config::staging] for default configs of the different supported -/// environments. -class Config { - final String breezserver; - final String chainnotifierUrl; - - /// If set, this is the mempool.space URL that will be used. - /// - /// If not set, a list of mempool.space URLs will be used to provide fault-tolerance. If calls - /// to the first URL fail, then the call will be repeated to the next URL, and so on. - /// - /// Note that, if specified, the URL has to be in the format: `https://mempool.space/api` - final String? mempoolspaceUrl; - - /// Directory in which all SDK files (DB, log) are stored. Defaults to ".", otherwise if it's customized, - /// the folder should exist before starting the SDK. - final String workingDir; - final Network network; - final int paymentTimeoutSec; - final String? defaultLspId; - final String? apiKey; - - /// Maps to the CLN `maxfeepercent` config when paying invoices (`lightning-pay`) - final double maxfeePercent; - - /// Maps to the CLN `exemptfee` config when paying invoices (`lightning-pay`) - final int exemptfeeMsat; - final NodeConfig nodeConfig; - - const Config({ - required this.breezserver, - required this.chainnotifierUrl, - this.mempoolspaceUrl, - required this.workingDir, - required this.network, - required this.paymentTimeoutSec, - this.defaultLspId, - this.apiKey, - required this.maxfeePercent, - required this.exemptfeeMsat, - required this.nodeConfig, - }); -} - -/// Represents a configure node request. -class ConfigureNodeRequest { - final String? closeToAddress; - - const ConfigureNodeRequest({ - this.closeToAddress, - }); -} - -/// Represents a connect request. -class ConnectRequest { - final Config config; - final Uint8List seed; - - /// If true, only restores an existing node and otherwise result in an error - final bool? restoreOnly; - - const ConnectRequest({ - required this.config, - required this.seed, - this.restoreOnly, - }); -} - -/// Details about a supported currency in the fiat rate feed -class CurrencyInfo { - final String name; - final int fractionSize; - final int? spacing; - final Symbol? symbol; - final Symbol? uniqSymbol; - final List? localizedName; - final List? localeOverrides; - - const CurrencyInfo({ - required this.name, - required this.fractionSize, - this.spacing, - this.symbol, - this.uniqSymbol, - this.localizedName, - this.localeOverrides, - }); -} - -/// Indicates the different kinds of supported environments for [crate::BreezServices]. -enum EnvironmentType { - Production, - Staging, -} - -/// Wrapper around the [CurrencyInfo] of a fiat currency -class FiatCurrency { - final String id; - final CurrencyInfo info; - - const FiatCurrency({ - required this.id, - required this.info, - }); -} - -/// Client-specific credentials to connect to and manage a Greenlight node in the cloud -class GreenlightCredentials { - final Uint8List deviceKey; - final Uint8List deviceCert; - - const GreenlightCredentials({ - required this.deviceKey, - required this.deviceCert, - }); -} - -class GreenlightNodeConfig { - final GreenlightCredentials? partnerCredentials; - final String? inviteCode; - - const GreenlightNodeConfig({ - this.partnerCredentials, - this.inviteCode, - }); -} - -/// Indicates the different service health check statuses. -enum HealthCheckStatus { - Operational, - Maintenance, - ServiceDisruption, -} - -@freezed -sealed class InputType with _$InputType { - /// # Supported standards - /// - /// - plain on-chain BTC address - /// - BIP21 - const factory InputType.bitcoinAddress({ - required BitcoinAddressData address, - }) = InputType_BitcoinAddress; - - /// Also covers URIs like `bitcoin:...&lightning=bolt11`. In this case, it returns the BOLT11 - /// and discards all other data. - const factory InputType.bolt11({ - required LNInvoice invoice, - }) = InputType_Bolt11; - const factory InputType.nodeId({ - required String nodeId, - }) = InputType_NodeId; - const factory InputType.url({ - required String url, - }) = InputType_Url; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-06 `payRequest` spec - /// - LUD-16 LN Address - /// - LUD-17 Support for lnurlp prefix with non-bech32-encoded LNURL URLs - const factory InputType.lnUrlPay({ - required LnUrlPayRequestData data, - }) = InputType_LnUrlPay; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-03 `withdrawRequest` spec - /// - LUD-17 Support for lnurlw prefix with non-bech32-encoded LNURL URLs - /// - /// # Not supported (yet) - /// - /// - LUD-14 `balanceCheck`: reusable `withdrawRequest`s - /// - LUD-19 Pay link discoverable from withdraw link - const factory InputType.lnUrlWithdraw({ - required LnUrlWithdrawRequestData data, - }) = InputType_LnUrlWithdraw; - - /// # Supported standards - /// - /// - LUD-01 LNURL bech32 encoding - /// - LUD-04 `auth` base spec - /// - LUD-17 Support for keyauth prefix with non-bech32-encoded LNURL URLs - const factory InputType.lnUrlAuth({ - required LnUrlAuthRequestData data, - }) = InputType_LnUrlAuth; - const factory InputType.lnUrlError({ - required LnUrlErrorData data, - }) = InputType_LnUrlError; -} - -/// Details of an invoice that has been paid, included as payload in an emitted [BreezEvent] -class InvoicePaidDetails { - final String paymentHash; - final String bolt11; - final Payment? payment; - - const InvoicePaidDetails({ - required this.paymentHash, - required this.bolt11, - this.payment, - }); -} - -/// Represents a list payments request. -class ListPaymentsRequest { - final List? filters; - final List? metadataFilters; - - /// Epoch time, in seconds - final int? fromTimestamp; - - /// Epoch time, in seconds - final int? toTimestamp; - final bool? includeFailures; - final int? offset; - final int? limit; - - const ListPaymentsRequest({ - this.filters, - this.metadataFilters, - this.fromTimestamp, - this.toTimestamp, - this.includeFailures, - this.offset, - this.limit, - }); -} - -/// Wrapper for a BOLT11 LN invoice -class LNInvoice { - final String bolt11; - final Network network; - final String payeePubkey; - final String paymentHash; - final String? description; - final String? descriptionHash; - final int? amountMsat; - final int timestamp; - final int expiry; - final List routingHints; - final Uint8List paymentSecret; - final int minFinalCltvExpiryDelta; - - const LNInvoice({ - required this.bolt11, - required this.network, - required this.payeePubkey, - required this.paymentHash, - this.description, - this.descriptionHash, - this.amountMsat, - required this.timestamp, - required this.expiry, - required this.routingHints, - required this.paymentSecret, - required this.minFinalCltvExpiryDelta, - }); -} - -/// Details of a LN payment, as included in a [Payment] -class LnPaymentDetails { - final String paymentHash; - final String label; - final String destinationPubkey; - final String paymentPreimage; - final bool keysend; - final String bolt11; - - /// Only set for [PaymentType::Received], payments which require to open a channel. - /// Represents the actual invoice paid by the sender - final String? openChannelBolt11; - - /// Only set for [PaymentType::Sent] payments that are part of a LNURL-pay workflow where - /// the endpoint returns a success action - final SuccessActionProcessed? lnurlSuccessAction; - - /// Only set for [PaymentType::Sent] payments if it is not a payment to a Lightning Address - final String? lnurlPayDomain; - - /// Only set for [PaymentType::Sent] payments if the user sent the comment using LNURL-pay - final String? lnurlPayComment; - - /// Only set for [PaymentType::Sent] payments that are sent to a Lightning Address - final String? lnAddress; - - /// Only set for [PaymentType::Sent] payments where the receiver endpoint returned LNURL metadata - final String? lnurlMetadata; - - /// Only set for [PaymentType::Received] payments that were received as part of LNURL-withdraw - final String? lnurlWithdrawEndpoint; - - /// Only set for [PaymentType::Received] payments that were received in the context of a swap - final SwapInfo? swapInfo; - - /// Only set for [PaymentType::Sent] payments that were sent in the context of a reverse swap - final ReverseSwapInfo? reverseSwapInfo; - - /// Only set for [PaymentStatus::Pending] payments that are inflight. - final int? pendingExpirationBlock; - - const LnPaymentDetails({ - required this.paymentHash, - required this.label, - required this.destinationPubkey, - required this.paymentPreimage, - required this.keysend, - required this.bolt11, - this.openChannelBolt11, - this.lnurlSuccessAction, - this.lnurlPayDomain, - this.lnurlPayComment, - this.lnAddress, - this.lnurlMetadata, - this.lnurlWithdrawEndpoint, - this.swapInfo, - this.reverseSwapInfo, - this.pendingExpirationBlock, - }); -} - -/// Wrapped in a [LnUrlAuth], this is the result of [parse] when given a LNURL-auth endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlAuthRequestData { - /// Hex encoded 32 bytes of challenge - final String k1; - - /// When available, one of: register, login, link, auth - final String? action; - - /// Indicates the domain of the LNURL-auth service, to be shown to the user when asking for - /// auth confirmation, as per LUD-04 spec. - final String domain; - - /// Indicates the URL of the LNURL-auth service, including the query arguments. This will be - /// extended with the signed challenge and the linking key, then called in the second step of the workflow. - final String url; - - const LnUrlAuthRequestData({ - required this.k1, - this.action, - required this.domain, - required this.url, - }); -} - -@freezed -sealed class LnUrlCallbackStatus with _$LnUrlCallbackStatus { - /// On-wire format is: `{"status": "OK"}` - const factory LnUrlCallbackStatus.ok() = LnUrlCallbackStatus_Ok; - - /// On-wire format is: `{"status": "ERROR", "reason": "error details..."}` - const factory LnUrlCallbackStatus.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlCallbackStatus_ErrorStatus; -} - -/// Wrapped in a [LnUrlError], this represents a LNURL-endpoint error. -class LnUrlErrorData { - final String reason; - - const LnUrlErrorData({ - required this.reason, - }); -} - -class LnUrlPayErrorData { - final String paymentHash; - final String reason; - - const LnUrlPayErrorData({ - required this.paymentHash, - required this.reason, - }); -} - -/// Represents a LNURL-pay request. -class LnUrlPayRequest { - /// The [LnUrlPayRequestData] returned by [crate::input_parser::parse] - final LnUrlPayRequestData data; - - /// The amount in millisatoshis for this payment - final int amountMsat; - - /// An optional comment for this payment - final String? comment; - - /// The external label or identifier of the [Payment] - final String? paymentLabel; - - const LnUrlPayRequest({ - required this.data, - required this.amountMsat, - this.comment, - this.paymentLabel, - }); -} - -/// Wrapped in a [LnUrlPay], this is the result of [parse] when given a LNURL-pay endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlPayRequestData { - final String callback; - - /// The minimum amount, in millisats, that this LNURL-pay endpoint accepts - final int minSendable; - - /// The maximum amount, in millisats, that this LNURL-pay endpoint accepts - final int maxSendable; - - /// As per LUD-06, `metadata` is a raw string (e.g. a json representation of the inner map). - /// Use `metadata_vec()` to get the parsed items. - final String metadataStr; - - /// The comment length accepted by this endpoint - /// - /// See - final int commentAllowed; - - /// Indicates the domain of the LNURL-pay service, to be shown to the user when asking for - /// payment input, as per LUD-06 spec. - /// - /// Note: this is not the domain of the callback, but the domain of the LNURL-pay endpoint. - final String domain; - - /// Value indicating whether the recipient supports Nostr Zaps through NIP-57. - /// - /// See - final bool allowsNostr; - - /// Optional recipient's lnurl provider's Nostr pubkey for NIP-57. If it exists it should be a - /// valid BIP 340 public key in hex. - /// - /// See - /// See - final String? nostrPubkey; - - /// If sending to a LN Address, this will be filled. - final String? lnAddress; - - const LnUrlPayRequestData({ - required this.callback, - required this.minSendable, - required this.maxSendable, - required this.metadataStr, - required this.commentAllowed, - required this.domain, - required this.allowsNostr, - this.nostrPubkey, - this.lnAddress, - }); -} - -@freezed -sealed class LnUrlPayResult with _$LnUrlPayResult { - const factory LnUrlPayResult.endpointSuccess({ - required LnUrlPaySuccessData data, - }) = LnUrlPayResult_EndpointSuccess; - const factory LnUrlPayResult.endpointError({ - required LnUrlErrorData data, - }) = LnUrlPayResult_EndpointError; - const factory LnUrlPayResult.payError({ - required LnUrlPayErrorData data, - }) = LnUrlPayResult_PayError; -} - -class LnUrlPaySuccessData { - final Payment payment; - final SuccessActionProcessed? successAction; - - const LnUrlPaySuccessData({ - required this.payment, - this.successAction, - }); -} - -class LnUrlWithdrawRequest { - /// Request data containing information on how to call the lnurl withdraw - /// endpoint. Typically retrieved by calling `parse()` on a lnurl withdraw - /// input. - final LnUrlWithdrawRequestData data; - - /// The amount to withdraw from the lnurl withdraw endpoint. Must be between - /// `min_withdrawable` and `max_withdrawable`. - final int amountMsat; - - /// Optional description that will be put in the payment request for the - /// lnurl withdraw endpoint. - final String? description; - - const LnUrlWithdrawRequest({ - required this.data, - required this.amountMsat, - this.description, - }); -} - -/// Wrapped in a [LnUrlWithdraw], this is the result of [parse] when given a LNURL-withdraw endpoint. -/// -/// It represents the endpoint's parameters for the LNURL workflow. -/// -/// See -class LnUrlWithdrawRequestData { - final String callback; - final String k1; - final String defaultDescription; - - /// The minimum amount, in millisats, that this LNURL-withdraw endpoint accepts - final int minWithdrawable; - - /// The maximum amount, in millisats, that this LNURL-withdraw endpoint accepts - final int maxWithdrawable; - - const LnUrlWithdrawRequestData({ - required this.callback, - required this.k1, - required this.defaultDescription, - required this.minWithdrawable, - required this.maxWithdrawable, - }); -} - -@freezed -sealed class LnUrlWithdrawResult with _$LnUrlWithdrawResult { - const factory LnUrlWithdrawResult.ok({ - required LnUrlWithdrawSuccessData data, - }) = LnUrlWithdrawResult_Ok; - const factory LnUrlWithdrawResult.errorStatus({ - required LnUrlErrorData data, - }) = LnUrlWithdrawResult_ErrorStatus; -} - -class LnUrlWithdrawSuccessData { - final LNInvoice invoice; - - const LnUrlWithdrawSuccessData({ - required this.invoice, - }); -} - -/// Locale-specific settings for the representation of a currency -class LocaleOverrides { - final String locale; - final int? spacing; - final Symbol symbol; - - const LocaleOverrides({ - required this.locale, - this.spacing, - required this.symbol, - }); -} - -/// Localized name of a currency -class LocalizedName { - final String locale; - final String name; - - const LocalizedName({ - required this.locale, - required this.name, - }); -} - -/// Internal SDK log entry -class LogEntry { - final String line; - final String level; - - const LogEntry({ - required this.line, - required this.level, - }); -} - -/// Details of supported LSP -class LspInformation { - final String id; - - /// The name of of LSP - final String name; - - /// The URL of the LSP - final String widgetUrl; - - /// The identity pubkey of the Lightning node - final String pubkey; - - /// The network location of the lightning node, e.g. `12.34.56.78:9012` or `localhost:10011` - final String host; - - /// The base fee charged regardless of the number of milli-satoshis sent - final int baseFeeMsat; - - /// The effective fee rate in milli-satoshis. The precision of this value goes up to 6 decimal places, so 1e-6. - final double feeRate; - - /// The required timelock delta for HTLCs forwarded over the channel - final int timeLockDelta; - - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minHtlcMsat; - final Uint8List lspPubkey; - final OpeningFeeParamsMenu openingFeeParamsList; - - const LspInformation({ - required this.id, - required this.name, - required this.widgetUrl, - required this.pubkey, - required this.host, - required this.baseFeeMsat, - required this.feeRate, - required this.timeLockDelta, - required this.minHtlcMsat, - required this.lspPubkey, - required this.openingFeeParamsList, - }); -} - -class MaxReverseSwapAmountResponse { - /// The total sats that can be sent onchain. - final int totalSat; - - const MaxReverseSwapAmountResponse({ - required this.totalSat, - }); -} - -class MessageSuccessActionData { - final String message; - - const MessageSuccessActionData({ - required this.message, - }); -} - -/// A metadata filter which can be applied when retrieving the transaction list -class MetadataFilter { - /// Specifies which field to apply the filter on, using the JSON path format - final String jsonPath; - - /// Specifies which JSON value to filter for. - /// As such, strings must be wrapped with quotes ("") in order to be properly filtered - final String jsonValue; - - const MetadataFilter({ - required this.jsonPath, - required this.jsonValue, - }); -} - -/// The different supported bitcoin networks -enum Network { - /// Mainnet - Bitcoin, - Testnet, - Signet, - Regtest, -} - -@freezed -sealed class NodeConfig with _$NodeConfig { - const factory NodeConfig.greenlight({ - required GreenlightNodeConfig config, - }) = NodeConfig_Greenlight; -} - -@freezed -sealed class NodeCredentials with _$NodeCredentials { - const factory NodeCredentials.greenlight({ - required GreenlightCredentials credentials, - }) = NodeCredentials_Greenlight; -} - -/// The node state of a Greenlight LN node running in the cloud. -/// -/// Note: The implementation attempts to provide the most up-to-date values, -/// which may result in some short-lived inconsistencies -/// (e.g., `channels_balance_msat` may be updated before `inbound_liquidity_msats`). -class NodeState { - final String id; - final int blockHeight; - final int channelsBalanceMsat; - final int onchainBalanceMsat; - final int pendingOnchainBalanceMsat; - final List utxos; - final int maxPayableMsat; - final int maxReceivableMsat; - final int maxSinglePaymentAmountMsat; - final int maxChanReserveMsats; - final List connectedPeers; - final int inboundLiquidityMsats; - - const NodeState({ - required this.id, - required this.blockHeight, - required this.channelsBalanceMsat, - required this.onchainBalanceMsat, - required this.pendingOnchainBalanceMsat, - required this.utxos, - required this.maxPayableMsat, - required this.maxReceivableMsat, - required this.maxSinglePaymentAmountMsat, - required this.maxChanReserveMsats, - required this.connectedPeers, - required this.inboundLiquidityMsats, - }); -} - -class OnchainPaymentLimitsResponse { - /// Minimum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the lower limit of what the reverse swap service accepts as a send amount - final int minSat; - - /// Maximum amount that can be sent. This value is influenced by - /// - what can be sent given the available channels and balance - /// - the upper limit of what the reverse swap service accepts as a send amount - final int maxSat; - - const OnchainPaymentLimitsResponse({ - required this.minSat, - required this.maxSat, - }); -} - -class OpenChannelFeeRequest { - final int? amountMsat; - final int? expiry; - - const OpenChannelFeeRequest({ - this.amountMsat, - this.expiry, - }); -} - -class OpenChannelFeeResponse { - /// Opening fee for receiving the amount set in the [OpenChannelFeeRequest], in case it was set. - /// It may be zero if no new channel needs to be opened. - final int? feeMsat; - - /// The fee params for receiving more than the current inbound liquidity. - final OpeningFeeParams feeParams; - - const OpenChannelFeeResponse({ - this.feeMsat, - required this.feeParams, - }); -} - -/// Dynamic fee parameters offered by the LSP for opening a new channel. -/// -/// After they are received, the client shouldn't change them when calling LSP methods, -/// otherwise the LSP may reject the call. -class OpeningFeeParams { - /// The minimum value in millisatoshi we will require for incoming HTLCs on the channel - final int minMsat; - - /// The fee in ppm charged over liquidity when buying a channel - final int proportional; - - /// The date and time this opening fee params promise expires, in RFC 3339 / ISO 8601 format - final String validUntil; - - /// The channel can be closed if not used within this duration in blocks - final int maxIdleTime; - final int maxClientToSelfDelay; - final String promise; - - const OpeningFeeParams({ - required this.minMsat, - required this.proportional, - required this.validUntil, - required this.maxIdleTime, - required this.maxClientToSelfDelay, - required this.promise, - }); -} - -/// See [OpeningFeeParamsMenu::try_from] -class OpeningFeeParamsMenu { - final List values; - - const OpeningFeeParamsMenu({ - required this.values, - }); -} - -class PayOnchainRequest { - final String recipientAddress; - final PrepareOnchainPaymentResponse prepareRes; - - const PayOnchainRequest({ - required this.recipientAddress, - required this.prepareRes, - }); -} - -class PayOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const PayOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a payment, including its [PaymentType] and [PaymentDetails] -class Payment { - final String id; - final PaymentType paymentType; - - /// Epoch time, in seconds - final int paymentTime; - final int amountMsat; - final int feeMsat; - final PaymentStatus status; - final String? error; - final String? description; - final PaymentDetails details; - final String? metadata; - - const Payment({ - required this.id, - required this.paymentType, - required this.paymentTime, - required this.amountMsat, - required this.feeMsat, - required this.status, - this.error, - this.description, - required this.details, - this.metadata, - }); -} - -@freezed -sealed class PaymentDetails with _$PaymentDetails { - const factory PaymentDetails.ln({ - required LnPaymentDetails data, - }) = PaymentDetails_Ln; - const factory PaymentDetails.closedChannel({ - required ClosedChannelPaymentDetails data, - }) = PaymentDetails_ClosedChannel; -} - -class PaymentFailedData { - final String error; - final String nodeId; - final LNInvoice? invoice; - final String? label; - - const PaymentFailedData({ - required this.error, - required this.nodeId, - this.invoice, - this.label, - }); -} - -/// The status of a payment -enum PaymentStatus { - Pending, - Complete, - Failed, -} - -/// Different types of supported payments -enum PaymentType { - Sent, - Received, - ClosedChannel, -} - -/// Different types of supported filters which can be applied when retrieving the transaction list -enum PaymentTypeFilter { - Sent, - Received, - ClosedChannel, -} - -/// See [ReverseSwapFeesRequest] -class PrepareOnchainPaymentRequest { - /// Depending on `amount_type`, this may be the desired send amount or the desired receive amount. - final int amountSat; - final SwapAmountType amountType; - - /// Feerate (sat / vByte) for the claim transaction - final int claimTxFeerate; - - const PrepareOnchainPaymentRequest({ - required this.amountSat, - required this.amountType, - required this.claimTxFeerate, - }); -} - -/// Contains fields describing the reverse swap parameters (see [ReverseSwapPairInfo]), as well as -/// the resulting send and receive amounts. -class PrepareOnchainPaymentResponse { - final String feesHash; - final double feesPercentage; - final int feesLockup; - final int feesClaim; - final int senderAmountSat; - final int recipientAmountSat; - final int totalFees; - - const PrepareOnchainPaymentResponse({ - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - required this.senderAmountSat, - required this.recipientAmountSat, - required this.totalFees, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what fee will be charged in satoshis. -/// This model holds the request data which consists of the address to redeem on-chain funds to and the fee rate in. -/// satoshis per vbyte which will be converted to absolute satoshis. -class PrepareRedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const PrepareRedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -/// We need to prepare a redeem_onchain_funds transaction to know what a fee it will be charged in satoshis -/// this model holds the response data, which consists of the weight and the absolute fee in sats -class PrepareRedeemOnchainFundsResponse { - final int txWeight; - final int txFeeSat; - - const PrepareRedeemOnchainFundsResponse({ - required this.txWeight, - required this.txFeeSat, - }); -} - -class PrepareRefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const PrepareRefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class PrepareRefundResponse { - final int refundTxWeight; - final int refundTxFeeSat; - - const PrepareRefundResponse({ - required this.refundTxWeight, - required this.refundTxFeeSat, - }); -} - -/// Denominator in an exchange rate -class Rate { - final String coin; - final double value; - - const Rate({ - required this.coin, - required this.value, - }); -} - -class ReceiveOnchainRequest { - final OpeningFeeParams? openingFeeParams; - - const ReceiveOnchainRequest({ - this.openingFeeParams, - }); -} - -/// Represents a receive payment request. -class ReceivePaymentRequest { - /// The amount in satoshis for this payment request - final int amountMsat; - - /// The description for this payment request. - final String description; - - /// Optional preimage for this payment request. - /// If specified, it will be used instead of generating a new one. - final Uint8List? preimage; - - /// If set and valid, these fess options are used when a new channels is needed. - /// Otherwise the default fee options will be used. - final OpeningFeeParams? openingFeeParams; - - /// If set to true, then the bolt11 invoice returned includes the description hash. - final bool? useDescriptionHash; - - /// if specified, set the time the invoice is valid for, in seconds. - final int? expiry; - - /// if specified, sets the min_final_cltv_expiry for the invoice - final int? cltv; - - const ReceivePaymentRequest({ - required this.amountMsat, - required this.description, - this.preimage, - this.openingFeeParams, - this.useDescriptionHash, - this.expiry, - this.cltv, - }); -} - -/// Represents a receive payment response. -/// -/// Breez SDK may have to open a new channel to receive this payment. In that case, the channel will -/// be opened automatically when the invoice is paid, and the fees will be described in the -/// `opening_fee_params` and `opening_fee_msat` fields. -class ReceivePaymentResponse { - /// The generated invoice, including any necessary routing hints - final LNInvoice lnInvoice; - - /// If set, these are the [OpeningFeeParams] used to calculate the channel opening fees. - final OpeningFeeParams? openingFeeParams; - - /// If set, this is the channel opening fee that will be deduced from the invoice amount. - final int? openingFeeMsat; - - const ReceivePaymentResponse({ - required this.lnInvoice, - this.openingFeeParams, - this.openingFeeMsat, - }); -} - -/// Wrapper containing the result of the recommended fees query, in sat/vByte, based on mempool.space data -class RecommendedFees { - final int fastestFee; - final int halfHourFee; - final int hourFee; - final int economyFee; - final int minimumFee; - - const RecommendedFees({ - required this.fastestFee, - required this.halfHourFee, - required this.hourFee, - required this.economyFee, - required this.minimumFee, - }); -} - -class RedeemOnchainFundsRequest { - final String toAddress; - final int satPerVbyte; - - const RedeemOnchainFundsRequest({ - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RedeemOnchainFundsResponse { - final Uint8List txid; - - const RedeemOnchainFundsResponse({ - required this.txid, - }); -} - -class RefundRequest { - final String swapAddress; - final String toAddress; - final int satPerVbyte; - - const RefundRequest({ - required this.swapAddress, - required this.toAddress, - required this.satPerVbyte, - }); -} - -class RefundResponse { - final String refundTxId; - - const RefundResponse({ - required this.refundTxId, - }); -} - -@freezed -sealed class ReportIssueRequest with _$ReportIssueRequest { - const factory ReportIssueRequest.paymentFailure({ - required ReportPaymentFailureDetails data, - }) = ReportIssueRequest_PaymentFailure; -} - -class ReportPaymentFailureDetails { - /// The payment hash of the payment failure - final String paymentHash; - - /// The comment or error text - final String? comment; - - const ReportPaymentFailureDetails({ - required this.paymentHash, - this.comment, - }); -} - -class ReverseSwapFeesRequest { - /// Amount to be sent - final int? sendAmountSat; - - /// Feerate (sat / vByte) for the claim transaction - final int? claimTxFeerate; - - const ReverseSwapFeesRequest({ - this.sendAmountSat, - this.claimTxFeerate, - }); -} - -/// Simplified version of [FullReverseSwapInfo], containing only the user-relevant fields -class ReverseSwapInfo { - final String id; - final String claimPubkey; - - /// The lockup tx id, available from the moment the lockup tx is seen in the mempool by the SDK - final String? lockupTxid; - - /// The claim tx id, available from the moment the claim tx is broadcast by the SDK - final String? claimTxid; - final int onchainAmountSat; - final ReverseSwapStatus status; - - const ReverseSwapInfo({ - required this.id, - required this.claimPubkey, - this.lockupTxid, - this.claimTxid, - required this.onchainAmountSat, - required this.status, - }); -} - -/// Details about the reverse swap fees and parameters, at this point in time -class ReverseSwapPairInfo { - /// Minimum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int min; - - /// Maximum amount of sats a reverse swap is allowed to have given the current feerate conditions - final int max; - - /// Hash of the pair info JSON - final String feesHash; - - /// Percentage fee for the reverse swap service - final double feesPercentage; - - /// Miner fees in sats for locking up funds - final int feesLockup; - - /// Miner fees in sats for claiming funds. Estimate or exact value, depending on the request args. - final int feesClaim; - - /// Total fees for the reverse swap, in sats, based on the given send amount. - /// - /// The field is set only when the [ReverseSwapFeesRequest] `send_amount_sat` is known. - /// - /// If the [ReverseSwapFeesRequest] has the `claim_tx_feerate` empty, this is an estimate. If - /// the `claim_tx_feerate` is set, this is the exact value of the total reverse swap fees. - final int? totalFees; - - const ReverseSwapPairInfo({ - required this.min, - required this.max, - required this.feesHash, - required this.feesPercentage, - required this.feesLockup, - required this.feesClaim, - this.totalFees, - }); -} - -/// The possible statuses of a reverse swap, from the Breez SDK perspective. -/// -/// See [BoltzApiReverseSwapStatus] for the reverse swap status from the Breez endpoint point of view. -enum ReverseSwapStatus { - /// HODL invoice payment is not completed yet - /// - /// This is also the temporary status of a reverse swap when restoring a node, until `sync` finishes. - Initial, - - /// HODL invoice payment was successfully triggered and confirmed by Boltz, but the reverse swap - /// is not yet complete - InProgress, - - /// An explicit error occurs (validation error, failure reported by Boltz, expiration, etc) and - /// the initial invoice funds are returned to the sender (invoice is cancelled or payment failed) - Cancelled, - - /// Successfully completed (claim tx has been seen in the mempool) - CompletedSeen, - - /// Successfully completed (claim tx has at least one confirmation) - CompletedConfirmed, -} - -/// A route hint for a LN payment -class RouteHint { - final List hops; - - const RouteHint({ - required this.hops, - }); -} - -/// Details of a specific hop in a larger route hint -class RouteHintHop { - /// The node_id of the non-target end of the route - final String srcNodeId; - - /// The short_channel_id of this channel - final int shortChannelId; - - /// The fees which must be paid to use this channel - final int feesBaseMsat; - final int feesProportionalMillionths; - - /// The difference in CLTV values between this node and the next node. - final int cltvExpiryDelta; - - /// The minimum value, in msat, which must be relayed to the next hop. - final int? htlcMinimumMsat; - - /// The maximum value in msat available for routing with a single HTLC. - final int? htlcMaximumMsat; - - const RouteHintHop({ - required this.srcNodeId, - required this.shortChannelId, - required this.feesBaseMsat, - required this.feesProportionalMillionths, - required this.cltvExpiryDelta, - this.htlcMinimumMsat, - this.htlcMaximumMsat, - }); -} - -class SendOnchainRequest { - final int amountSat; - final String onchainRecipientAddress; - final String pairHash; - final int satPerVbyte; - - const SendOnchainRequest({ - required this.amountSat, - required this.onchainRecipientAddress, - required this.pairHash, - required this.satPerVbyte, - }); -} - -class SendOnchainResponse { - final ReverseSwapInfo reverseSwapInfo; - - const SendOnchainResponse({ - required this.reverseSwapInfo, - }); -} - -/// Represents a send payment request. -class SendPaymentRequest { - /// The bolt11 invoice - final String bolt11; - - /// The amount to pay in millisatoshis. Should only be set when `bolt11` is a zero-amount invoice. - final int? amountMsat; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendPaymentRequest({ - required this.bolt11, - this.amountMsat, - this.label, - }); -} - -/// Represents a send payment response. -class SendPaymentResponse { - final Payment payment; - - const SendPaymentResponse({ - required this.payment, - }); -} - -/// Represents a send spontaneous payment request. -class SendSpontaneousPaymentRequest { - /// The node id to send this payment is - final String nodeId; - - /// The amount in millisatoshis for this payment - final int amountMsat; - final List? extraTlvs; - - /// The external label or identifier of the [Payment] - final String? label; - - const SendSpontaneousPaymentRequest({ - required this.nodeId, - required this.amountMsat, - this.extraTlvs, - this.label, - }); -} - -/// Represents a service health check response. -class ServiceHealthCheckResponse { - final HealthCheckStatus status; - - const ServiceHealthCheckResponse({ - required this.status, - }); -} - -/// Request to sign a message with the node's private key. -class SignMessageRequest { - /// The message to be signed by the node's private key. - final String message; - - const SignMessageRequest({ - required this.message, - }); -} - -/// Response to a [SignMessageRequest]. -class SignMessageResponse { - /// The signature that covers the message of SignMessageRequest. Zbase - /// encoded. - final String signature; - - const SignMessageResponse({ - required this.signature, - }); -} - -class StaticBackupRequest { - final String workingDir; - - const StaticBackupRequest({ - required this.workingDir, - }); -} - -class StaticBackupResponse { - final List? backup; - - const StaticBackupResponse({ - this.backup, - }); -} - -@freezed -sealed class SuccessActionProcessed with _$SuccessActionProcessed { - /// See [SuccessAction::Aes] for received payload - /// - /// See [AesSuccessActionDataDecrypted] for decrypted payload - const factory SuccessActionProcessed.aes({ - required AesSuccessActionDataResult result, - }) = SuccessActionProcessed_Aes; - - /// See [SuccessAction::Message] - const factory SuccessActionProcessed.message({ - required MessageSuccessActionData data, - }) = SuccessActionProcessed_Message; - - /// See [SuccessAction::Url] - const factory SuccessActionProcessed.url({ - required UrlSuccessActionData data, - }) = SuccessActionProcessed_Url; -} - -enum SwapAmountType { - Send, - Receive, -} - -/// Represents the details of an on-going swap. -/// -/// Once this SwapInfo is created it will be monitored on-chain and its state is -/// saved to the persistent storage. -/// -/// The SwapInfo has a status which changes accordingly, documented in [SwapStatus]. -/// -class SwapInfo { - /// Bitcoin address for this swap. Sats sent to this address will be swapped. - final String bitcoinAddress; - - /// Relative time lock start, received from [SwapperAPI::create_swap]. - final int createdAt; - - /// Relative time lock for the timeout for the script to be redeemed before swap fails. - final int lockHeight; - - /// sha256 hash of preimage to used in the claim sript. - final Uint8List paymentHash; - - /// Secret to claim the swap. - final Uint8List preimage; - - /// Secret claim key for the bitcoin address. - final Uint8List privateKey; - - /// Public key in binary format of the private claim private key. - final Uint8List publicKey; - - /// The public key in binary format from the swapping service. Received from [SwapperAPI::create_swap]. - final Uint8List swapperPublicKey; - - /// The locking script for the generated bitcoin address. Received from [SwapperAPI::create_swap]. - final Uint8List script; - - /// bolt11 invoice to claim the sent funds. - final String? bolt11; - - /// Amount of millisatoshis claimed from sent funds and paid for via bolt11 invoice. - final int paidMsat; - - /// Total amount of transactions sent to the swap address. - final int totalIncomingTxs; - - /// Confirmed onchain sats to be claim with an bolt11 invoice or refunded if swap fails. - final int confirmedSats; - - /// Unconfirmed sats waiting to be confirmed onchain. - final int unconfirmedSats; - - /// Shows the current status of the swap, either `Initial` or `Expired`. - final SwapStatus status; - - /// Transaction IDs for failed swap attempts. - final List refundTxIds; - - /// Refund transaction IDs for ongoing swap awaiting confirmation. - final List unconfirmedTxIds; - - /// Transaction IDs that have been confirmed on-chain. - final List confirmedTxIds; - - /// The minimum amount of sats one can send in order for the swap to succeed. Received from [SwapperAPI::create_swap]. - final int minAllowedDeposit; - - /// The maximum amount of sats one can send in order for the swap to succeed. This is determined based on `max_swapper_payable` and the node's local balance. - final int maxAllowedDeposit; - - /// The absolute maximum value payable by the swapper. Received from [SwapperAPI::create_swap]. - final int maxSwapperPayable; - - /// Error reason for when swap fails. - final String? lastRedeemError; - - /// The dynamic fees which is set if a channel opening is needed. - /// - /// This is an optional field for backward compatibility with swaps created before dynamic fees. - /// - /// Swaps created after dynamic fees were introduced always have this field set. - final OpeningFeeParams? channelOpeningFees; - - /// The block height when the swap was confirmed. - final int? confirmedAt; - - const SwapInfo({ - required this.bitcoinAddress, - required this.createdAt, - required this.lockHeight, - required this.paymentHash, - required this.preimage, - required this.privateKey, - required this.publicKey, - required this.swapperPublicKey, - required this.script, - this.bolt11, - required this.paidMsat, - required this.totalIncomingTxs, - required this.confirmedSats, - required this.unconfirmedSats, - required this.status, - required this.refundTxIds, - required this.unconfirmedTxIds, - required this.confirmedTxIds, - required this.minAllowedDeposit, - required this.maxAllowedDeposit, - required this.maxSwapperPayable, - this.lastRedeemError, - this.channelOpeningFees, - this.confirmedAt, - }); -} - -/// The status of a swap -enum SwapStatus { - /// The swap address has been created and either there aren't any confirmed transactions associated with it - /// or there are confirmed transactions that are bellow the lock timeout which means the funds are still - /// eligible to be redeemed normally. - Initial, - WaitingConfirmation, - Redeemable, - Redeemed, - - /// The swap address has confirmed transactions associated with it and the lock timeout has passed since - /// the earliest confirmed transaction. This means the only way to spend the funds from this address is by - /// broadcasting a refund transaction. - Refundable, - Completed, -} - -/// Settings for the symbol representation of a currency -class Symbol { - final String? grapheme; - final String? template; - final bool? rtl; - final int? position; - - const Symbol({ - this.grapheme, - this.template, - this.rtl, - this.position, - }); -} - -/// Represents a TLV entry for a keysend payment. -class TlvEntry { - /// The type field for the TLV - final int fieldNumber; - - /// The value bytes for the TLV - final Uint8List value; - - const TlvEntry({ - required this.fieldNumber, - required this.value, - }); -} - -/// UTXO known to the LN node -class UnspentTransactionOutput { - final Uint8List txid; - final int outnum; - final int amountMillisatoshi; - final String address; - final bool reserved; - - const UnspentTransactionOutput({ - required this.txid, - required this.outnum, - required this.amountMillisatoshi, - required this.address, - required this.reserved, - }); -} - -class UrlSuccessActionData { - final String description; - final String url; - - const UrlSuccessActionData({ - required this.description, - required this.url, - }); -} - -class BreezSdkCoreImpl implements BreezSdkCore { - final BreezSdkCorePlatform _platform; - factory BreezSdkCoreImpl(ExternalLibrary dylib) => BreezSdkCoreImpl.raw(BreezSdkCorePlatform(dylib)); - - /// Only valid on web/WASM platforms. - factory BreezSdkCoreImpl.wasm(FutureOr module) => BreezSdkCoreImpl(module as ExternalLibrary); - BreezSdkCoreImpl.raw(this._platform); - Future connect({required ConnectRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_connect_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect", - argNames: ["req"], - ); - - Future isInitialized({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_is_initialized(port_), - parseSuccessData: _wire2api_bool, - parseErrorData: null, - constMeta: kIsInitializedConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kIsInitializedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "is_initialized", - argNames: [], - ); - - Future sync({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sync(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSyncConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSyncConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sync", - argNames: [], - ); - - Future nodeCredentials({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_credentials(port_), - parseSuccessData: _wire2api_opt_box_autoadd_node_credentials, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeCredentialsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeCredentialsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_credentials", - argNames: [], - ); - - Future nodeInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_node_info(port_), - parseSuccessData: _wire2api_node_state, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kNodeInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kNodeInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "node_info", - argNames: [], - ); - - Future configureNode({required ConfigureNodeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_configure_node_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_configure_node(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConfigureNodeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConfigureNodeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "configure_node", - argNames: ["req"], - ); - - Future disconnect({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_disconnect(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kDisconnectConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDisconnectConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "disconnect", - argNames: [], - ); - - Future signMessage({required SignMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_sign_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_sign_message(port_, arg0), - parseSuccessData: _wire2api_sign_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSignMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSignMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "sign_message", - argNames: ["req"], - ); - - Future checkMessage({required CheckMessageRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_check_message_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_check_message(port_, arg0), - parseSuccessData: _wire2api_check_message_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCheckMessageConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCheckMessageConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "check_message", - argNames: ["req"], - ); - - Future mnemonicToSeed({required String phrase, dynamic hint}) { - var arg0 = _platform.api2wire_String(phrase); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_mnemonic_to_seed(port_, arg0), - parseSuccessData: _wire2api_uint_8_list, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMnemonicToSeedConstMeta, - argValues: [phrase], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMnemonicToSeedConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "mnemonic_to_seed", - argNames: ["phrase"], - ); - - Future defaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) { - var arg0 = api2wire_environment_type(envType); - var arg1 = _platform.api2wire_String(apiKey); - var arg2 = _platform.api2wire_box_autoadd_node_config(nodeConfig); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_default_config(port_, arg0, arg1, arg2), - parseSuccessData: _wire2api_config, - parseErrorData: null, - constMeta: kDefaultConfigConstMeta, - argValues: [envType, apiKey, nodeConfig], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kDefaultConfigConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "default_config", - argNames: ["envType", "apiKey", "nodeConfig"], - ); - - Future staticBackup({required StaticBackupRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_static_backup_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_static_backup(port_, arg0), - parseSuccessData: _wire2api_static_backup_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kStaticBackupConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kStaticBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "static_backup", - argNames: ["req"], - ); - - Future serviceHealthCheck({required String apiKey, dynamic hint}) { - var arg0 = _platform.api2wire_String(apiKey); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_service_health_check(port_, arg0), - parseSuccessData: _wire2api_service_health_check_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kServiceHealthCheckConstMeta, - argValues: [apiKey], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kServiceHealthCheckConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "service_health_check", - argNames: ["apiKey"], - ); - - Stream breezEventsStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_events_stream(port_), - parseSuccessData: _wire2api_breez_event, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezEventsStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezEventsStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_events_stream", - argNames: [], - ); - - Stream breezLogStream({dynamic hint}) { - return _platform.executeStream(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_breez_log_stream(port_), - parseSuccessData: _wire2api_log_entry, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBreezLogStreamConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBreezLogStreamConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "breez_log_stream", - argNames: [], - ); - - Future> listLsps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_lsps(port_), - parseSuccessData: _wire2api_list_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListLspsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListLspsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_lsps", - argNames: [], - ); - - Future connectLsp({required String lspId, dynamic hint}) { - var arg0 = _platform.api2wire_String(lspId); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_connect_lsp(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kConnectLspConstMeta, - argValues: [lspId], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kConnectLspConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "connect_lsp", - argNames: ["lspId"], - ); - - Future lspId({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_id(port_), - parseSuccessData: _wire2api_opt_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspIdConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspIdConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_id", - argNames: [], - ); - - Future fetchLspInfo({required String id, dynamic hint}) { - var arg0 = _platform.api2wire_String(id); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_lsp_info(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchLspInfoConstMeta, - argValues: [id], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_lsp_info", - argNames: ["id"], - ); - - Future lspInfo({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lsp_info(port_), - parseSuccessData: _wire2api_lsp_information, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLspInfoConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLspInfoConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lsp_info", - argNames: [], - ); - - Future closeLspChannels({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_close_lsp_channels(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kCloseLspChannelsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kCloseLspChannelsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "close_lsp_channels", - argNames: [], - ); - - Future registerWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_register_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRegisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRegisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "register_webhook", - argNames: ["webhookUrl"], - ); - - Future unregisterWebhook({required String webhookUrl, dynamic hint}) { - var arg0 = _platform.api2wire_String(webhookUrl); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_unregister_webhook(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kUnregisterWebhookConstMeta, - argValues: [webhookUrl], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kUnregisterWebhookConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "unregister_webhook", - argNames: ["webhookUrl"], - ); - - Future backup({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup", - argNames: [], - ); - - Future backupStatus({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_backup_status(port_), - parseSuccessData: _wire2api_backup_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBackupStatusConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBackupStatusConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "backup_status", - argNames: [], - ); - - Future parseInvoice({required String invoice, dynamic hint}) { - var arg0 = _platform.api2wire_String(invoice); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_invoice(port_, arg0), - parseSuccessData: _wire2api_ln_invoice, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInvoiceConstMeta, - argValues: [invoice], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInvoiceConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_invoice", - argNames: ["invoice"], - ); - - Future parseInput({required String input, dynamic hint}) { - var arg0 = _platform.api2wire_String(input); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_parse_input(port_, arg0), - parseSuccessData: _wire2api_input_type, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kParseInputConstMeta, - argValues: [input], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kParseInputConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "parse_input", - argNames: ["input"], - ); - - Future> listPayments({required ListPaymentsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_list_payments_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_payments(port_, arg0), - parseSuccessData: _wire2api_list_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListPaymentsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListPaymentsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_payments", - argNames: ["req"], - ); - - Future paymentByHash({required String hash, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_payment_by_hash(port_, arg0), - parseSuccessData: _wire2api_opt_box_autoadd_payment, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPaymentByHashConstMeta, - argValues: [hash], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPaymentByHashConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "payment_by_hash", - argNames: ["hash"], - ); - - Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) { - var arg0 = _platform.api2wire_String(hash); - var arg1 = _platform.api2wire_String(metadata); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_set_payment_metadata(port_, arg0, arg1), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSetPaymentMetadataConstMeta, - argValues: [hash, metadata], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSetPaymentMetadataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "set_payment_metadata", - argNames: ["hash", "metadata"], - ); - - Future sendPayment({required SendPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_payment", - argNames: ["req"], - ); - - Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_spontaneous_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_spontaneous_payment(port_, arg0), - parseSuccessData: _wire2api_send_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendSpontaneousPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendSpontaneousPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_spontaneous_payment", - argNames: ["req"], - ); - - Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_payment(port_, arg0), - parseSuccessData: _wire2api_receive_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceivePaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceivePaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_payment", - argNames: ["req"], - ); - - Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_pay_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_pay(port_, arg0), - parseSuccessData: _wire2api_ln_url_pay_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlPayConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlPayConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_pay", - argNames: ["req"], - ); - - Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_withdraw_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_withdraw(port_, arg0), - parseSuccessData: _wire2api_ln_url_withdraw_result, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlWithdrawConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlWithdrawConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_withdraw", - argNames: ["req"], - ); - - Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_ln_url_auth_request_data(reqData); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_lnurl_auth(port_, arg0), - parseSuccessData: _wire2api_ln_url_callback_status, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kLnurlAuthConstMeta, - argValues: [reqData], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kLnurlAuthConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "lnurl_auth", - argNames: ["reqData"], - ); - - Future reportIssue({required ReportIssueRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_report_issue_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_report_issue(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReportIssueConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReportIssueConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "report_issue", - argNames: ["req"], - ); - - Future> fetchFiatRates({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_fiat_rates(port_), - parseSuccessData: _wire2api_list_rate, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchFiatRatesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchFiatRatesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_fiat_rates", - argNames: [], - ); - - Future> listFiatCurrencies({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_fiat_currencies(port_), - parseSuccessData: _wire2api_list_fiat_currency, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListFiatCurrenciesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListFiatCurrenciesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_fiat_currencies", - argNames: [], - ); - - Future maxReverseSwapAmount({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_max_reverse_swap_amount(port_), - parseSuccessData: _wire2api_max_reverse_swap_amount_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kMaxReverseSwapAmountConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kMaxReverseSwapAmountConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "max_reverse_swap_amount", - argNames: [], - ); - - Future sendOnchain({required SendOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_send_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_send_onchain(port_, arg0), - parseSuccessData: _wire2api_send_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kSendOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kSendOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "send_onchain", - argNames: ["req"], - ); - - Future payOnchain({required PayOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_pay_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_pay_onchain(port_, arg0), - parseSuccessData: _wire2api_pay_onchain_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPayOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPayOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "pay_onchain", - argNames: ["req"], - ); - - Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_receive_onchain_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_receive_onchain(port_, arg0), - parseSuccessData: _wire2api_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kReceiveOnchainConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kReceiveOnchainConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "receive_onchain", - argNames: ["req"], - ); - - Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_buy_bitcoin_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_buy_bitcoin(port_, arg0), - parseSuccessData: _wire2api_buy_bitcoin_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kBuyBitcoinConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kBuyBitcoinConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "buy_bitcoin", - argNames: ["req"], - ); - - Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemOnchainFundsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_onchain_funds", - argNames: ["req"], - ); - - Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_redeem_onchain_funds_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_redeem_onchain_funds(port_, arg0), - parseSuccessData: _wire2api_prepare_redeem_onchain_funds_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRedeemOnchainFundsConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRedeemOnchainFundsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_redeem_onchain_funds", - argNames: ["req"], - ); - - Future> listRefundables({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_list_refundables(port_), - parseSuccessData: _wire2api_list_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kListRefundablesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kListRefundablesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "list_refundables", - argNames: [], - ); - - Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_refund(port_, arg0), - parseSuccessData: _wire2api_prepare_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_refund", - argNames: ["req"], - ); - - Future refund({required RefundRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_refund_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_refund(port_, arg0), - parseSuccessData: _wire2api_refund_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRefundConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRefundConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "refund", - argNames: ["req"], - ); - - Future rescanSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_rescan_swaps(port_), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRescanSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRescanSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "rescan_swaps", - argNames: [], - ); - - Future redeemSwap({required String swapAddress, dynamic hint}) { - var arg0 = _platform.api2wire_String(swapAddress); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_redeem_swap(port_, arg0), - parseSuccessData: _wire2api_unit, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRedeemSwapConstMeta, - argValues: [swapAddress], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRedeemSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "redeem_swap", - argNames: ["swapAddress"], - ); - - Future inProgressSwap({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_swap(port_), - parseSuccessData: _wire2api_opt_box_autoadd_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressSwapConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressSwapConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_swap", - argNames: [], - ); - - Future> inProgressReverseSwaps({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_reverse_swaps(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressReverseSwapsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressReverseSwapsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_reverse_swaps", - argNames: [], - ); - - Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_open_channel_fee_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_open_channel_fee(port_, arg0), - parseSuccessData: _wire2api_open_channel_fee_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOpenChannelFeeConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOpenChannelFeeConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "open_channel_fee", - argNames: ["req"], - ); - - Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_reverse_swap_fees_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_fetch_reverse_swap_fees(port_, arg0), - parseSuccessData: _wire2api_reverse_swap_pair_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kFetchReverseSwapFeesConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kFetchReverseSwapFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "fetch_reverse_swap_fees", - argNames: ["req"], - ); - - Future onchainPaymentLimits({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_onchain_payment_limits(port_), - parseSuccessData: _wire2api_onchain_payment_limits_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kOnchainPaymentLimitsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kOnchainPaymentLimitsConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "onchain_payment_limits", - argNames: [], - ); - - Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) { - var arg0 = _platform.api2wire_box_autoadd_prepare_onchain_payment_request(req); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_prepare_onchain_payment(port_, arg0), - parseSuccessData: _wire2api_prepare_onchain_payment_response, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kPrepareOnchainPaymentConstMeta, - argValues: [req], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kPrepareOnchainPaymentConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "prepare_onchain_payment", - argNames: ["req"], - ); - - Future> inProgressOnchainPayments({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_in_progress_onchain_payments(port_), - parseSuccessData: _wire2api_list_reverse_swap_info, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kInProgressOnchainPaymentsConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kInProgressOnchainPaymentsConstMeta => - const FlutterRustBridgeTaskConstMeta( - debugName: "in_progress_onchain_payments", - argNames: [], - ); - - Future recommendedFees({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_recommended_fees(port_), - parseSuccessData: _wire2api_recommended_fees, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kRecommendedFeesConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kRecommendedFeesConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "recommended_fees", - argNames: [], - ); - - Future executeCommand({required String command, dynamic hint}) { - var arg0 = _platform.api2wire_String(command); - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_execute_command(port_, arg0), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kExecuteCommandConstMeta, - argValues: [command], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kExecuteCommandConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "execute_command", - argNames: ["command"], - ); - - Future generateDiagnosticData({dynamic hint}) { - return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_generate_diagnostic_data(port_), - parseSuccessData: _wire2api_String, - parseErrorData: _wire2api_FrbAnyhowException, - constMeta: kGenerateDiagnosticDataConstMeta, - argValues: [], - hint: hint, - )); - } - - FlutterRustBridgeTaskConstMeta get kGenerateDiagnosticDataConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "generate_diagnostic_data", - argNames: [], - ); - - void dispose() { - _platform.dispose(); - } -// Section: wire2api - - FrbAnyhowException _wire2api_FrbAnyhowException(dynamic raw) { - return FrbAnyhowException(raw as String); - } - - String _wire2api_String(dynamic raw) { - return raw as String; - } - - List _wire2api_StringList(dynamic raw) { - return (raw as List).cast(); - } - - AesSuccessActionDataDecrypted _wire2api_aes_success_action_data_decrypted(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return AesSuccessActionDataDecrypted( - description: _wire2api_String(arr[0]), - plaintext: _wire2api_String(arr[1]), - ); - } - - AesSuccessActionDataResult _wire2api_aes_success_action_data_result(dynamic raw) { - switch (raw[0]) { - case 0: - return AesSuccessActionDataResult_Decrypted( - data: _wire2api_box_autoadd_aes_success_action_data_decrypted(raw[1]), - ); - case 1: - return AesSuccessActionDataResult_ErrorStatus( - reason: _wire2api_String(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BackupFailedData _wire2api_backup_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return BackupFailedData( - error: _wire2api_String(arr[0]), - ); - } - - BackupStatus _wire2api_backup_status(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BackupStatus( - backedUp: _wire2api_bool(arr[0]), - lastBackupTime: _wire2api_opt_box_autoadd_u64(arr[1]), - ); - } - - BitcoinAddressData _wire2api_bitcoin_address_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return BitcoinAddressData( - address: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - amountSat: _wire2api_opt_box_autoadd_u64(arr[2]), - label: _wire2api_opt_String(arr[3]), - message: _wire2api_opt_String(arr[4]), - ); - } - - bool _wire2api_bool(dynamic raw) { - return raw as bool; - } - - AesSuccessActionDataDecrypted _wire2api_box_autoadd_aes_success_action_data_decrypted(dynamic raw) { - return _wire2api_aes_success_action_data_decrypted(raw); - } - - AesSuccessActionDataResult _wire2api_box_autoadd_aes_success_action_data_result(dynamic raw) { - return _wire2api_aes_success_action_data_result(raw); - } - - BackupFailedData _wire2api_box_autoadd_backup_failed_data(dynamic raw) { - return _wire2api_backup_failed_data(raw); - } - - BitcoinAddressData _wire2api_box_autoadd_bitcoin_address_data(dynamic raw) { - return _wire2api_bitcoin_address_data(raw); - } - - bool _wire2api_box_autoadd_bool(dynamic raw) { - return raw as bool; - } - - ClosedChannelPaymentDetails _wire2api_box_autoadd_closed_channel_payment_details(dynamic raw) { - return _wire2api_closed_channel_payment_details(raw); - } - - GreenlightCredentials _wire2api_box_autoadd_greenlight_credentials(dynamic raw) { - return _wire2api_greenlight_credentials(raw); - } - - GreenlightNodeConfig _wire2api_box_autoadd_greenlight_node_config(dynamic raw) { - return _wire2api_greenlight_node_config(raw); - } - - InvoicePaidDetails _wire2api_box_autoadd_invoice_paid_details(dynamic raw) { - return _wire2api_invoice_paid_details(raw); - } - - LNInvoice _wire2api_box_autoadd_ln_invoice(dynamic raw) { - return _wire2api_ln_invoice(raw); - } - - LnPaymentDetails _wire2api_box_autoadd_ln_payment_details(dynamic raw) { - return _wire2api_ln_payment_details(raw); - } - - LnUrlAuthRequestData _wire2api_box_autoadd_ln_url_auth_request_data(dynamic raw) { - return _wire2api_ln_url_auth_request_data(raw); - } - - LnUrlErrorData _wire2api_box_autoadd_ln_url_error_data(dynamic raw) { - return _wire2api_ln_url_error_data(raw); - } - - LnUrlPayErrorData _wire2api_box_autoadd_ln_url_pay_error_data(dynamic raw) { - return _wire2api_ln_url_pay_error_data(raw); - } - - LnUrlPayRequestData _wire2api_box_autoadd_ln_url_pay_request_data(dynamic raw) { - return _wire2api_ln_url_pay_request_data(raw); - } - - LnUrlPaySuccessData _wire2api_box_autoadd_ln_url_pay_success_data(dynamic raw) { - return _wire2api_ln_url_pay_success_data(raw); - } - - LnUrlWithdrawRequestData _wire2api_box_autoadd_ln_url_withdraw_request_data(dynamic raw) { - return _wire2api_ln_url_withdraw_request_data(raw); - } - - LnUrlWithdrawSuccessData _wire2api_box_autoadd_ln_url_withdraw_success_data(dynamic raw) { - return _wire2api_ln_url_withdraw_success_data(raw); - } - - LspInformation _wire2api_box_autoadd_lsp_information(dynamic raw) { - return _wire2api_lsp_information(raw); - } - - MessageSuccessActionData _wire2api_box_autoadd_message_success_action_data(dynamic raw) { - return _wire2api_message_success_action_data(raw); - } - - NodeCredentials _wire2api_box_autoadd_node_credentials(dynamic raw) { - return _wire2api_node_credentials(raw); - } - - OpeningFeeParams _wire2api_box_autoadd_opening_fee_params(dynamic raw) { - return _wire2api_opening_fee_params(raw); - } - - Payment _wire2api_box_autoadd_payment(dynamic raw) { - return _wire2api_payment(raw); - } - - PaymentFailedData _wire2api_box_autoadd_payment_failed_data(dynamic raw) { - return _wire2api_payment_failed_data(raw); - } - - ReverseSwapInfo _wire2api_box_autoadd_reverse_swap_info(dynamic raw) { - return _wire2api_reverse_swap_info(raw); - } - - SuccessActionProcessed _wire2api_box_autoadd_success_action_processed(dynamic raw) { - return _wire2api_success_action_processed(raw); - } - - SwapInfo _wire2api_box_autoadd_swap_info(dynamic raw) { - return _wire2api_swap_info(raw); - } - - Symbol _wire2api_box_autoadd_symbol(dynamic raw) { - return _wire2api_symbol(raw); - } - - int _wire2api_box_autoadd_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_box_autoadd_u64(dynamic raw) { - return _wire2api_u64(raw); - } - - UrlSuccessActionData _wire2api_box_autoadd_url_success_action_data(dynamic raw) { - return _wire2api_url_success_action_data(raw); - } - - BreezEvent _wire2api_breez_event(dynamic raw) { - switch (raw[0]) { - case 0: - return BreezEvent_NewBlock( - block: _wire2api_u32(raw[1]), - ); - case 1: - return BreezEvent_InvoicePaid( - details: _wire2api_box_autoadd_invoice_paid_details(raw[1]), - ); - case 2: - return BreezEvent_Synced(); - case 3: - return BreezEvent_PaymentSucceed( - details: _wire2api_box_autoadd_payment(raw[1]), - ); - case 4: - return BreezEvent_PaymentFailed( - details: _wire2api_box_autoadd_payment_failed_data(raw[1]), - ); - case 5: - return BreezEvent_BackupStarted(); - case 6: - return BreezEvent_BackupSucceeded(); - case 7: - return BreezEvent_BackupFailed( - details: _wire2api_box_autoadd_backup_failed_data(raw[1]), - ); - case 8: - return BreezEvent_SwapUpdated( - details: _wire2api_box_autoadd_swap_info(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - BuyBitcoinResponse _wire2api_buy_bitcoin_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return BuyBitcoinResponse( - url: _wire2api_String(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - ); - } - - ChannelState _wire2api_channel_state(dynamic raw) { - return ChannelState.values[raw as int]; - } - - CheckMessageResponse _wire2api_check_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return CheckMessageResponse( - isValid: _wire2api_bool(arr[0]), - ); - } - - ClosedChannelPaymentDetails _wire2api_closed_channel_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return ClosedChannelPaymentDetails( - state: _wire2api_channel_state(arr[0]), - fundingTxid: _wire2api_String(arr[1]), - shortChannelId: _wire2api_opt_String(arr[2]), - closingTxid: _wire2api_opt_String(arr[3]), - ); - } - - Config _wire2api_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return Config( - breezserver: _wire2api_String(arr[0]), - chainnotifierUrl: _wire2api_String(arr[1]), - mempoolspaceUrl: _wire2api_opt_String(arr[2]), - workingDir: _wire2api_String(arr[3]), - network: _wire2api_network(arr[4]), - paymentTimeoutSec: _wire2api_u32(arr[5]), - defaultLspId: _wire2api_opt_String(arr[6]), - apiKey: _wire2api_opt_String(arr[7]), - maxfeePercent: _wire2api_f64(arr[8]), - exemptfeeMsat: _wire2api_u64(arr[9]), - nodeConfig: _wire2api_node_config(arr[10]), - ); - } - - CurrencyInfo _wire2api_currency_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return CurrencyInfo( - name: _wire2api_String(arr[0]), - fractionSize: _wire2api_u32(arr[1]), - spacing: _wire2api_opt_box_autoadd_u32(arr[2]), - symbol: _wire2api_opt_box_autoadd_symbol(arr[3]), - uniqSymbol: _wire2api_opt_box_autoadd_symbol(arr[4]), - localizedName: _wire2api_opt_list_localized_name(arr[5]), - localeOverrides: _wire2api_opt_list_locale_overrides(arr[6]), - ); - } - - double _wire2api_f64(dynamic raw) { - return raw as double; - } - - FiatCurrency _wire2api_fiat_currency(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return FiatCurrency( - id: _wire2api_String(arr[0]), - info: _wire2api_currency_info(arr[1]), - ); - } - - GreenlightCredentials _wire2api_greenlight_credentials(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightCredentials( - deviceKey: _wire2api_uint_8_list(arr[0]), - deviceCert: _wire2api_uint_8_list(arr[1]), - ); - } - - GreenlightNodeConfig _wire2api_greenlight_node_config(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return GreenlightNodeConfig( - partnerCredentials: _wire2api_opt_box_autoadd_greenlight_credentials(arr[0]), - inviteCode: _wire2api_opt_String(arr[1]), - ); - } - - HealthCheckStatus _wire2api_health_check_status(dynamic raw) { - return HealthCheckStatus.values[raw as int]; - } - - int _wire2api_i32(dynamic raw) { - return raw as int; - } - - int _wire2api_i64(dynamic raw) { - return castInt(raw); - } - - InputType _wire2api_input_type(dynamic raw) { - switch (raw[0]) { - case 0: - return InputType_BitcoinAddress( - address: _wire2api_box_autoadd_bitcoin_address_data(raw[1]), - ); - case 1: - return InputType_Bolt11( - invoice: _wire2api_box_autoadd_ln_invoice(raw[1]), - ); - case 2: - return InputType_NodeId( - nodeId: _wire2api_String(raw[1]), - ); - case 3: - return InputType_Url( - url: _wire2api_String(raw[1]), - ); - case 4: - return InputType_LnUrlPay( - data: _wire2api_box_autoadd_ln_url_pay_request_data(raw[1]), - ); - case 5: - return InputType_LnUrlWithdraw( - data: _wire2api_box_autoadd_ln_url_withdraw_request_data(raw[1]), - ); - case 6: - return InputType_LnUrlAuth( - data: _wire2api_box_autoadd_ln_url_auth_request_data(raw[1]), - ); - case 7: - return InputType_LnUrlError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - InvoicePaidDetails _wire2api_invoice_paid_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return InvoicePaidDetails( - paymentHash: _wire2api_String(arr[0]), - bolt11: _wire2api_String(arr[1]), - payment: _wire2api_opt_box_autoadd_payment(arr[2]), - ); - } - - List _wire2api_list_fiat_currency(dynamic raw) { - return (raw as List).map(_wire2api_fiat_currency).toList(); - } - - List _wire2api_list_locale_overrides(dynamic raw) { - return (raw as List).map(_wire2api_locale_overrides).toList(); - } - - List _wire2api_list_localized_name(dynamic raw) { - return (raw as List).map(_wire2api_localized_name).toList(); - } - - List _wire2api_list_lsp_information(dynamic raw) { - return (raw as List).map(_wire2api_lsp_information).toList(); - } - - List _wire2api_list_opening_fee_params(dynamic raw) { - return (raw as List).map(_wire2api_opening_fee_params).toList(); - } - - List _wire2api_list_payment(dynamic raw) { - return (raw as List).map(_wire2api_payment).toList(); - } - - List _wire2api_list_rate(dynamic raw) { - return (raw as List).map(_wire2api_rate).toList(); - } - - List _wire2api_list_reverse_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_reverse_swap_info).toList(); - } - - List _wire2api_list_route_hint(dynamic raw) { - return (raw as List).map(_wire2api_route_hint).toList(); - } - - List _wire2api_list_route_hint_hop(dynamic raw) { - return (raw as List).map(_wire2api_route_hint_hop).toList(); - } - - List _wire2api_list_swap_info(dynamic raw) { - return (raw as List).map(_wire2api_swap_info).toList(); - } - - List _wire2api_list_unspent_transaction_output(dynamic raw) { - return (raw as List).map(_wire2api_unspent_transaction_output).toList(); - } - - LNInvoice _wire2api_ln_invoice(dynamic raw) { - final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); - return LNInvoice( - bolt11: _wire2api_String(arr[0]), - network: _wire2api_network(arr[1]), - payeePubkey: _wire2api_String(arr[2]), - paymentHash: _wire2api_String(arr[3]), - description: _wire2api_opt_String(arr[4]), - descriptionHash: _wire2api_opt_String(arr[5]), - amountMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - timestamp: _wire2api_u64(arr[7]), - expiry: _wire2api_u64(arr[8]), - routingHints: _wire2api_list_route_hint(arr[9]), - paymentSecret: _wire2api_uint_8_list(arr[10]), - minFinalCltvExpiryDelta: _wire2api_u64(arr[11]), - ); - } - - LnPaymentDetails _wire2api_ln_payment_details(dynamic raw) { - final arr = raw as List; - if (arr.length != 16) throw Exception('unexpected arr length: expect 16 but see ${arr.length}'); - return LnPaymentDetails( - paymentHash: _wire2api_String(arr[0]), - label: _wire2api_String(arr[1]), - destinationPubkey: _wire2api_String(arr[2]), - paymentPreimage: _wire2api_String(arr[3]), - keysend: _wire2api_bool(arr[4]), - bolt11: _wire2api_String(arr[5]), - openChannelBolt11: _wire2api_opt_String(arr[6]), - lnurlSuccessAction: _wire2api_opt_box_autoadd_success_action_processed(arr[7]), - lnurlPayDomain: _wire2api_opt_String(arr[8]), - lnurlPayComment: _wire2api_opt_String(arr[9]), - lnAddress: _wire2api_opt_String(arr[10]), - lnurlMetadata: _wire2api_opt_String(arr[11]), - lnurlWithdrawEndpoint: _wire2api_opt_String(arr[12]), - swapInfo: _wire2api_opt_box_autoadd_swap_info(arr[13]), - reverseSwapInfo: _wire2api_opt_box_autoadd_reverse_swap_info(arr[14]), - pendingExpirationBlock: _wire2api_opt_box_autoadd_u32(arr[15]), - ); - } - - LnUrlAuthRequestData _wire2api_ln_url_auth_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return LnUrlAuthRequestData( - k1: _wire2api_String(arr[0]), - action: _wire2api_opt_String(arr[1]), - domain: _wire2api_String(arr[2]), - url: _wire2api_String(arr[3]), - ); - } - - LnUrlCallbackStatus _wire2api_ln_url_callback_status(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlCallbackStatus_Ok(); - case 1: - return LnUrlCallbackStatus_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlErrorData _wire2api_ln_url_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlErrorData( - reason: _wire2api_String(arr[0]), - ); - } - - LnUrlPayErrorData _wire2api_ln_url_pay_error_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPayErrorData( - paymentHash: _wire2api_String(arr[0]), - reason: _wire2api_String(arr[1]), - ); - } - - LnUrlPayRequestData _wire2api_ln_url_pay_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 9) throw Exception('unexpected arr length: expect 9 but see ${arr.length}'); - return LnUrlPayRequestData( - callback: _wire2api_String(arr[0]), - minSendable: _wire2api_u64(arr[1]), - maxSendable: _wire2api_u64(arr[2]), - metadataStr: _wire2api_String(arr[3]), - commentAllowed: _wire2api_u16(arr[4]), - domain: _wire2api_String(arr[5]), - allowsNostr: _wire2api_bool(arr[6]), - nostrPubkey: _wire2api_opt_String(arr[7]), - lnAddress: _wire2api_opt_String(arr[8]), - ); - } - - LnUrlPayResult _wire2api_ln_url_pay_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlPayResult_EndpointSuccess( - data: _wire2api_box_autoadd_ln_url_pay_success_data(raw[1]), - ); - case 1: - return LnUrlPayResult_EndpointError( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - case 2: - return LnUrlPayResult_PayError( - data: _wire2api_box_autoadd_ln_url_pay_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlPaySuccessData _wire2api_ln_url_pay_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LnUrlPaySuccessData( - payment: _wire2api_payment(arr[0]), - successAction: _wire2api_opt_box_autoadd_success_action_processed(arr[1]), - ); - } - - LnUrlWithdrawRequestData _wire2api_ln_url_withdraw_request_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return LnUrlWithdrawRequestData( - callback: _wire2api_String(arr[0]), - k1: _wire2api_String(arr[1]), - defaultDescription: _wire2api_String(arr[2]), - minWithdrawable: _wire2api_u64(arr[3]), - maxWithdrawable: _wire2api_u64(arr[4]), - ); - } - - LnUrlWithdrawResult _wire2api_ln_url_withdraw_result(dynamic raw) { - switch (raw[0]) { - case 0: - return LnUrlWithdrawResult_Ok( - data: _wire2api_box_autoadd_ln_url_withdraw_success_data(raw[1]), - ); - case 1: - return LnUrlWithdrawResult_ErrorStatus( - data: _wire2api_box_autoadd_ln_url_error_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - LnUrlWithdrawSuccessData _wire2api_ln_url_withdraw_success_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return LnUrlWithdrawSuccessData( - invoice: _wire2api_ln_invoice(arr[0]), - ); - } - - LocaleOverrides _wire2api_locale_overrides(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return LocaleOverrides( - locale: _wire2api_String(arr[0]), - spacing: _wire2api_opt_box_autoadd_u32(arr[1]), - symbol: _wire2api_symbol(arr[2]), - ); - } - - LocalizedName _wire2api_localized_name(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LocalizedName( - locale: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - ); - } - - LogEntry _wire2api_log_entry(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return LogEntry( - line: _wire2api_String(arr[0]), - level: _wire2api_String(arr[1]), - ); - } - - LspInformation _wire2api_lsp_information(dynamic raw) { - final arr = raw as List; - if (arr.length != 11) throw Exception('unexpected arr length: expect 11 but see ${arr.length}'); - return LspInformation( - id: _wire2api_String(arr[0]), - name: _wire2api_String(arr[1]), - widgetUrl: _wire2api_String(arr[2]), - pubkey: _wire2api_String(arr[3]), - host: _wire2api_String(arr[4]), - baseFeeMsat: _wire2api_i64(arr[5]), - feeRate: _wire2api_f64(arr[6]), - timeLockDelta: _wire2api_u32(arr[7]), - minHtlcMsat: _wire2api_i64(arr[8]), - lspPubkey: _wire2api_uint_8_list(arr[9]), - openingFeeParamsList: _wire2api_opening_fee_params_menu(arr[10]), - ); - } - - MaxReverseSwapAmountResponse _wire2api_max_reverse_swap_amount_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MaxReverseSwapAmountResponse( - totalSat: _wire2api_u64(arr[0]), - ); - } - - MessageSuccessActionData _wire2api_message_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return MessageSuccessActionData( - message: _wire2api_String(arr[0]), - ); - } - - Network _wire2api_network(dynamic raw) { - return Network.values[raw as int]; - } - - NodeConfig _wire2api_node_config(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeConfig_Greenlight( - config: _wire2api_box_autoadd_greenlight_node_config(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeCredentials _wire2api_node_credentials(dynamic raw) { - switch (raw[0]) { - case 0: - return NodeCredentials_Greenlight( - credentials: _wire2api_box_autoadd_greenlight_credentials(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - NodeState _wire2api_node_state(dynamic raw) { - final arr = raw as List; - if (arr.length != 12) throw Exception('unexpected arr length: expect 12 but see ${arr.length}'); - return NodeState( - id: _wire2api_String(arr[0]), - blockHeight: _wire2api_u32(arr[1]), - channelsBalanceMsat: _wire2api_u64(arr[2]), - onchainBalanceMsat: _wire2api_u64(arr[3]), - pendingOnchainBalanceMsat: _wire2api_u64(arr[4]), - utxos: _wire2api_list_unspent_transaction_output(arr[5]), - maxPayableMsat: _wire2api_u64(arr[6]), - maxReceivableMsat: _wire2api_u64(arr[7]), - maxSinglePaymentAmountMsat: _wire2api_u64(arr[8]), - maxChanReserveMsats: _wire2api_u64(arr[9]), - connectedPeers: _wire2api_StringList(arr[10]), - inboundLiquidityMsats: _wire2api_u64(arr[11]), - ); - } - - OnchainPaymentLimitsResponse _wire2api_onchain_payment_limits_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OnchainPaymentLimitsResponse( - minSat: _wire2api_u64(arr[0]), - maxSat: _wire2api_u64(arr[1]), - ); - } - - OpenChannelFeeResponse _wire2api_open_channel_fee_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return OpenChannelFeeResponse( - feeMsat: _wire2api_opt_box_autoadd_u64(arr[0]), - feeParams: _wire2api_opening_fee_params(arr[1]), - ); - } - - OpeningFeeParams _wire2api_opening_fee_params(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return OpeningFeeParams( - minMsat: _wire2api_u64(arr[0]), - proportional: _wire2api_u32(arr[1]), - validUntil: _wire2api_String(arr[2]), - maxIdleTime: _wire2api_u32(arr[3]), - maxClientToSelfDelay: _wire2api_u32(arr[4]), - promise: _wire2api_String(arr[5]), - ); - } - - OpeningFeeParamsMenu _wire2api_opening_fee_params_menu(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return OpeningFeeParamsMenu( - values: _wire2api_list_opening_fee_params(arr[0]), - ); - } - - String? _wire2api_opt_String(dynamic raw) { - return raw == null ? null : _wire2api_String(raw); - } - - List? _wire2api_opt_StringList(dynamic raw) { - return raw == null ? null : _wire2api_StringList(raw); - } - - bool? _wire2api_opt_box_autoadd_bool(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_bool(raw); - } - - GreenlightCredentials? _wire2api_opt_box_autoadd_greenlight_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_greenlight_credentials(raw); - } - - LNInvoice? _wire2api_opt_box_autoadd_ln_invoice(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_ln_invoice(raw); - } - - LspInformation? _wire2api_opt_box_autoadd_lsp_information(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_lsp_information(raw); - } - - NodeCredentials? _wire2api_opt_box_autoadd_node_credentials(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_node_credentials(raw); - } - - OpeningFeeParams? _wire2api_opt_box_autoadd_opening_fee_params(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_opening_fee_params(raw); - } - - Payment? _wire2api_opt_box_autoadd_payment(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_payment(raw); - } - - ReverseSwapInfo? _wire2api_opt_box_autoadd_reverse_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_reverse_swap_info(raw); - } - - SuccessActionProcessed? _wire2api_opt_box_autoadd_success_action_processed(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_success_action_processed(raw); - } - - SwapInfo? _wire2api_opt_box_autoadd_swap_info(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_swap_info(raw); - } - - Symbol? _wire2api_opt_box_autoadd_symbol(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_symbol(raw); - } - - int? _wire2api_opt_box_autoadd_u32(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u32(raw); - } - - int? _wire2api_opt_box_autoadd_u64(dynamic raw) { - return raw == null ? null : _wire2api_box_autoadd_u64(raw); - } - - List? _wire2api_opt_list_locale_overrides(dynamic raw) { - return raw == null ? null : _wire2api_list_locale_overrides(raw); - } - - List? _wire2api_opt_list_localized_name(dynamic raw) { - return raw == null ? null : _wire2api_list_localized_name(raw); - } - - PayOnchainResponse _wire2api_pay_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return PayOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - Payment _wire2api_payment(dynamic raw) { - final arr = raw as List; - if (arr.length != 10) throw Exception('unexpected arr length: expect 10 but see ${arr.length}'); - return Payment( - id: _wire2api_String(arr[0]), - paymentType: _wire2api_payment_type(arr[1]), - paymentTime: _wire2api_i64(arr[2]), - amountMsat: _wire2api_u64(arr[3]), - feeMsat: _wire2api_u64(arr[4]), - status: _wire2api_payment_status(arr[5]), - error: _wire2api_opt_String(arr[6]), - description: _wire2api_opt_String(arr[7]), - details: _wire2api_payment_details(arr[8]), - metadata: _wire2api_opt_String(arr[9]), - ); - } - - PaymentDetails _wire2api_payment_details(dynamic raw) { - switch (raw[0]) { - case 0: - return PaymentDetails_Ln( - data: _wire2api_box_autoadd_ln_payment_details(raw[1]), - ); - case 1: - return PaymentDetails_ClosedChannel( - data: _wire2api_box_autoadd_closed_channel_payment_details(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - PaymentFailedData _wire2api_payment_failed_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return PaymentFailedData( - error: _wire2api_String(arr[0]), - nodeId: _wire2api_String(arr[1]), - invoice: _wire2api_opt_box_autoadd_ln_invoice(arr[2]), - label: _wire2api_opt_String(arr[3]), - ); - } - - PaymentStatus _wire2api_payment_status(dynamic raw) { - return PaymentStatus.values[raw as int]; - } - - PaymentType _wire2api_payment_type(dynamic raw) { - return PaymentType.values[raw as int]; - } - - PrepareOnchainPaymentResponse _wire2api_prepare_onchain_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return PrepareOnchainPaymentResponse( - feesHash: _wire2api_String(arr[0]), - feesPercentage: _wire2api_f64(arr[1]), - feesLockup: _wire2api_u64(arr[2]), - feesClaim: _wire2api_u64(arr[3]), - senderAmountSat: _wire2api_u64(arr[4]), - recipientAmountSat: _wire2api_u64(arr[5]), - totalFees: _wire2api_u64(arr[6]), - ); - } - - PrepareRedeemOnchainFundsResponse _wire2api_prepare_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRedeemOnchainFundsResponse( - txWeight: _wire2api_u64(arr[0]), - txFeeSat: _wire2api_u64(arr[1]), - ); - } - - PrepareRefundResponse _wire2api_prepare_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return PrepareRefundResponse( - refundTxWeight: _wire2api_u32(arr[0]), - refundTxFeeSat: _wire2api_u64(arr[1]), - ); - } - - Rate _wire2api_rate(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return Rate( - coin: _wire2api_String(arr[0]), - value: _wire2api_f64(arr[1]), - ); - } - - ReceivePaymentResponse _wire2api_receive_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 3) throw Exception('unexpected arr length: expect 3 but see ${arr.length}'); - return ReceivePaymentResponse( - lnInvoice: _wire2api_ln_invoice(arr[0]), - openingFeeParams: _wire2api_opt_box_autoadd_opening_fee_params(arr[1]), - openingFeeMsat: _wire2api_opt_box_autoadd_u64(arr[2]), - ); - } - - RecommendedFees _wire2api_recommended_fees(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return RecommendedFees( - fastestFee: _wire2api_u64(arr[0]), - halfHourFee: _wire2api_u64(arr[1]), - hourFee: _wire2api_u64(arr[2]), - economyFee: _wire2api_u64(arr[3]), - minimumFee: _wire2api_u64(arr[4]), - ); - } - - RedeemOnchainFundsResponse _wire2api_redeem_onchain_funds_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RedeemOnchainFundsResponse( - txid: _wire2api_uint_8_list(arr[0]), - ); - } - - RefundResponse _wire2api_refund_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RefundResponse( - refundTxId: _wire2api_String(arr[0]), - ); - } - - ReverseSwapInfo _wire2api_reverse_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 6) throw Exception('unexpected arr length: expect 6 but see ${arr.length}'); - return ReverseSwapInfo( - id: _wire2api_String(arr[0]), - claimPubkey: _wire2api_String(arr[1]), - lockupTxid: _wire2api_opt_String(arr[2]), - claimTxid: _wire2api_opt_String(arr[3]), - onchainAmountSat: _wire2api_u64(arr[4]), - status: _wire2api_reverse_swap_status(arr[5]), - ); - } - - ReverseSwapPairInfo _wire2api_reverse_swap_pair_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return ReverseSwapPairInfo( - min: _wire2api_u64(arr[0]), - max: _wire2api_u64(arr[1]), - feesHash: _wire2api_String(arr[2]), - feesPercentage: _wire2api_f64(arr[3]), - feesLockup: _wire2api_u64(arr[4]), - feesClaim: _wire2api_u64(arr[5]), - totalFees: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - ReverseSwapStatus _wire2api_reverse_swap_status(dynamic raw) { - return ReverseSwapStatus.values[raw as int]; - } - - RouteHint _wire2api_route_hint(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return RouteHint( - hops: _wire2api_list_route_hint_hop(arr[0]), - ); - } - - RouteHintHop _wire2api_route_hint_hop(dynamic raw) { - final arr = raw as List; - if (arr.length != 7) throw Exception('unexpected arr length: expect 7 but see ${arr.length}'); - return RouteHintHop( - srcNodeId: _wire2api_String(arr[0]), - shortChannelId: _wire2api_u64(arr[1]), - feesBaseMsat: _wire2api_u32(arr[2]), - feesProportionalMillionths: _wire2api_u32(arr[3]), - cltvExpiryDelta: _wire2api_u64(arr[4]), - htlcMinimumMsat: _wire2api_opt_box_autoadd_u64(arr[5]), - htlcMaximumMsat: _wire2api_opt_box_autoadd_u64(arr[6]), - ); - } - - SendOnchainResponse _wire2api_send_onchain_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendOnchainResponse( - reverseSwapInfo: _wire2api_reverse_swap_info(arr[0]), - ); - } - - SendPaymentResponse _wire2api_send_payment_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SendPaymentResponse( - payment: _wire2api_payment(arr[0]), - ); - } - - ServiceHealthCheckResponse _wire2api_service_health_check_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return ServiceHealthCheckResponse( - status: _wire2api_health_check_status(arr[0]), - ); - } - - SignMessageResponse _wire2api_sign_message_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return SignMessageResponse( - signature: _wire2api_String(arr[0]), - ); - } - - StaticBackupResponse _wire2api_static_backup_response(dynamic raw) { - final arr = raw as List; - if (arr.length != 1) throw Exception('unexpected arr length: expect 1 but see ${arr.length}'); - return StaticBackupResponse( - backup: _wire2api_opt_StringList(arr[0]), - ); - } - - SuccessActionProcessed _wire2api_success_action_processed(dynamic raw) { - switch (raw[0]) { - case 0: - return SuccessActionProcessed_Aes( - result: _wire2api_box_autoadd_aes_success_action_data_result(raw[1]), - ); - case 1: - return SuccessActionProcessed_Message( - data: _wire2api_box_autoadd_message_success_action_data(raw[1]), - ); - case 2: - return SuccessActionProcessed_Url( - data: _wire2api_box_autoadd_url_success_action_data(raw[1]), - ); - default: - throw Exception("unreachable"); - } - } - - SwapInfo _wire2api_swap_info(dynamic raw) { - final arr = raw as List; - if (arr.length != 24) throw Exception('unexpected arr length: expect 24 but see ${arr.length}'); - return SwapInfo( - bitcoinAddress: _wire2api_String(arr[0]), - createdAt: _wire2api_i64(arr[1]), - lockHeight: _wire2api_i64(arr[2]), - paymentHash: _wire2api_uint_8_list(arr[3]), - preimage: _wire2api_uint_8_list(arr[4]), - privateKey: _wire2api_uint_8_list(arr[5]), - publicKey: _wire2api_uint_8_list(arr[6]), - swapperPublicKey: _wire2api_uint_8_list(arr[7]), - script: _wire2api_uint_8_list(arr[8]), - bolt11: _wire2api_opt_String(arr[9]), - paidMsat: _wire2api_u64(arr[10]), - totalIncomingTxs: _wire2api_u64(arr[11]), - confirmedSats: _wire2api_u64(arr[12]), - unconfirmedSats: _wire2api_u64(arr[13]), - status: _wire2api_swap_status(arr[14]), - refundTxIds: _wire2api_StringList(arr[15]), - unconfirmedTxIds: _wire2api_StringList(arr[16]), - confirmedTxIds: _wire2api_StringList(arr[17]), - minAllowedDeposit: _wire2api_i64(arr[18]), - maxAllowedDeposit: _wire2api_i64(arr[19]), - maxSwapperPayable: _wire2api_i64(arr[20]), - lastRedeemError: _wire2api_opt_String(arr[21]), - channelOpeningFees: _wire2api_opt_box_autoadd_opening_fee_params(arr[22]), - confirmedAt: _wire2api_opt_box_autoadd_u32(arr[23]), - ); - } - - SwapStatus _wire2api_swap_status(dynamic raw) { - return SwapStatus.values[raw as int]; - } - - Symbol _wire2api_symbol(dynamic raw) { - final arr = raw as List; - if (arr.length != 4) throw Exception('unexpected arr length: expect 4 but see ${arr.length}'); - return Symbol( - grapheme: _wire2api_opt_String(arr[0]), - template: _wire2api_opt_String(arr[1]), - rtl: _wire2api_opt_box_autoadd_bool(arr[2]), - position: _wire2api_opt_box_autoadd_u32(arr[3]), - ); - } - - int _wire2api_u16(dynamic raw) { - return raw as int; - } - - int _wire2api_u32(dynamic raw) { - return raw as int; - } - - int _wire2api_u64(dynamic raw) { - return castInt(raw); - } - - int _wire2api_u8(dynamic raw) { - return raw as int; - } - - Uint8List _wire2api_uint_8_list(dynamic raw) { - return raw as Uint8List; - } - - void _wire2api_unit(dynamic raw) { - return; - } - - UnspentTransactionOutput _wire2api_unspent_transaction_output(dynamic raw) { - final arr = raw as List; - if (arr.length != 5) throw Exception('unexpected arr length: expect 5 but see ${arr.length}'); - return UnspentTransactionOutput( - txid: _wire2api_uint_8_list(arr[0]), - outnum: _wire2api_u32(arr[1]), - amountMillisatoshi: _wire2api_u64(arr[2]), - address: _wire2api_String(arr[3]), - reserved: _wire2api_bool(arr[4]), - ); - } - - UrlSuccessActionData _wire2api_url_success_action_data(dynamic raw) { - final arr = raw as List; - if (arr.length != 2) throw Exception('unexpected arr length: expect 2 but see ${arr.length}'); - return UrlSuccessActionData( - description: _wire2api_String(arr[0]), - url: _wire2api_String(arr[1]), - ); - } -} - -// Section: api2wire - -@protected -bool api2wire_bool(bool raw) { - return raw; -} - -@protected -int api2wire_buy_bitcoin_provider(BuyBitcoinProvider raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_environment_type(EnvironmentType raw) { - return api2wire_i32(raw.index); -} - -@protected -double api2wire_f64(double raw) { - return raw; -} - -@protected -int api2wire_i32(int raw) { - return raw; -} - -@protected -int api2wire_network(Network raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_payment_type_filter(PaymentTypeFilter raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_swap_amount_type(SwapAmountType raw) { - return api2wire_i32(raw.index); -} - -@protected -int api2wire_u16(int raw) { - return raw; -} - -@protected -int api2wire_u32(int raw) { - return raw; -} - -@protected -int api2wire_u8(int raw) { - return raw; -} - -// Section: finalizer - -class BreezSdkCorePlatform extends FlutterRustBridgeBase { - BreezSdkCorePlatform(ffi.DynamicLibrary dylib) : super(BreezSdkCoreWire(dylib)); - -// Section: api2wire - - @protected - ffi.Pointer api2wire_String(String raw) { - return api2wire_uint_8_list(utf8.encoder.convert(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_bool(bool raw) { - return inner.new_box_autoadd_bool_0(api2wire_bool(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_buy_bitcoin_request(BuyBitcoinRequest raw) { - final ptr = inner.new_box_autoadd_buy_bitcoin_request_0(); - _api_fill_to_wire_buy_bitcoin_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_check_message_request(CheckMessageRequest raw) { - final ptr = inner.new_box_autoadd_check_message_request_0(); - _api_fill_to_wire_check_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_configure_node_request( - ConfigureNodeRequest raw) { - final ptr = inner.new_box_autoadd_configure_node_request_0(); - _api_fill_to_wire_configure_node_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_connect_request(ConnectRequest raw) { - final ptr = inner.new_box_autoadd_connect_request_0(); - _api_fill_to_wire_connect_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_credentials( - GreenlightCredentials raw) { - final ptr = inner.new_box_autoadd_greenlight_credentials_0(); - _api_fill_to_wire_greenlight_credentials(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig raw) { - final ptr = inner.new_box_autoadd_greenlight_node_config_0(); - _api_fill_to_wire_greenlight_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_i64(int raw) { - return inner.new_box_autoadd_i64_0(api2wire_i64(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_list_payments_request(ListPaymentsRequest raw) { - final ptr = inner.new_box_autoadd_list_payments_request_0(); - _api_fill_to_wire_list_payments_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData raw) { - final ptr = inner.new_box_autoadd_ln_url_auth_request_data_0(); - _api_fill_to_wire_ln_url_auth_request_data(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_pay_request(LnUrlPayRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_pay_request_0(); - _api_fill_to_wire_ln_url_pay_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest raw) { - final ptr = inner.new_box_autoadd_ln_url_withdraw_request_0(); - _api_fill_to_wire_ln_url_withdraw_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_node_config(NodeConfig raw) { - final ptr = inner.new_box_autoadd_node_config_0(); - _api_fill_to_wire_node_config(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest raw) { - final ptr = inner.new_box_autoadd_open_channel_fee_request_0(); - _api_fill_to_wire_open_channel_fee_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_opening_fee_params(OpeningFeeParams raw) { - final ptr = inner.new_box_autoadd_opening_fee_params_0(); - _api_fill_to_wire_opening_fee_params(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_pay_onchain_request(PayOnchainRequest raw) { - final ptr = inner.new_box_autoadd_pay_onchain_request_0(); - _api_fill_to_wire_pay_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest raw) { - final ptr = inner.new_box_autoadd_prepare_onchain_payment_request_0(); - _api_fill_to_wire_prepare_onchain_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer - api2wire_box_autoadd_prepare_redeem_onchain_funds_request(PrepareRedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - _api_fill_to_wire_prepare_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest raw) { - final ptr = inner.new_box_autoadd_prepare_refund_request_0(); - _api_fill_to_wire_prepare_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest raw) { - final ptr = inner.new_box_autoadd_receive_onchain_request_0(); - _api_fill_to_wire_receive_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest raw) { - final ptr = inner.new_box_autoadd_receive_payment_request_0(); - _api_fill_to_wire_receive_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest raw) { - final ptr = inner.new_box_autoadd_redeem_onchain_funds_request_0(); - _api_fill_to_wire_redeem_onchain_funds_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_refund_request(RefundRequest raw) { - final ptr = inner.new_box_autoadd_refund_request_0(); - _api_fill_to_wire_refund_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_issue_request(ReportIssueRequest raw) { - final ptr = inner.new_box_autoadd_report_issue_request_0(); - _api_fill_to_wire_report_issue_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails raw) { - final ptr = inner.new_box_autoadd_report_payment_failure_details_0(); - _api_fill_to_wire_report_payment_failure_details(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest raw) { - final ptr = inner.new_box_autoadd_reverse_swap_fees_request_0(); - _api_fill_to_wire_reverse_swap_fees_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_onchain_request(SendOnchainRequest raw) { - final ptr = inner.new_box_autoadd_send_onchain_request_0(); - _api_fill_to_wire_send_onchain_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_payment_request(SendPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_payment_request_0(); - _api_fill_to_wire_send_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest raw) { - final ptr = inner.new_box_autoadd_send_spontaneous_payment_request_0(); - _api_fill_to_wire_send_spontaneous_payment_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_sign_message_request(SignMessageRequest raw) { - final ptr = inner.new_box_autoadd_sign_message_request_0(); - _api_fill_to_wire_sign_message_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_static_backup_request(StaticBackupRequest raw) { - final ptr = inner.new_box_autoadd_static_backup_request_0(); - _api_fill_to_wire_static_backup_request(raw, ptr.ref); - return ptr; - } - - @protected - ffi.Pointer api2wire_box_autoadd_u32(int raw) { - return inner.new_box_autoadd_u32_0(api2wire_u32(raw)); - } - - @protected - ffi.Pointer api2wire_box_autoadd_u64(int raw) { - return inner.new_box_autoadd_u64_0(api2wire_u64(raw)); - } - - @protected - int api2wire_i64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_list_metadata_filter(List raw) { - final ans = inner.new_list_metadata_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_metadata_filter(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_payment_type_filter(List raw) { - final ans = inner.new_list_payment_type_filter_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - ans.ref.ptr[i] = api2wire_payment_type_filter(raw[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_list_tlv_entry(List raw) { - final ans = inner.new_list_tlv_entry_0(raw.length); - for (var i = 0; i < raw.length; ++i) { - _api_fill_to_wire_tlv_entry(raw[i], ans.ref.ptr[i]); - } - return ans; - } - - @protected - ffi.Pointer api2wire_opt_String(String? raw) { - return raw == null ? ffi.nullptr : api2wire_String(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_bool(bool? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_bool(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_greenlight_credentials( - GreenlightCredentials? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_greenlight_credentials(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_i64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_i64(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_opening_fee_params(OpeningFeeParams? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_opening_fee_params(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u32(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u32(raw); - } - - @protected - ffi.Pointer api2wire_opt_box_autoadd_u64(int? raw) { - return raw == null ? ffi.nullptr : api2wire_box_autoadd_u64(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_metadata_filter(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_metadata_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_payment_type_filter( - List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_payment_type_filter(raw); - } - - @protected - ffi.Pointer api2wire_opt_list_tlv_entry(List? raw) { - return raw == null ? ffi.nullptr : api2wire_list_tlv_entry(raw); - } - - @protected - ffi.Pointer api2wire_opt_uint_8_list(Uint8List? raw) { - return raw == null ? ffi.nullptr : api2wire_uint_8_list(raw); - } - - @protected - int api2wire_u64(int raw) { - return raw; - } - - @protected - ffi.Pointer api2wire_uint_8_list(Uint8List raw) { - final ans = inner.new_uint_8_list_0(raw.length); - ans.ref.ptr.asTypedList(raw.length).setAll(0, raw); - return ans; - } -// Section: finalizer - -// Section: api_fill_to_wire - - void _api_fill_to_wire_box_autoadd_buy_bitcoin_request( - BuyBitcoinRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_buy_bitcoin_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_check_message_request( - CheckMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_check_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_configure_node_request( - ConfigureNodeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_configure_node_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_connect_request( - ConnectRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_connect_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_credentials( - GreenlightCredentials apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_credentials(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_greenlight_node_config( - GreenlightNodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_greenlight_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_list_payments_request( - ListPaymentsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_list_payments_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_auth_request_data(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_pay_request( - LnUrlPayRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_pay_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_ln_url_withdraw_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_node_config(NodeConfig apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_node_config(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_open_channel_fee_request( - OpenChannelFeeRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_open_channel_fee_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_opening_fee_params( - OpeningFeeParams apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_opening_fee_params(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_pay_onchain_request( - PayOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_pay_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_onchain_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_prepare_refund_request( - PrepareRefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_prepare_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_onchain_request( - ReceiveOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_receive_payment_request( - ReceivePaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_receive_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_redeem_onchain_funds_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_refund_request( - RefundRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_refund_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_issue_request( - ReportIssueRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_issue_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_report_payment_failure_details(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_reverse_swap_fees_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_onchain_request( - SendOnchainRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_onchain_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_payment_request( - SendPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_send_spontaneous_payment_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_sign_message_request( - SignMessageRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_sign_message_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_box_autoadd_static_backup_request( - StaticBackupRequest apiObj, ffi.Pointer wireObj) { - _api_fill_to_wire_static_backup_request(apiObj, wireObj.ref); - } - - void _api_fill_to_wire_buy_bitcoin_request(BuyBitcoinRequest apiObj, wire_BuyBitcoinRequest wireObj) { - wireObj.provider = api2wire_buy_bitcoin_provider(apiObj.provider); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - } - - void _api_fill_to_wire_check_message_request(CheckMessageRequest apiObj, wire_CheckMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - wireObj.pubkey = api2wire_String(apiObj.pubkey); - wireObj.signature = api2wire_String(apiObj.signature); - } - - void _api_fill_to_wire_config(Config apiObj, wire_Config wireObj) { - wireObj.breezserver = api2wire_String(apiObj.breezserver); - wireObj.chainnotifier_url = api2wire_String(apiObj.chainnotifierUrl); - wireObj.mempoolspace_url = api2wire_opt_String(apiObj.mempoolspaceUrl); - wireObj.working_dir = api2wire_String(apiObj.workingDir); - wireObj.network = api2wire_network(apiObj.network); - wireObj.payment_timeout_sec = api2wire_u32(apiObj.paymentTimeoutSec); - wireObj.default_lsp_id = api2wire_opt_String(apiObj.defaultLspId); - wireObj.api_key = api2wire_opt_String(apiObj.apiKey); - wireObj.maxfee_percent = api2wire_f64(apiObj.maxfeePercent); - wireObj.exemptfee_msat = api2wire_u64(apiObj.exemptfeeMsat); - _api_fill_to_wire_node_config(apiObj.nodeConfig, wireObj.node_config); - } - - void _api_fill_to_wire_configure_node_request( - ConfigureNodeRequest apiObj, wire_ConfigureNodeRequest wireObj) { - wireObj.close_to_address = api2wire_opt_String(apiObj.closeToAddress); - } - - void _api_fill_to_wire_connect_request(ConnectRequest apiObj, wire_ConnectRequest wireObj) { - _api_fill_to_wire_config(apiObj.config, wireObj.config); - wireObj.seed = api2wire_uint_8_list(apiObj.seed); - wireObj.restore_only = api2wire_opt_box_autoadd_bool(apiObj.restoreOnly); - } - - void _api_fill_to_wire_greenlight_credentials( - GreenlightCredentials apiObj, wire_GreenlightCredentials wireObj) { - wireObj.device_key = api2wire_uint_8_list(apiObj.deviceKey); - wireObj.device_cert = api2wire_uint_8_list(apiObj.deviceCert); - } - - void _api_fill_to_wire_greenlight_node_config( - GreenlightNodeConfig apiObj, wire_GreenlightNodeConfig wireObj) { - wireObj.partner_credentials = api2wire_opt_box_autoadd_greenlight_credentials(apiObj.partnerCredentials); - wireObj.invite_code = api2wire_opt_String(apiObj.inviteCode); - } - - void _api_fill_to_wire_list_payments_request(ListPaymentsRequest apiObj, wire_ListPaymentsRequest wireObj) { - wireObj.filters = api2wire_opt_list_payment_type_filter(apiObj.filters); - wireObj.metadata_filters = api2wire_opt_list_metadata_filter(apiObj.metadataFilters); - wireObj.from_timestamp = api2wire_opt_box_autoadd_i64(apiObj.fromTimestamp); - wireObj.to_timestamp = api2wire_opt_box_autoadd_i64(apiObj.toTimestamp); - wireObj.include_failures = api2wire_opt_box_autoadd_bool(apiObj.includeFailures); - wireObj.offset = api2wire_opt_box_autoadd_u32(apiObj.offset); - wireObj.limit = api2wire_opt_box_autoadd_u32(apiObj.limit); - } - - void _api_fill_to_wire_ln_url_auth_request_data( - LnUrlAuthRequestData apiObj, wire_LnUrlAuthRequestData wireObj) { - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.action = api2wire_opt_String(apiObj.action); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.url = api2wire_String(apiObj.url); - } - - void _api_fill_to_wire_ln_url_pay_request(LnUrlPayRequest apiObj, wire_LnUrlPayRequest wireObj) { - _api_fill_to_wire_ln_url_pay_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.comment = api2wire_opt_String(apiObj.comment); - wireObj.payment_label = api2wire_opt_String(apiObj.paymentLabel); - } - - void _api_fill_to_wire_ln_url_pay_request_data( - LnUrlPayRequestData apiObj, wire_LnUrlPayRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.min_sendable = api2wire_u64(apiObj.minSendable); - wireObj.max_sendable = api2wire_u64(apiObj.maxSendable); - wireObj.metadata_str = api2wire_String(apiObj.metadataStr); - wireObj.comment_allowed = api2wire_u16(apiObj.commentAllowed); - wireObj.domain = api2wire_String(apiObj.domain); - wireObj.allows_nostr = api2wire_bool(apiObj.allowsNostr); - wireObj.nostr_pubkey = api2wire_opt_String(apiObj.nostrPubkey); - wireObj.ln_address = api2wire_opt_String(apiObj.lnAddress); - } - - void _api_fill_to_wire_ln_url_withdraw_request( - LnUrlWithdrawRequest apiObj, wire_LnUrlWithdrawRequest wireObj) { - _api_fill_to_wire_ln_url_withdraw_request_data(apiObj.data, wireObj.data); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_opt_String(apiObj.description); - } - - void _api_fill_to_wire_ln_url_withdraw_request_data( - LnUrlWithdrawRequestData apiObj, wire_LnUrlWithdrawRequestData wireObj) { - wireObj.callback = api2wire_String(apiObj.callback); - wireObj.k1 = api2wire_String(apiObj.k1); - wireObj.default_description = api2wire_String(apiObj.defaultDescription); - wireObj.min_withdrawable = api2wire_u64(apiObj.minWithdrawable); - wireObj.max_withdrawable = api2wire_u64(apiObj.maxWithdrawable); - } - - void _api_fill_to_wire_metadata_filter(MetadataFilter apiObj, wire_MetadataFilter wireObj) { - wireObj.json_path = api2wire_String(apiObj.jsonPath); - wireObj.json_value = api2wire_String(apiObj.jsonValue); - } - - void _api_fill_to_wire_node_config(NodeConfig apiObj, wire_NodeConfig wireObj) { - if (apiObj is NodeConfig_Greenlight) { - var pre_config = api2wire_box_autoadd_greenlight_node_config(apiObj.config); - wireObj.tag = 0; - wireObj.kind = inner.inflate_NodeConfig_Greenlight(); - wireObj.kind.ref.Greenlight.ref.config = pre_config; - return; - } - } - - void _api_fill_to_wire_open_channel_fee_request( - OpenChannelFeeRequest apiObj, wire_OpenChannelFeeRequest wireObj) { - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - } - - void _api_fill_to_wire_opening_fee_params(OpeningFeeParams apiObj, wire_OpeningFeeParams wireObj) { - wireObj.min_msat = api2wire_u64(apiObj.minMsat); - wireObj.proportional = api2wire_u32(apiObj.proportional); - wireObj.valid_until = api2wire_String(apiObj.validUntil); - wireObj.max_idle_time = api2wire_u32(apiObj.maxIdleTime); - wireObj.max_client_to_self_delay = api2wire_u32(apiObj.maxClientToSelfDelay); - wireObj.promise = api2wire_String(apiObj.promise); - } - - void _api_fill_to_wire_pay_onchain_request(PayOnchainRequest apiObj, wire_PayOnchainRequest wireObj) { - wireObj.recipient_address = api2wire_String(apiObj.recipientAddress); - _api_fill_to_wire_prepare_onchain_payment_response(apiObj.prepareRes, wireObj.prepare_res); - } - - void _api_fill_to_wire_prepare_onchain_payment_request( - PrepareOnchainPaymentRequest apiObj, wire_PrepareOnchainPaymentRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.amount_type = api2wire_swap_amount_type(apiObj.amountType); - wireObj.claim_tx_feerate = api2wire_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_prepare_onchain_payment_response( - PrepareOnchainPaymentResponse apiObj, wire_PrepareOnchainPaymentResponse wireObj) { - wireObj.fees_hash = api2wire_String(apiObj.feesHash); - wireObj.fees_percentage = api2wire_f64(apiObj.feesPercentage); - wireObj.fees_lockup = api2wire_u64(apiObj.feesLockup); - wireObj.fees_claim = api2wire_u64(apiObj.feesClaim); - wireObj.sender_amount_sat = api2wire_u64(apiObj.senderAmountSat); - wireObj.recipient_amount_sat = api2wire_u64(apiObj.recipientAmountSat); - wireObj.total_fees = api2wire_u64(apiObj.totalFees); - } - - void _api_fill_to_wire_prepare_redeem_onchain_funds_request( - PrepareRedeemOnchainFundsRequest apiObj, wire_PrepareRedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_prepare_refund_request( - PrepareRefundRequest apiObj, wire_PrepareRefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_receive_onchain_request( - ReceiveOnchainRequest apiObj, wire_ReceiveOnchainRequest wireObj) { - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - } - - void _api_fill_to_wire_receive_payment_request( - ReceivePaymentRequest apiObj, wire_ReceivePaymentRequest wireObj) { - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.description = api2wire_String(apiObj.description); - wireObj.preimage = api2wire_opt_uint_8_list(apiObj.preimage); - wireObj.opening_fee_params = api2wire_opt_box_autoadd_opening_fee_params(apiObj.openingFeeParams); - wireObj.use_description_hash = api2wire_opt_box_autoadd_bool(apiObj.useDescriptionHash); - wireObj.expiry = api2wire_opt_box_autoadd_u32(apiObj.expiry); - wireObj.cltv = api2wire_opt_box_autoadd_u32(apiObj.cltv); - } - - void _api_fill_to_wire_redeem_onchain_funds_request( - RedeemOnchainFundsRequest apiObj, wire_RedeemOnchainFundsRequest wireObj) { - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_refund_request(RefundRequest apiObj, wire_RefundRequest wireObj) { - wireObj.swap_address = api2wire_String(apiObj.swapAddress); - wireObj.to_address = api2wire_String(apiObj.toAddress); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_report_issue_request(ReportIssueRequest apiObj, wire_ReportIssueRequest wireObj) { - if (apiObj is ReportIssueRequest_PaymentFailure) { - var pre_data = api2wire_box_autoadd_report_payment_failure_details(apiObj.data); - wireObj.tag = 0; - wireObj.kind = inner.inflate_ReportIssueRequest_PaymentFailure(); - wireObj.kind.ref.PaymentFailure.ref.data = pre_data; - return; - } - } - - void _api_fill_to_wire_report_payment_failure_details( - ReportPaymentFailureDetails apiObj, wire_ReportPaymentFailureDetails wireObj) { - wireObj.payment_hash = api2wire_String(apiObj.paymentHash); - wireObj.comment = api2wire_opt_String(apiObj.comment); - } - - void _api_fill_to_wire_reverse_swap_fees_request( - ReverseSwapFeesRequest apiObj, wire_ReverseSwapFeesRequest wireObj) { - wireObj.send_amount_sat = api2wire_opt_box_autoadd_u64(apiObj.sendAmountSat); - wireObj.claim_tx_feerate = api2wire_opt_box_autoadd_u32(apiObj.claimTxFeerate); - } - - void _api_fill_to_wire_send_onchain_request(SendOnchainRequest apiObj, wire_SendOnchainRequest wireObj) { - wireObj.amount_sat = api2wire_u64(apiObj.amountSat); - wireObj.onchain_recipient_address = api2wire_String(apiObj.onchainRecipientAddress); - wireObj.pair_hash = api2wire_String(apiObj.pairHash); - wireObj.sat_per_vbyte = api2wire_u32(apiObj.satPerVbyte); - } - - void _api_fill_to_wire_send_payment_request(SendPaymentRequest apiObj, wire_SendPaymentRequest wireObj) { - wireObj.bolt11 = api2wire_String(apiObj.bolt11); - wireObj.amount_msat = api2wire_opt_box_autoadd_u64(apiObj.amountMsat); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_send_spontaneous_payment_request( - SendSpontaneousPaymentRequest apiObj, wire_SendSpontaneousPaymentRequest wireObj) { - wireObj.node_id = api2wire_String(apiObj.nodeId); - wireObj.amount_msat = api2wire_u64(apiObj.amountMsat); - wireObj.extra_tlvs = api2wire_opt_list_tlv_entry(apiObj.extraTlvs); - wireObj.label = api2wire_opt_String(apiObj.label); - } - - void _api_fill_to_wire_sign_message_request(SignMessageRequest apiObj, wire_SignMessageRequest wireObj) { - wireObj.message = api2wire_String(apiObj.message); - } - - void _api_fill_to_wire_static_backup_request(StaticBackupRequest apiObj, wire_StaticBackupRequest wireObj) { - wireObj.working_dir = api2wire_String(apiObj.workingDir); - } - - void _api_fill_to_wire_tlv_entry(TlvEntry apiObj, wire_TlvEntry wireObj) { - wireObj.field_number = api2wire_u64(apiObj.fieldNumber); - wireObj.value = api2wire_uint_8_list(apiObj.value); - } -} - -// ignore_for_file: camel_case_types, non_constant_identifier_names, avoid_positional_boolean_parameters, annotate_overrides, constant_identifier_names - -// AUTO GENERATED FILE, DO NOT EDIT. -// -// Generated by `package:ffigen`. -// ignore_for_file: type=lint - -/// generated by flutter_rust_bridge -class BreezSdkCoreWire implements FlutterRustBridgeWireBase { - @internal - late final dartApi = DartApiDl(init_frb_dart_api_dl); - - /// Holds the symbol lookup function. - final ffi.Pointer Function(String symbolName) _lookup; - - /// The symbols are looked up in [dynamicLibrary]. - BreezSdkCoreWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; - - /// The symbols are looked up with [lookup]. - BreezSdkCoreWire.fromLookup(ffi.Pointer Function(String symbolName) lookup) - : _lookup = lookup; - - void store_dart_post_cobject( - DartPostCObjectFnType ptr, - ) { - return _store_dart_post_cobject( - ptr, - ); - } - - late final _store_dart_post_cobjectPtr = - _lookup>('store_dart_post_cobject'); - late final _store_dart_post_cobject = - _store_dart_post_cobjectPtr.asFunction(); - - Object get_dart_object( - int ptr, - ) { - return _get_dart_object( - ptr, - ); - } - - late final _get_dart_objectPtr = - _lookup>('get_dart_object'); - late final _get_dart_object = _get_dart_objectPtr.asFunction(); - - void drop_dart_object( - int ptr, - ) { - return _drop_dart_object( - ptr, - ); - } - - late final _drop_dart_objectPtr = - _lookup>('drop_dart_object'); - late final _drop_dart_object = _drop_dart_objectPtr.asFunction(); - - int new_dart_opaque( - Object handle, - ) { - return _new_dart_opaque( - handle, - ); - } - - late final _new_dart_opaquePtr = - _lookup>('new_dart_opaque'); - late final _new_dart_opaque = _new_dart_opaquePtr.asFunction(); - - int init_frb_dart_api_dl( - ffi.Pointer obj, - ) { - return _init_frb_dart_api_dl( - obj, - ); - } - - late final _init_frb_dart_api_dlPtr = - _lookup)>>('init_frb_dart_api_dl'); - late final _init_frb_dart_api_dl = - _init_frb_dart_api_dlPtr.asFunction)>(); - - void wire_connect( - int port_, - ffi.Pointer req, - ) { - return _wire_connect( - port_, - req, - ); - } - - late final _wire_connectPtr = - _lookup)>>( - 'wire_connect'); - late final _wire_connect = - _wire_connectPtr.asFunction)>(); - - void wire_is_initialized( - int port_, - ) { - return _wire_is_initialized( - port_, - ); - } - - late final _wire_is_initializedPtr = - _lookup>('wire_is_initialized'); - late final _wire_is_initialized = _wire_is_initializedPtr.asFunction(); - - void wire_sync( - int port_, - ) { - return _wire_sync( - port_, - ); - } - - late final _wire_syncPtr = _lookup>('wire_sync'); - late final _wire_sync = _wire_syncPtr.asFunction(); - - void wire_node_credentials( - int port_, - ) { - return _wire_node_credentials( - port_, - ); - } - - late final _wire_node_credentialsPtr = - _lookup>('wire_node_credentials'); - late final _wire_node_credentials = _wire_node_credentialsPtr.asFunction(); - - void wire_node_info( - int port_, - ) { - return _wire_node_info( - port_, - ); - } - - late final _wire_node_infoPtr = _lookup>('wire_node_info'); - late final _wire_node_info = _wire_node_infoPtr.asFunction(); - - void wire_configure_node( - int port_, - ffi.Pointer req, - ) { - return _wire_configure_node( - port_, - req, - ); - } - - late final _wire_configure_nodePtr = - _lookup)>>( - 'wire_configure_node'); - late final _wire_configure_node = - _wire_configure_nodePtr.asFunction)>(); - - void wire_disconnect( - int port_, - ) { - return _wire_disconnect( - port_, - ); - } - - late final _wire_disconnectPtr = - _lookup>('wire_disconnect'); - late final _wire_disconnect = _wire_disconnectPtr.asFunction(); - - void wire_sign_message( - int port_, - ffi.Pointer req, - ) { - return _wire_sign_message( - port_, - req, - ); - } - - late final _wire_sign_messagePtr = - _lookup)>>( - 'wire_sign_message'); - late final _wire_sign_message = - _wire_sign_messagePtr.asFunction)>(); - - void wire_check_message( - int port_, - ffi.Pointer req, - ) { - return _wire_check_message( - port_, - req, - ); - } - - late final _wire_check_messagePtr = - _lookup)>>( - 'wire_check_message'); - late final _wire_check_message = - _wire_check_messagePtr.asFunction)>(); - - void wire_mnemonic_to_seed( - int port_, - ffi.Pointer phrase, - ) { - return _wire_mnemonic_to_seed( - port_, - phrase, - ); - } - - late final _wire_mnemonic_to_seedPtr = - _lookup)>>( - 'wire_mnemonic_to_seed'); - late final _wire_mnemonic_to_seed = - _wire_mnemonic_to_seedPtr.asFunction)>(); - - void wire_default_config( - int port_, - int env_type, - ffi.Pointer api_key, - ffi.Pointer node_config, - ) { - return _wire_default_config( - port_, - env_type, - api_key, - node_config, - ); - } - - late final _wire_default_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('wire_default_config'); - late final _wire_default_config = _wire_default_configPtr - .asFunction, ffi.Pointer)>(); - - void wire_static_backup( - int port_, - ffi.Pointer req, - ) { - return _wire_static_backup( - port_, - req, - ); - } - - late final _wire_static_backupPtr = - _lookup)>>( - 'wire_static_backup'); - late final _wire_static_backup = - _wire_static_backupPtr.asFunction)>(); - - void wire_service_health_check( - int port_, - ffi.Pointer api_key, - ) { - return _wire_service_health_check( - port_, - api_key, - ); - } - - late final _wire_service_health_checkPtr = - _lookup)>>( - 'wire_service_health_check'); - late final _wire_service_health_check = - _wire_service_health_checkPtr.asFunction)>(); - - void wire_breez_events_stream( - int port_, - ) { - return _wire_breez_events_stream( - port_, - ); - } - - late final _wire_breez_events_streamPtr = - _lookup>('wire_breez_events_stream'); - late final _wire_breez_events_stream = _wire_breez_events_streamPtr.asFunction(); - - void wire_breez_log_stream( - int port_, - ) { - return _wire_breez_log_stream( - port_, - ); - } - - late final _wire_breez_log_streamPtr = - _lookup>('wire_breez_log_stream'); - late final _wire_breez_log_stream = _wire_breez_log_streamPtr.asFunction(); - - void wire_list_lsps( - int port_, - ) { - return _wire_list_lsps( - port_, - ); - } - - late final _wire_list_lspsPtr = _lookup>('wire_list_lsps'); - late final _wire_list_lsps = _wire_list_lspsPtr.asFunction(); - - void wire_connect_lsp( - int port_, - ffi.Pointer lsp_id, - ) { - return _wire_connect_lsp( - port_, - lsp_id, - ); - } - - late final _wire_connect_lspPtr = - _lookup)>>( - 'wire_connect_lsp'); - late final _wire_connect_lsp = - _wire_connect_lspPtr.asFunction)>(); - - void wire_lsp_id( - int port_, - ) { - return _wire_lsp_id( - port_, - ); - } - - late final _wire_lsp_idPtr = _lookup>('wire_lsp_id'); - late final _wire_lsp_id = _wire_lsp_idPtr.asFunction(); - - void wire_fetch_lsp_info( - int port_, - ffi.Pointer id, - ) { - return _wire_fetch_lsp_info( - port_, - id, - ); - } - - late final _wire_fetch_lsp_infoPtr = - _lookup)>>( - 'wire_fetch_lsp_info'); - late final _wire_fetch_lsp_info = - _wire_fetch_lsp_infoPtr.asFunction)>(); - - void wire_lsp_info( - int port_, - ) { - return _wire_lsp_info( - port_, - ); - } - - late final _wire_lsp_infoPtr = _lookup>('wire_lsp_info'); - late final _wire_lsp_info = _wire_lsp_infoPtr.asFunction(); - - void wire_close_lsp_channels( - int port_, - ) { - return _wire_close_lsp_channels( - port_, - ); - } - - late final _wire_close_lsp_channelsPtr = - _lookup>('wire_close_lsp_channels'); - late final _wire_close_lsp_channels = _wire_close_lsp_channelsPtr.asFunction(); - - void wire_register_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_register_webhook( - port_, - webhook_url, - ); - } - - late final _wire_register_webhookPtr = - _lookup)>>( - 'wire_register_webhook'); - late final _wire_register_webhook = - _wire_register_webhookPtr.asFunction)>(); - - void wire_unregister_webhook( - int port_, - ffi.Pointer webhook_url, - ) { - return _wire_unregister_webhook( - port_, - webhook_url, - ); - } - - late final _wire_unregister_webhookPtr = - _lookup)>>( - 'wire_unregister_webhook'); - late final _wire_unregister_webhook = - _wire_unregister_webhookPtr.asFunction)>(); - - void wire_backup( - int port_, - ) { - return _wire_backup( - port_, - ); - } - - late final _wire_backupPtr = _lookup>('wire_backup'); - late final _wire_backup = _wire_backupPtr.asFunction(); - - void wire_backup_status( - int port_, - ) { - return _wire_backup_status( - port_, - ); - } - - late final _wire_backup_statusPtr = - _lookup>('wire_backup_status'); - late final _wire_backup_status = _wire_backup_statusPtr.asFunction(); - - void wire_parse_invoice( - int port_, - ffi.Pointer invoice, - ) { - return _wire_parse_invoice( - port_, - invoice, - ); - } - - late final _wire_parse_invoicePtr = - _lookup)>>( - 'wire_parse_invoice'); - late final _wire_parse_invoice = - _wire_parse_invoicePtr.asFunction)>(); - - void wire_parse_input( - int port_, - ffi.Pointer input, - ) { - return _wire_parse_input( - port_, - input, - ); - } - - late final _wire_parse_inputPtr = - _lookup)>>( - 'wire_parse_input'); - late final _wire_parse_input = - _wire_parse_inputPtr.asFunction)>(); - - void wire_list_payments( - int port_, - ffi.Pointer req, - ) { - return _wire_list_payments( - port_, - req, - ); - } - - late final _wire_list_paymentsPtr = - _lookup)>>( - 'wire_list_payments'); - late final _wire_list_payments = - _wire_list_paymentsPtr.asFunction)>(); - - void wire_payment_by_hash( - int port_, - ffi.Pointer hash, - ) { - return _wire_payment_by_hash( - port_, - hash, - ); - } - - late final _wire_payment_by_hashPtr = - _lookup)>>( - 'wire_payment_by_hash'); - late final _wire_payment_by_hash = - _wire_payment_by_hashPtr.asFunction)>(); - - void wire_set_payment_metadata( - int port_, - ffi.Pointer hash, - ffi.Pointer metadata, - ) { - return _wire_set_payment_metadata( - port_, - hash, - metadata, - ); - } - - late final _wire_set_payment_metadataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Pointer)>>('wire_set_payment_metadata'); - late final _wire_set_payment_metadata = _wire_set_payment_metadataPtr - .asFunction, ffi.Pointer)>(); - - void wire_send_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_payment( - port_, - req, - ); - } - - late final _wire_send_paymentPtr = - _lookup)>>( - 'wire_send_payment'); - late final _wire_send_payment = - _wire_send_paymentPtr.asFunction)>(); - - void wire_send_spontaneous_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_send_spontaneous_payment( - port_, - req, - ); - } - - late final _wire_send_spontaneous_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_send_spontaneous_payment'); - late final _wire_send_spontaneous_payment = _wire_send_spontaneous_paymentPtr - .asFunction)>(); - - void wire_receive_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_payment( - port_, - req, - ); - } - - late final _wire_receive_paymentPtr = - _lookup)>>( - 'wire_receive_payment'); - late final _wire_receive_payment = - _wire_receive_paymentPtr.asFunction)>(); - - void wire_lnurl_pay( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_pay( - port_, - req, - ); - } - - late final _wire_lnurl_payPtr = - _lookup)>>( - 'wire_lnurl_pay'); - late final _wire_lnurl_pay = - _wire_lnurl_payPtr.asFunction)>(); - - void wire_lnurl_withdraw( - int port_, - ffi.Pointer req, - ) { - return _wire_lnurl_withdraw( - port_, - req, - ); - } - - late final _wire_lnurl_withdrawPtr = - _lookup)>>( - 'wire_lnurl_withdraw'); - late final _wire_lnurl_withdraw = - _wire_lnurl_withdrawPtr.asFunction)>(); - - void wire_lnurl_auth( - int port_, - ffi.Pointer req_data, - ) { - return _wire_lnurl_auth( - port_, - req_data, - ); - } - - late final _wire_lnurl_authPtr = - _lookup)>>( - 'wire_lnurl_auth'); - late final _wire_lnurl_auth = - _wire_lnurl_authPtr.asFunction)>(); - - void wire_report_issue( - int port_, - ffi.Pointer req, - ) { - return _wire_report_issue( - port_, - req, - ); - } - - late final _wire_report_issuePtr = - _lookup)>>( - 'wire_report_issue'); - late final _wire_report_issue = - _wire_report_issuePtr.asFunction)>(); - - void wire_fetch_fiat_rates( - int port_, - ) { - return _wire_fetch_fiat_rates( - port_, - ); - } - - late final _wire_fetch_fiat_ratesPtr = - _lookup>('wire_fetch_fiat_rates'); - late final _wire_fetch_fiat_rates = _wire_fetch_fiat_ratesPtr.asFunction(); - - void wire_list_fiat_currencies( - int port_, - ) { - return _wire_list_fiat_currencies( - port_, - ); - } - - late final _wire_list_fiat_currenciesPtr = - _lookup>('wire_list_fiat_currencies'); - late final _wire_list_fiat_currencies = _wire_list_fiat_currenciesPtr.asFunction(); - - void wire_max_reverse_swap_amount( - int port_, - ) { - return _wire_max_reverse_swap_amount( - port_, - ); - } - - late final _wire_max_reverse_swap_amountPtr = - _lookup>('wire_max_reverse_swap_amount'); - late final _wire_max_reverse_swap_amount = - _wire_max_reverse_swap_amountPtr.asFunction(); - - void wire_send_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_send_onchain( - port_, - req, - ); - } - - late final _wire_send_onchainPtr = - _lookup)>>( - 'wire_send_onchain'); - late final _wire_send_onchain = - _wire_send_onchainPtr.asFunction)>(); - - void wire_pay_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_pay_onchain( - port_, - req, - ); - } - - late final _wire_pay_onchainPtr = - _lookup)>>( - 'wire_pay_onchain'); - late final _wire_pay_onchain = - _wire_pay_onchainPtr.asFunction)>(); - - void wire_receive_onchain( - int port_, - ffi.Pointer req, - ) { - return _wire_receive_onchain( - port_, - req, - ); - } - - late final _wire_receive_onchainPtr = - _lookup)>>( - 'wire_receive_onchain'); - late final _wire_receive_onchain = - _wire_receive_onchainPtr.asFunction)>(); - - void wire_buy_bitcoin( - int port_, - ffi.Pointer req, - ) { - return _wire_buy_bitcoin( - port_, - req, - ); - } - - late final _wire_buy_bitcoinPtr = - _lookup)>>( - 'wire_buy_bitcoin'); - late final _wire_buy_bitcoin = - _wire_buy_bitcoinPtr.asFunction)>(); - - void wire_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_redeem_onchain_fundsPtr = - _lookup)>>( - 'wire_redeem_onchain_funds'); - late final _wire_redeem_onchain_funds = _wire_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_prepare_redeem_onchain_funds( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_redeem_onchain_funds( - port_, - req, - ); - } - - late final _wire_prepare_redeem_onchain_fundsPtr = _lookup< - ffi - .NativeFunction)>>( - 'wire_prepare_redeem_onchain_funds'); - late final _wire_prepare_redeem_onchain_funds = _wire_prepare_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire_list_refundables( - int port_, - ) { - return _wire_list_refundables( - port_, - ); - } - - late final _wire_list_refundablesPtr = - _lookup>('wire_list_refundables'); - late final _wire_list_refundables = _wire_list_refundablesPtr.asFunction(); - - void wire_prepare_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_refund( - port_, - req, - ); - } - - late final _wire_prepare_refundPtr = - _lookup)>>( - 'wire_prepare_refund'); - late final _wire_prepare_refund = - _wire_prepare_refundPtr.asFunction)>(); - - void wire_refund( - int port_, - ffi.Pointer req, - ) { - return _wire_refund( - port_, - req, - ); - } - - late final _wire_refundPtr = - _lookup)>>( - 'wire_refund'); - late final _wire_refund = _wire_refundPtr.asFunction)>(); - - void wire_rescan_swaps( - int port_, - ) { - return _wire_rescan_swaps( - port_, - ); - } - - late final _wire_rescan_swapsPtr = - _lookup>('wire_rescan_swaps'); - late final _wire_rescan_swaps = _wire_rescan_swapsPtr.asFunction(); - - void wire_redeem_swap( - int port_, - ffi.Pointer swap_address, - ) { - return _wire_redeem_swap( - port_, - swap_address, - ); - } - - late final _wire_redeem_swapPtr = - _lookup)>>( - 'wire_redeem_swap'); - late final _wire_redeem_swap = - _wire_redeem_swapPtr.asFunction)>(); - - void wire_in_progress_swap( - int port_, - ) { - return _wire_in_progress_swap( - port_, - ); - } - - late final _wire_in_progress_swapPtr = - _lookup>('wire_in_progress_swap'); - late final _wire_in_progress_swap = _wire_in_progress_swapPtr.asFunction(); - - void wire_in_progress_reverse_swaps( - int port_, - ) { - return _wire_in_progress_reverse_swaps( - port_, - ); - } - - late final _wire_in_progress_reverse_swapsPtr = - _lookup>('wire_in_progress_reverse_swaps'); - late final _wire_in_progress_reverse_swaps = - _wire_in_progress_reverse_swapsPtr.asFunction(); - - void wire_open_channel_fee( - int port_, - ffi.Pointer req, - ) { - return _wire_open_channel_fee( - port_, - req, - ); - } - - late final _wire_open_channel_feePtr = - _lookup)>>( - 'wire_open_channel_fee'); - late final _wire_open_channel_fee = - _wire_open_channel_feePtr.asFunction)>(); - - void wire_fetch_reverse_swap_fees( - int port_, - ffi.Pointer req, - ) { - return _wire_fetch_reverse_swap_fees( - port_, - req, - ); - } - - late final _wire_fetch_reverse_swap_feesPtr = - _lookup)>>( - 'wire_fetch_reverse_swap_fees'); - late final _wire_fetch_reverse_swap_fees = _wire_fetch_reverse_swap_feesPtr - .asFunction)>(); - - void wire_onchain_payment_limits( - int port_, - ) { - return _wire_onchain_payment_limits( - port_, - ); - } - - late final _wire_onchain_payment_limitsPtr = - _lookup>('wire_onchain_payment_limits'); - late final _wire_onchain_payment_limits = _wire_onchain_payment_limitsPtr.asFunction(); - - void wire_prepare_onchain_payment( - int port_, - ffi.Pointer req, - ) { - return _wire_prepare_onchain_payment( - port_, - req, - ); - } - - late final _wire_prepare_onchain_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'wire_prepare_onchain_payment'); - late final _wire_prepare_onchain_payment = _wire_prepare_onchain_paymentPtr - .asFunction)>(); - - void wire_in_progress_onchain_payments( - int port_, - ) { - return _wire_in_progress_onchain_payments( - port_, - ); - } - - late final _wire_in_progress_onchain_paymentsPtr = - _lookup>('wire_in_progress_onchain_payments'); - late final _wire_in_progress_onchain_payments = - _wire_in_progress_onchain_paymentsPtr.asFunction(); - - void wire_recommended_fees( - int port_, - ) { - return _wire_recommended_fees( - port_, - ); - } - - late final _wire_recommended_feesPtr = - _lookup>('wire_recommended_fees'); - late final _wire_recommended_fees = _wire_recommended_feesPtr.asFunction(); - - void wire_execute_command( - int port_, - ffi.Pointer command, - ) { - return _wire_execute_command( - port_, - command, - ); - } - - late final _wire_execute_commandPtr = - _lookup)>>( - 'wire_execute_command'); - late final _wire_execute_command = - _wire_execute_commandPtr.asFunction)>(); - - void wire_generate_diagnostic_data( - int port_, - ) { - return _wire_generate_diagnostic_data( - port_, - ); - } - - late final _wire_generate_diagnostic_dataPtr = - _lookup>('wire_generate_diagnostic_data'); - late final _wire_generate_diagnostic_data = - _wire_generate_diagnostic_dataPtr.asFunction(); - - ffi.Pointer new_box_autoadd_bool_0( - bool value, - ) { - return _new_box_autoadd_bool_0( - value, - ); - } - - late final _new_box_autoadd_bool_0Ptr = - _lookup Function(ffi.Bool)>>('new_box_autoadd_bool_0'); - late final _new_box_autoadd_bool_0 = - _new_box_autoadd_bool_0Ptr.asFunction Function(bool)>(); - - ffi.Pointer new_box_autoadd_buy_bitcoin_request_0() { - return _new_box_autoadd_buy_bitcoin_request_0(); - } - - late final _new_box_autoadd_buy_bitcoin_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_buy_bitcoin_request_0'); - late final _new_box_autoadd_buy_bitcoin_request_0 = - _new_box_autoadd_buy_bitcoin_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_check_message_request_0() { - return _new_box_autoadd_check_message_request_0(); - } - - late final _new_box_autoadd_check_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_check_message_request_0'); - late final _new_box_autoadd_check_message_request_0 = _new_box_autoadd_check_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_configure_node_request_0() { - return _new_box_autoadd_configure_node_request_0(); - } - - late final _new_box_autoadd_configure_node_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_configure_node_request_0'); - late final _new_box_autoadd_configure_node_request_0 = _new_box_autoadd_configure_node_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_connect_request_0() { - return _new_box_autoadd_connect_request_0(); - } - - late final _new_box_autoadd_connect_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_connect_request_0'); - late final _new_box_autoadd_connect_request_0 = - _new_box_autoadd_connect_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_credentials_0() { - return _new_box_autoadd_greenlight_credentials_0(); - } - - late final _new_box_autoadd_greenlight_credentials_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_credentials_0'); - late final _new_box_autoadd_greenlight_credentials_0 = _new_box_autoadd_greenlight_credentials_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_greenlight_node_config_0() { - return _new_box_autoadd_greenlight_node_config_0(); - } - - late final _new_box_autoadd_greenlight_node_config_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_greenlight_node_config_0'); - late final _new_box_autoadd_greenlight_node_config_0 = _new_box_autoadd_greenlight_node_config_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_i64_0( - int value, - ) { - return _new_box_autoadd_i64_0( - value, - ); - } - - late final _new_box_autoadd_i64_0Ptr = - _lookup Function(ffi.Int64)>>('new_box_autoadd_i64_0'); - late final _new_box_autoadd_i64_0 = - _new_box_autoadd_i64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_list_payments_request_0() { - return _new_box_autoadd_list_payments_request_0(); - } - - late final _new_box_autoadd_list_payments_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_list_payments_request_0'); - late final _new_box_autoadd_list_payments_request_0 = _new_box_autoadd_list_payments_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_auth_request_data_0() { - return _new_box_autoadd_ln_url_auth_request_data_0(); - } - - late final _new_box_autoadd_ln_url_auth_request_data_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_auth_request_data_0'); - late final _new_box_autoadd_ln_url_auth_request_data_0 = _new_box_autoadd_ln_url_auth_request_data_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_pay_request_0() { - return _new_box_autoadd_ln_url_pay_request_0(); - } - - late final _new_box_autoadd_ln_url_pay_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_pay_request_0'); - late final _new_box_autoadd_ln_url_pay_request_0 = - _new_box_autoadd_ln_url_pay_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_ln_url_withdraw_request_0() { - return _new_box_autoadd_ln_url_withdraw_request_0(); - } - - late final _new_box_autoadd_ln_url_withdraw_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_ln_url_withdraw_request_0'); - late final _new_box_autoadd_ln_url_withdraw_request_0 = _new_box_autoadd_ln_url_withdraw_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_node_config_0() { - return _new_box_autoadd_node_config_0(); - } - - late final _new_box_autoadd_node_config_0Ptr = - _lookup Function()>>('new_box_autoadd_node_config_0'); - late final _new_box_autoadd_node_config_0 = - _new_box_autoadd_node_config_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_open_channel_fee_request_0() { - return _new_box_autoadd_open_channel_fee_request_0(); - } - - late final _new_box_autoadd_open_channel_fee_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_open_channel_fee_request_0'); - late final _new_box_autoadd_open_channel_fee_request_0 = _new_box_autoadd_open_channel_fee_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_opening_fee_params_0() { - return _new_box_autoadd_opening_fee_params_0(); - } - - late final _new_box_autoadd_opening_fee_params_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_opening_fee_params_0'); - late final _new_box_autoadd_opening_fee_params_0 = - _new_box_autoadd_opening_fee_params_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_pay_onchain_request_0() { - return _new_box_autoadd_pay_onchain_request_0(); - } - - late final _new_box_autoadd_pay_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_pay_onchain_request_0'); - late final _new_box_autoadd_pay_onchain_request_0 = - _new_box_autoadd_pay_onchain_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_onchain_payment_request_0() { - return _new_box_autoadd_prepare_onchain_payment_request_0(); - } - - late final _new_box_autoadd_prepare_onchain_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_onchain_payment_request_0'); - late final _new_box_autoadd_prepare_onchain_payment_request_0 = - _new_box_autoadd_prepare_onchain_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer - new_box_autoadd_prepare_redeem_onchain_funds_request_0() { - return _new_box_autoadd_prepare_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_prepare_redeem_onchain_funds_request_0 = - _new_box_autoadd_prepare_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_prepare_refund_request_0() { - return _new_box_autoadd_prepare_refund_request_0(); - } - - late final _new_box_autoadd_prepare_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_prepare_refund_request_0'); - late final _new_box_autoadd_prepare_refund_request_0 = _new_box_autoadd_prepare_refund_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_onchain_request_0() { - return _new_box_autoadd_receive_onchain_request_0(); - } - - late final _new_box_autoadd_receive_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_onchain_request_0'); - late final _new_box_autoadd_receive_onchain_request_0 = _new_box_autoadd_receive_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_receive_payment_request_0() { - return _new_box_autoadd_receive_payment_request_0(); - } - - late final _new_box_autoadd_receive_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_receive_payment_request_0'); - late final _new_box_autoadd_receive_payment_request_0 = _new_box_autoadd_receive_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_redeem_onchain_funds_request_0() { - return _new_box_autoadd_redeem_onchain_funds_request_0(); - } - - late final _new_box_autoadd_redeem_onchain_funds_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_redeem_onchain_funds_request_0'); - late final _new_box_autoadd_redeem_onchain_funds_request_0 = - _new_box_autoadd_redeem_onchain_funds_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_refund_request_0() { - return _new_box_autoadd_refund_request_0(); - } - - late final _new_box_autoadd_refund_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_refund_request_0'); - late final _new_box_autoadd_refund_request_0 = - _new_box_autoadd_refund_request_0Ptr.asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_issue_request_0() { - return _new_box_autoadd_report_issue_request_0(); - } - - late final _new_box_autoadd_report_issue_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_issue_request_0'); - late final _new_box_autoadd_report_issue_request_0 = _new_box_autoadd_report_issue_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_report_payment_failure_details_0() { - return _new_box_autoadd_report_payment_failure_details_0(); - } - - late final _new_box_autoadd_report_payment_failure_details_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_report_payment_failure_details_0'); - late final _new_box_autoadd_report_payment_failure_details_0 = - _new_box_autoadd_report_payment_failure_details_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_reverse_swap_fees_request_0() { - return _new_box_autoadd_reverse_swap_fees_request_0(); - } - - late final _new_box_autoadd_reverse_swap_fees_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_reverse_swap_fees_request_0'); - late final _new_box_autoadd_reverse_swap_fees_request_0 = _new_box_autoadd_reverse_swap_fees_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_onchain_request_0() { - return _new_box_autoadd_send_onchain_request_0(); - } - - late final _new_box_autoadd_send_onchain_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_onchain_request_0'); - late final _new_box_autoadd_send_onchain_request_0 = _new_box_autoadd_send_onchain_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_payment_request_0() { - return _new_box_autoadd_send_payment_request_0(); - } - - late final _new_box_autoadd_send_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_payment_request_0'); - late final _new_box_autoadd_send_payment_request_0 = _new_box_autoadd_send_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_send_spontaneous_payment_request_0() { - return _new_box_autoadd_send_spontaneous_payment_request_0(); - } - - late final _new_box_autoadd_send_spontaneous_payment_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_send_spontaneous_payment_request_0'); - late final _new_box_autoadd_send_spontaneous_payment_request_0 = - _new_box_autoadd_send_spontaneous_payment_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_sign_message_request_0() { - return _new_box_autoadd_sign_message_request_0(); - } - - late final _new_box_autoadd_sign_message_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_sign_message_request_0'); - late final _new_box_autoadd_sign_message_request_0 = _new_box_autoadd_sign_message_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_static_backup_request_0() { - return _new_box_autoadd_static_backup_request_0(); - } - - late final _new_box_autoadd_static_backup_request_0Ptr = - _lookup Function()>>( - 'new_box_autoadd_static_backup_request_0'); - late final _new_box_autoadd_static_backup_request_0 = _new_box_autoadd_static_backup_request_0Ptr - .asFunction Function()>(); - - ffi.Pointer new_box_autoadd_u32_0( - int value, - ) { - return _new_box_autoadd_u32_0( - value, - ); - } - - late final _new_box_autoadd_u32_0Ptr = - _lookup Function(ffi.Uint32)>>('new_box_autoadd_u32_0'); - late final _new_box_autoadd_u32_0 = - _new_box_autoadd_u32_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_box_autoadd_u64_0( - int value, - ) { - return _new_box_autoadd_u64_0( - value, - ); - } - - late final _new_box_autoadd_u64_0Ptr = - _lookup Function(ffi.Uint64)>>('new_box_autoadd_u64_0'); - late final _new_box_autoadd_u64_0 = - _new_box_autoadd_u64_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_metadata_filter_0( - int len, - ) { - return _new_list_metadata_filter_0( - len, - ); - } - - late final _new_list_metadata_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_metadata_filter_0'); - late final _new_list_metadata_filter_0 = - _new_list_metadata_filter_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_list_payment_type_filter_0( - int len, - ) { - return _new_list_payment_type_filter_0( - len, - ); - } - - late final _new_list_payment_type_filter_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_payment_type_filter_0'); - late final _new_list_payment_type_filter_0 = _new_list_payment_type_filter_0Ptr - .asFunction Function(int)>(); - - ffi.Pointer new_list_tlv_entry_0( - int len, - ) { - return _new_list_tlv_entry_0( - len, - ); - } - - late final _new_list_tlv_entry_0Ptr = - _lookup Function(ffi.Int32)>>( - 'new_list_tlv_entry_0'); - late final _new_list_tlv_entry_0 = - _new_list_tlv_entry_0Ptr.asFunction Function(int)>(); - - ffi.Pointer new_uint_8_list_0( - int len, - ) { - return _new_uint_8_list_0( - len, - ); - } - - late final _new_uint_8_list_0Ptr = - _lookup Function(ffi.Int32)>>('new_uint_8_list_0'); - late final _new_uint_8_list_0 = - _new_uint_8_list_0Ptr.asFunction Function(int)>(); - - ffi.Pointer inflate_NodeConfig_Greenlight() { - return _inflate_NodeConfig_Greenlight(); - } - - late final _inflate_NodeConfig_GreenlightPtr = - _lookup Function()>>('inflate_NodeConfig_Greenlight'); - late final _inflate_NodeConfig_Greenlight = - _inflate_NodeConfig_GreenlightPtr.asFunction Function()>(); - - ffi.Pointer inflate_ReportIssueRequest_PaymentFailure() { - return _inflate_ReportIssueRequest_PaymentFailure(); - } - - late final _inflate_ReportIssueRequest_PaymentFailurePtr = - _lookup Function()>>( - 'inflate_ReportIssueRequest_PaymentFailure'); - late final _inflate_ReportIssueRequest_PaymentFailure = _inflate_ReportIssueRequest_PaymentFailurePtr - .asFunction Function()>(); - - void free_WireSyncReturn( - WireSyncReturn ptr, - ) { - return _free_WireSyncReturn( - ptr, - ); - } - - late final _free_WireSyncReturnPtr = - _lookup>('free_WireSyncReturn'); - late final _free_WireSyncReturn = _free_WireSyncReturnPtr.asFunction(); -} - -final class _Dart_Handle extends ffi.Opaque {} - -final class wire_uint_8_list extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_GreenlightCredentials extends ffi.Struct { - external ffi.Pointer device_key; - - external ffi.Pointer device_cert; -} - -final class wire_GreenlightNodeConfig extends ffi.Struct { - external ffi.Pointer partner_credentials; - - external ffi.Pointer invite_code; -} - -final class wire_NodeConfig_Greenlight extends ffi.Struct { - external ffi.Pointer config; -} - -final class NodeConfigKind extends ffi.Union { - external ffi.Pointer Greenlight; -} - -final class wire_NodeConfig extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_Config extends ffi.Struct { - external ffi.Pointer breezserver; - - external ffi.Pointer chainnotifier_url; - - external ffi.Pointer mempoolspace_url; - - external ffi.Pointer working_dir; - - @ffi.Int32() - external int network; - - @ffi.Uint32() - external int payment_timeout_sec; - - external ffi.Pointer default_lsp_id; - - external ffi.Pointer api_key; - - @ffi.Double() - external double maxfee_percent; - - @ffi.Uint64() - external int exemptfee_msat; - - external wire_NodeConfig node_config; -} - -final class wire_ConnectRequest extends ffi.Struct { - external wire_Config config; - - external ffi.Pointer seed; - - external ffi.Pointer restore_only; -} - -final class wire_ConfigureNodeRequest extends ffi.Struct { - external ffi.Pointer close_to_address; -} - -final class wire_SignMessageRequest extends ffi.Struct { - external ffi.Pointer message; -} - -final class wire_CheckMessageRequest extends ffi.Struct { - external ffi.Pointer message; - - external ffi.Pointer pubkey; - - external ffi.Pointer signature; -} - -final class wire_StaticBackupRequest extends ffi.Struct { - external ffi.Pointer working_dir; -} - -final class wire_list_payment_type_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_MetadataFilter extends ffi.Struct { - external ffi.Pointer json_path; - - external ffi.Pointer json_value; -} - -final class wire_list_metadata_filter extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_ListPaymentsRequest extends ffi.Struct { - external ffi.Pointer filters; - - external ffi.Pointer metadata_filters; - - external ffi.Pointer from_timestamp; - - external ffi.Pointer to_timestamp; - - external ffi.Pointer include_failures; - - external ffi.Pointer offset; - - external ffi.Pointer limit; -} - -final class wire_SendPaymentRequest extends ffi.Struct { - external ffi.Pointer bolt11; - - external ffi.Pointer amount_msat; - - external ffi.Pointer label; -} - -final class wire_TlvEntry extends ffi.Struct { - @ffi.Uint64() - external int field_number; - - external ffi.Pointer value; -} - -final class wire_list_tlv_entry extends ffi.Struct { - external ffi.Pointer ptr; - - @ffi.Int32() - external int len; -} - -final class wire_SendSpontaneousPaymentRequest extends ffi.Struct { - external ffi.Pointer node_id; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer extra_tlvs; - - external ffi.Pointer label; -} - -final class wire_OpeningFeeParams extends ffi.Struct { - @ffi.Uint64() - external int min_msat; - - @ffi.Uint32() - external int proportional; - - external ffi.Pointer valid_until; - - @ffi.Uint32() - external int max_idle_time; - - @ffi.Uint32() - external int max_client_to_self_delay; - - external ffi.Pointer promise; -} - -final class wire_ReceivePaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; - - external ffi.Pointer preimage; - - external ffi.Pointer opening_fee_params; - - external ffi.Pointer use_description_hash; - - external ffi.Pointer expiry; - - external ffi.Pointer cltv; -} - -final class wire_LnUrlPayRequestData extends ffi.Struct { - external ffi.Pointer callback; - - @ffi.Uint64() - external int min_sendable; - - @ffi.Uint64() - external int max_sendable; - - external ffi.Pointer metadata_str; - - @ffi.Uint16() - external int comment_allowed; - - external ffi.Pointer domain; - - @ffi.Bool() - external bool allows_nostr; - - external ffi.Pointer nostr_pubkey; - - external ffi.Pointer ln_address; -} - -final class wire_LnUrlPayRequest extends ffi.Struct { - external wire_LnUrlPayRequestData data; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer comment; - - external ffi.Pointer payment_label; -} - -final class wire_LnUrlWithdrawRequestData extends ffi.Struct { - external ffi.Pointer callback; - - external ffi.Pointer k1; - - external ffi.Pointer default_description; - - @ffi.Uint64() - external int min_withdrawable; - - @ffi.Uint64() - external int max_withdrawable; -} - -final class wire_LnUrlWithdrawRequest extends ffi.Struct { - external wire_LnUrlWithdrawRequestData data; - - @ffi.Uint64() - external int amount_msat; - - external ffi.Pointer description; -} - -final class wire_LnUrlAuthRequestData extends ffi.Struct { - external ffi.Pointer k1; - - external ffi.Pointer action; - - external ffi.Pointer domain; - - external ffi.Pointer url; -} - -final class wire_ReportPaymentFailureDetails extends ffi.Struct { - external ffi.Pointer payment_hash; - - external ffi.Pointer comment; -} - -final class wire_ReportIssueRequest_PaymentFailure extends ffi.Struct { - external ffi.Pointer data; -} - -final class ReportIssueRequestKind extends ffi.Union { - external ffi.Pointer PaymentFailure; -} - -final class wire_ReportIssueRequest extends ffi.Struct { - @ffi.Int32() - external int tag; - - external ffi.Pointer kind; -} - -final class wire_SendOnchainRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - external ffi.Pointer onchain_recipient_address; - - external ffi.Pointer pair_hash; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareOnchainPaymentResponse extends ffi.Struct { - external ffi.Pointer fees_hash; - - @ffi.Double() - external double fees_percentage; - - @ffi.Uint64() - external int fees_lockup; - - @ffi.Uint64() - external int fees_claim; - - @ffi.Uint64() - external int sender_amount_sat; - - @ffi.Uint64() - external int recipient_amount_sat; - - @ffi.Uint64() - external int total_fees; -} - -final class wire_PayOnchainRequest extends ffi.Struct { - external ffi.Pointer recipient_address; - - external wire_PrepareOnchainPaymentResponse prepare_res; -} - -final class wire_ReceiveOnchainRequest extends ffi.Struct { - external ffi.Pointer opening_fee_params; -} - -final class wire_BuyBitcoinRequest extends ffi.Struct { - @ffi.Int32() - external int provider; - - external ffi.Pointer opening_fee_params; -} - -final class wire_RedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRedeemOnchainFundsRequest extends ffi.Struct { - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_PrepareRefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_RefundRequest extends ffi.Struct { - external ffi.Pointer swap_address; - - external ffi.Pointer to_address; - - @ffi.Uint32() - external int sat_per_vbyte; -} - -final class wire_OpenChannelFeeRequest extends ffi.Struct { - external ffi.Pointer amount_msat; - - external ffi.Pointer expiry; -} - -final class wire_ReverseSwapFeesRequest extends ffi.Struct { - external ffi.Pointer send_amount_sat; - - external ffi.Pointer claim_tx_feerate; -} - -final class wire_PrepareOnchainPaymentRequest extends ffi.Struct { - @ffi.Uint64() - external int amount_sat; - - @ffi.Int32() - external int amount_type; - - @ffi.Uint32() - external int claim_tx_feerate; -} - -typedef DartPostCObjectFnType - = ffi.Pointer message)>>; -typedef DartPort = ffi.Int64; - -const int SWAP_PAYMENT_FEE_EXPIRY_SECONDS = 172800; - -const int INVOICE_PAYMENT_FEE_EXPIRY_SECONDS = 3600; - -const int ESTIMATED_CLAIM_TX_VSIZE = 138; - -const int ESTIMATED_LOCKUP_TX_VSIZE = 153; diff --git a/libs/sdk-flutter/lib/bridge_generated.freezed.dart b/libs/sdk-flutter/lib/bridge_generated.freezed.dart deleted file mode 100644 index 0d63f8244..000000000 --- a/libs/sdk-flutter/lib/bridge_generated.freezed.dart +++ /dev/null @@ -1,6121 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// ignore_for_file: type=lint -// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark - -part of 'bridge_generated.dart'; - -// ************************************************************************** -// FreezedGenerator -// ************************************************************************** - -T _$identity(T value) => value; - -final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); - -/// @nodoc -mixin _$AesSuccessActionDataResult { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $AesSuccessActionDataResultCopyWith<$Res> { - factory $AesSuccessActionDataResultCopyWith(AesSuccessActionDataResult value, - $Res Function(AesSuccessActionDataResult) then) = - _$AesSuccessActionDataResultCopyWithImpl<$Res, - AesSuccessActionDataResult>; -} - -/// @nodoc -class _$AesSuccessActionDataResultCopyWithImpl<$Res, - $Val extends AesSuccessActionDataResult> - implements $AesSuccessActionDataResultCopyWith<$Res> { - _$AesSuccessActionDataResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_DecryptedImplCopyWith( - _$AesSuccessActionDataResult_DecryptedImpl value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) then) = - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataDecrypted data}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, - _$AesSuccessActionDataResult_DecryptedImpl> - implements _$$AesSuccessActionDataResult_DecryptedImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl( - _$AesSuccessActionDataResult_DecryptedImpl _value, - $Res Function(_$AesSuccessActionDataResult_DecryptedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$AesSuccessActionDataResult_DecryptedImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataDecrypted, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_DecryptedImpl - implements AesSuccessActionDataResult_Decrypted { - const _$AesSuccessActionDataResult_DecryptedImpl({required this.data}); - - @override - final AesSuccessActionDataDecrypted data; - - @override - String toString() { - return 'AesSuccessActionDataResult.decrypted(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_DecryptedImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_DecryptedImplCopyWith< - _$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => __$$AesSuccessActionDataResult_DecryptedImplCopyWithImpl< - _$AesSuccessActionDataResult_DecryptedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return decrypted(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return decrypted?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, - }) { - return decrypted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, - }) { - return decrypted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (decrypted != null) { - return decrypted(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_Decrypted - implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_Decrypted( - {required final AesSuccessActionDataDecrypted data}) = - _$AesSuccessActionDataResult_DecryptedImpl; - - AesSuccessActionDataDecrypted get data; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_DecryptedImplCopyWith< - _$AesSuccessActionDataResult_DecryptedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - factory _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith( - _$AesSuccessActionDataResult_ErrorStatusImpl value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) then) = - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({String reason}); -} - -/// @nodoc -class __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$AesSuccessActionDataResultCopyWithImpl<$Res, - _$AesSuccessActionDataResult_ErrorStatusImpl> - implements _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith<$Res> { - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl( - _$AesSuccessActionDataResult_ErrorStatusImpl _value, - $Res Function(_$AesSuccessActionDataResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? reason = null, - }) { - return _then(_$AesSuccessActionDataResult_ErrorStatusImpl( - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$AesSuccessActionDataResult_ErrorStatusImpl - implements AesSuccessActionDataResult_ErrorStatus { - const _$AesSuccessActionDataResult_ErrorStatusImpl({required this.reason}); - - @override - final String reason; - - @override - String toString() { - return 'AesSuccessActionDataResult.errorStatus(reason: $reason)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AesSuccessActionDataResult_ErrorStatusImpl && - (identical(other.reason, reason) || other.reason == reason)); - } - - @override - int get hashCode => Object.hash(runtimeType, reason); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< - _$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => - __$$AesSuccessActionDataResult_ErrorStatusImplCopyWithImpl< - _$AesSuccessActionDataResult_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataDecrypted data) decrypted, - required TResult Function(String reason) errorStatus, - }) { - return errorStatus(reason); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult? Function(String reason)? errorStatus, - }) { - return errorStatus?.call(reason); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataDecrypted data)? decrypted, - TResult Function(String reason)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(reason); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(AesSuccessActionDataResult_Decrypted value) - decrypted, - required TResult Function(AesSuccessActionDataResult_ErrorStatus value) - errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult? Function(AesSuccessActionDataResult_ErrorStatus value)? - errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(AesSuccessActionDataResult_Decrypted value)? decrypted, - TResult Function(AesSuccessActionDataResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class AesSuccessActionDataResult_ErrorStatus - implements AesSuccessActionDataResult { - const factory AesSuccessActionDataResult_ErrorStatus( - {required final String reason}) = - _$AesSuccessActionDataResult_ErrorStatusImpl; - - String get reason; - @JsonKey(ignore: true) - _$$AesSuccessActionDataResult_ErrorStatusImplCopyWith< - _$AesSuccessActionDataResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$BreezEvent { - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $BreezEventCopyWith<$Res> { - factory $BreezEventCopyWith( - BreezEvent value, $Res Function(BreezEvent) then) = - _$BreezEventCopyWithImpl<$Res, BreezEvent>; -} - -/// @nodoc -class _$BreezEventCopyWithImpl<$Res, $Val extends BreezEvent> - implements $BreezEventCopyWith<$Res> { - _$BreezEventCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$BreezEvent_NewBlockImplCopyWith<$Res> { - factory _$$BreezEvent_NewBlockImplCopyWith(_$BreezEvent_NewBlockImpl value, - $Res Function(_$BreezEvent_NewBlockImpl) then) = - __$$BreezEvent_NewBlockImplCopyWithImpl<$Res>; - @useResult - $Res call({int block}); -} - -/// @nodoc -class __$$BreezEvent_NewBlockImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_NewBlockImpl> - implements _$$BreezEvent_NewBlockImplCopyWith<$Res> { - __$$BreezEvent_NewBlockImplCopyWithImpl(_$BreezEvent_NewBlockImpl _value, - $Res Function(_$BreezEvent_NewBlockImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? block = null, - }) { - return _then(_$BreezEvent_NewBlockImpl( - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as int, - )); - } -} - -/// @nodoc - -class _$BreezEvent_NewBlockImpl implements BreezEvent_NewBlock { - const _$BreezEvent_NewBlockImpl({required this.block}); - - @override - final int block; - - @override - String toString() { - return 'BreezEvent.newBlock(block: $block)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_NewBlockImpl && - (identical(other.block, block) || other.block == block)); - } - - @override - int get hashCode => Object.hash(runtimeType, block); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - __$$BreezEvent_NewBlockImplCopyWithImpl<_$BreezEvent_NewBlockImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return newBlock(block); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return newBlock?.call(block); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(block); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return newBlock(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return newBlock?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (newBlock != null) { - return newBlock(this); - } - return orElse(); - } -} - -abstract class BreezEvent_NewBlock implements BreezEvent { - const factory BreezEvent_NewBlock({required final int block}) = - _$BreezEvent_NewBlockImpl; - - int get block; - @JsonKey(ignore: true) - _$$BreezEvent_NewBlockImplCopyWith<_$BreezEvent_NewBlockImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - factory _$$BreezEvent_InvoicePaidImplCopyWith( - _$BreezEvent_InvoicePaidImpl value, - $Res Function(_$BreezEvent_InvoicePaidImpl) then) = - __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res>; - @useResult - $Res call({InvoicePaidDetails details}); -} - -/// @nodoc -class __$$BreezEvent_InvoicePaidImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_InvoicePaidImpl> - implements _$$BreezEvent_InvoicePaidImplCopyWith<$Res> { - __$$BreezEvent_InvoicePaidImplCopyWithImpl( - _$BreezEvent_InvoicePaidImpl _value, - $Res Function(_$BreezEvent_InvoicePaidImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_InvoicePaidImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as InvoicePaidDetails, - )); - } -} - -/// @nodoc - -class _$BreezEvent_InvoicePaidImpl implements BreezEvent_InvoicePaid { - const _$BreezEvent_InvoicePaidImpl({required this.details}); - - @override - final InvoicePaidDetails details; - - @override - String toString() { - return 'BreezEvent.invoicePaid(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_InvoicePaidImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> - get copyWith => __$$BreezEvent_InvoicePaidImplCopyWithImpl< - _$BreezEvent_InvoicePaidImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return invoicePaid(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return invoicePaid?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return invoicePaid(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return invoicePaid?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (invoicePaid != null) { - return invoicePaid(this); - } - return orElse(); - } -} - -abstract class BreezEvent_InvoicePaid implements BreezEvent { - const factory BreezEvent_InvoicePaid( - {required final InvoicePaidDetails details}) = - _$BreezEvent_InvoicePaidImpl; - - InvoicePaidDetails get details; - @JsonKey(ignore: true) - _$$BreezEvent_InvoicePaidImplCopyWith<_$BreezEvent_InvoicePaidImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SyncedImplCopyWith<$Res> { - factory _$$BreezEvent_SyncedImplCopyWith(_$BreezEvent_SyncedImpl value, - $Res Function(_$BreezEvent_SyncedImpl) then) = - __$$BreezEvent_SyncedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_SyncedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SyncedImpl> - implements _$$BreezEvent_SyncedImplCopyWith<$Res> { - __$$BreezEvent_SyncedImplCopyWithImpl(_$BreezEvent_SyncedImpl _value, - $Res Function(_$BreezEvent_SyncedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_SyncedImpl implements BreezEvent_Synced { - const _$BreezEvent_SyncedImpl(); - - @override - String toString() { - return 'BreezEvent.synced()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$BreezEvent_SyncedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return synced(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return synced?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return synced(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return synced?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (synced != null) { - return synced(this); - } - return orElse(); - } -} - -abstract class BreezEvent_Synced implements BreezEvent { - const factory BreezEvent_Synced() = _$BreezEvent_SyncedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentSucceedImplCopyWith( - _$BreezEvent_PaymentSucceedImpl value, - $Res Function(_$BreezEvent_PaymentSucceedImpl) then) = - __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res>; - @useResult - $Res call({Payment details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentSucceedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentSucceedImpl> - implements _$$BreezEvent_PaymentSucceedImplCopyWith<$Res> { - __$$BreezEvent_PaymentSucceedImplCopyWithImpl( - _$BreezEvent_PaymentSucceedImpl _value, - $Res Function(_$BreezEvent_PaymentSucceedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentSucceedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as Payment, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentSucceedImpl implements BreezEvent_PaymentSucceed { - const _$BreezEvent_PaymentSucceedImpl({required this.details}); - - @override - final Payment details; - - @override - String toString() { - return 'BreezEvent.paymentSucceed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentSucceedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> - get copyWith => __$$BreezEvent_PaymentSucceedImplCopyWithImpl< - _$BreezEvent_PaymentSucceedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentSucceed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentSucceed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentSucceed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentSucceed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentSucceed != null) { - return paymentSucceed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentSucceed implements BreezEvent { - const factory BreezEvent_PaymentSucceed({required final Payment details}) = - _$BreezEvent_PaymentSucceedImpl; - - Payment get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentSucceedImplCopyWith<_$BreezEvent_PaymentSucceedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - factory _$$BreezEvent_PaymentFailedImplCopyWith( - _$BreezEvent_PaymentFailedImpl value, - $Res Function(_$BreezEvent_PaymentFailedImpl) then) = - __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({PaymentFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_PaymentFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_PaymentFailedImpl> - implements _$$BreezEvent_PaymentFailedImplCopyWith<$Res> { - __$$BreezEvent_PaymentFailedImplCopyWithImpl( - _$BreezEvent_PaymentFailedImpl _value, - $Res Function(_$BreezEvent_PaymentFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_PaymentFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as PaymentFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_PaymentFailedImpl implements BreezEvent_PaymentFailed { - const _$BreezEvent_PaymentFailedImpl({required this.details}); - - @override - final PaymentFailedData details; - - @override - String toString() { - return 'BreezEvent.paymentFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_PaymentFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> - get copyWith => __$$BreezEvent_PaymentFailedImplCopyWithImpl< - _$BreezEvent_PaymentFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return paymentFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return paymentFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return paymentFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return paymentFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (paymentFailed != null) { - return paymentFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_PaymentFailed implements BreezEvent { - const factory BreezEvent_PaymentFailed( - {required final PaymentFailedData details}) = - _$BreezEvent_PaymentFailedImpl; - - PaymentFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_PaymentFailedImplCopyWith<_$BreezEvent_PaymentFailedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupStartedImplCopyWith( - _$BreezEvent_BackupStartedImpl value, - $Res Function(_$BreezEvent_BackupStartedImpl) then) = - __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupStartedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupStartedImpl> - implements _$$BreezEvent_BackupStartedImplCopyWith<$Res> { - __$$BreezEvent_BackupStartedImplCopyWithImpl( - _$BreezEvent_BackupStartedImpl _value, - $Res Function(_$BreezEvent_BackupStartedImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupStartedImpl implements BreezEvent_BackupStarted { - const _$BreezEvent_BackupStartedImpl(); - - @override - String toString() { - return 'BreezEvent.backupStarted()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupStartedImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupStarted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupStarted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupStarted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupStarted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupStarted != null) { - return backupStarted(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupStarted implements BreezEvent { - const factory BreezEvent_BackupStarted() = _$BreezEvent_BackupStartedImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - factory _$$BreezEvent_BackupSucceededImplCopyWith( - _$BreezEvent_BackupSucceededImpl value, - $Res Function(_$BreezEvent_BackupSucceededImpl) then) = - __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$BreezEvent_BackupSucceededImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupSucceededImpl> - implements _$$BreezEvent_BackupSucceededImplCopyWith<$Res> { - __$$BreezEvent_BackupSucceededImplCopyWithImpl( - _$BreezEvent_BackupSucceededImpl _value, - $Res Function(_$BreezEvent_BackupSucceededImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$BreezEvent_BackupSucceededImpl implements BreezEvent_BackupSucceeded { - const _$BreezEvent_BackupSucceededImpl(); - - @override - String toString() { - return 'BreezEvent.backupSucceeded()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupSucceededImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupSucceeded(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupSucceeded?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupSucceeded(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupSucceeded?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupSucceeded != null) { - return backupSucceeded(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupSucceeded implements BreezEvent { - const factory BreezEvent_BackupSucceeded() = _$BreezEvent_BackupSucceededImpl; -} - -/// @nodoc -abstract class _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - factory _$$BreezEvent_BackupFailedImplCopyWith( - _$BreezEvent_BackupFailedImpl value, - $Res Function(_$BreezEvent_BackupFailedImpl) then) = - __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res>; - @useResult - $Res call({BackupFailedData details}); -} - -/// @nodoc -class __$$BreezEvent_BackupFailedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_BackupFailedImpl> - implements _$$BreezEvent_BackupFailedImplCopyWith<$Res> { - __$$BreezEvent_BackupFailedImplCopyWithImpl( - _$BreezEvent_BackupFailedImpl _value, - $Res Function(_$BreezEvent_BackupFailedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_BackupFailedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as BackupFailedData, - )); - } -} - -/// @nodoc - -class _$BreezEvent_BackupFailedImpl implements BreezEvent_BackupFailed { - const _$BreezEvent_BackupFailedImpl({required this.details}); - - @override - final BackupFailedData details; - - @override - String toString() { - return 'BreezEvent.backupFailed(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_BackupFailedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> - get copyWith => __$$BreezEvent_BackupFailedImplCopyWithImpl< - _$BreezEvent_BackupFailedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return backupFailed(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return backupFailed?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return backupFailed(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return backupFailed?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (backupFailed != null) { - return backupFailed(this); - } - return orElse(); - } -} - -abstract class BreezEvent_BackupFailed implements BreezEvent { - const factory BreezEvent_BackupFailed( - {required final BackupFailedData details}) = - _$BreezEvent_BackupFailedImpl; - - BackupFailedData get details; - @JsonKey(ignore: true) - _$$BreezEvent_BackupFailedImplCopyWith<_$BreezEvent_BackupFailedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - factory _$$BreezEvent_SwapUpdatedImplCopyWith( - _$BreezEvent_SwapUpdatedImpl value, - $Res Function(_$BreezEvent_SwapUpdatedImpl) then) = - __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res>; - @useResult - $Res call({SwapInfo details}); -} - -/// @nodoc -class __$$BreezEvent_SwapUpdatedImplCopyWithImpl<$Res> - extends _$BreezEventCopyWithImpl<$Res, _$BreezEvent_SwapUpdatedImpl> - implements _$$BreezEvent_SwapUpdatedImplCopyWith<$Res> { - __$$BreezEvent_SwapUpdatedImplCopyWithImpl( - _$BreezEvent_SwapUpdatedImpl _value, - $Res Function(_$BreezEvent_SwapUpdatedImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? details = null, - }) { - return _then(_$BreezEvent_SwapUpdatedImpl( - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as SwapInfo, - )); - } -} - -/// @nodoc - -class _$BreezEvent_SwapUpdatedImpl implements BreezEvent_SwapUpdated { - const _$BreezEvent_SwapUpdatedImpl({required this.details}); - - @override - final SwapInfo details; - - @override - String toString() { - return 'BreezEvent.swapUpdated(details: $details)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BreezEvent_SwapUpdatedImpl && - (identical(other.details, details) || other.details == details)); - } - - @override - int get hashCode => Object.hash(runtimeType, details); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> - get copyWith => __$$BreezEvent_SwapUpdatedImplCopyWithImpl< - _$BreezEvent_SwapUpdatedImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(int block) newBlock, - required TResult Function(InvoicePaidDetails details) invoicePaid, - required TResult Function() synced, - required TResult Function(Payment details) paymentSucceed, - required TResult Function(PaymentFailedData details) paymentFailed, - required TResult Function() backupStarted, - required TResult Function() backupSucceeded, - required TResult Function(BackupFailedData details) backupFailed, - required TResult Function(SwapInfo details) swapUpdated, - }) { - return swapUpdated(details); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(int block)? newBlock, - TResult? Function(InvoicePaidDetails details)? invoicePaid, - TResult? Function()? synced, - TResult? Function(Payment details)? paymentSucceed, - TResult? Function(PaymentFailedData details)? paymentFailed, - TResult? Function()? backupStarted, - TResult? Function()? backupSucceeded, - TResult? Function(BackupFailedData details)? backupFailed, - TResult? Function(SwapInfo details)? swapUpdated, - }) { - return swapUpdated?.call(details); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(int block)? newBlock, - TResult Function(InvoicePaidDetails details)? invoicePaid, - TResult Function()? synced, - TResult Function(Payment details)? paymentSucceed, - TResult Function(PaymentFailedData details)? paymentFailed, - TResult Function()? backupStarted, - TResult Function()? backupSucceeded, - TResult Function(BackupFailedData details)? backupFailed, - TResult Function(SwapInfo details)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(details); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(BreezEvent_NewBlock value) newBlock, - required TResult Function(BreezEvent_InvoicePaid value) invoicePaid, - required TResult Function(BreezEvent_Synced value) synced, - required TResult Function(BreezEvent_PaymentSucceed value) paymentSucceed, - required TResult Function(BreezEvent_PaymentFailed value) paymentFailed, - required TResult Function(BreezEvent_BackupStarted value) backupStarted, - required TResult Function(BreezEvent_BackupSucceeded value) backupSucceeded, - required TResult Function(BreezEvent_BackupFailed value) backupFailed, - required TResult Function(BreezEvent_SwapUpdated value) swapUpdated, - }) { - return swapUpdated(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(BreezEvent_NewBlock value)? newBlock, - TResult? Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult? Function(BreezEvent_Synced value)? synced, - TResult? Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult? Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult? Function(BreezEvent_BackupStarted value)? backupStarted, - TResult? Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult? Function(BreezEvent_BackupFailed value)? backupFailed, - TResult? Function(BreezEvent_SwapUpdated value)? swapUpdated, - }) { - return swapUpdated?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(BreezEvent_NewBlock value)? newBlock, - TResult Function(BreezEvent_InvoicePaid value)? invoicePaid, - TResult Function(BreezEvent_Synced value)? synced, - TResult Function(BreezEvent_PaymentSucceed value)? paymentSucceed, - TResult Function(BreezEvent_PaymentFailed value)? paymentFailed, - TResult Function(BreezEvent_BackupStarted value)? backupStarted, - TResult Function(BreezEvent_BackupSucceeded value)? backupSucceeded, - TResult Function(BreezEvent_BackupFailed value)? backupFailed, - TResult Function(BreezEvent_SwapUpdated value)? swapUpdated, - required TResult orElse(), - }) { - if (swapUpdated != null) { - return swapUpdated(this); - } - return orElse(); - } -} - -abstract class BreezEvent_SwapUpdated implements BreezEvent { - const factory BreezEvent_SwapUpdated({required final SwapInfo details}) = - _$BreezEvent_SwapUpdatedImpl; - - SwapInfo get details; - @JsonKey(ignore: true) - _$$BreezEvent_SwapUpdatedImplCopyWith<_$BreezEvent_SwapUpdatedImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$InputType { - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $InputTypeCopyWith<$Res> { - factory $InputTypeCopyWith(InputType value, $Res Function(InputType) then) = - _$InputTypeCopyWithImpl<$Res, InputType>; -} - -/// @nodoc -class _$InputTypeCopyWithImpl<$Res, $Val extends InputType> - implements $InputTypeCopyWith<$Res> { - _$InputTypeCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$InputType_BitcoinAddressImplCopyWith<$Res> { - factory _$$InputType_BitcoinAddressImplCopyWith( - _$InputType_BitcoinAddressImpl value, - $Res Function(_$InputType_BitcoinAddressImpl) then) = - __$$InputType_BitcoinAddressImplCopyWithImpl<$Res>; - @useResult - $Res call({BitcoinAddressData address}); -} - -/// @nodoc -class __$$InputType_BitcoinAddressImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_BitcoinAddressImpl> - implements _$$InputType_BitcoinAddressImplCopyWith<$Res> { - __$$InputType_BitcoinAddressImplCopyWithImpl( - _$InputType_BitcoinAddressImpl _value, - $Res Function(_$InputType_BitcoinAddressImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? address = null, - }) { - return _then(_$InputType_BitcoinAddressImpl( - address: null == address - ? _value.address - : address // ignore: cast_nullable_to_non_nullable - as BitcoinAddressData, - )); - } -} - -/// @nodoc - -class _$InputType_BitcoinAddressImpl implements InputType_BitcoinAddress { - const _$InputType_BitcoinAddressImpl({required this.address}); - - @override - final BitcoinAddressData address; - - @override - String toString() { - return 'InputType.bitcoinAddress(address: $address)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_BitcoinAddressImpl && - (identical(other.address, address) || other.address == address)); - } - - @override - int get hashCode => Object.hash(runtimeType, address); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => __$$InputType_BitcoinAddressImplCopyWithImpl< - _$InputType_BitcoinAddressImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bitcoinAddress(address); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bitcoinAddress?.call(address); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(address); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bitcoinAddress(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bitcoinAddress?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bitcoinAddress != null) { - return bitcoinAddress(this); - } - return orElse(); - } -} - -abstract class InputType_BitcoinAddress implements InputType { - const factory InputType_BitcoinAddress( - {required final BitcoinAddressData address}) = - _$InputType_BitcoinAddressImpl; - - BitcoinAddressData get address; - @JsonKey(ignore: true) - _$$InputType_BitcoinAddressImplCopyWith<_$InputType_BitcoinAddressImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_Bolt11ImplCopyWith<$Res> { - factory _$$InputType_Bolt11ImplCopyWith(_$InputType_Bolt11Impl value, - $Res Function(_$InputType_Bolt11Impl) then) = - __$$InputType_Bolt11ImplCopyWithImpl<$Res>; - @useResult - $Res call({LNInvoice invoice}); -} - -/// @nodoc -class __$$InputType_Bolt11ImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_Bolt11Impl> - implements _$$InputType_Bolt11ImplCopyWith<$Res> { - __$$InputType_Bolt11ImplCopyWithImpl(_$InputType_Bolt11Impl _value, - $Res Function(_$InputType_Bolt11Impl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? invoice = null, - }) { - return _then(_$InputType_Bolt11Impl( - invoice: null == invoice - ? _value.invoice - : invoice // ignore: cast_nullable_to_non_nullable - as LNInvoice, - )); - } -} - -/// @nodoc - -class _$InputType_Bolt11Impl implements InputType_Bolt11 { - const _$InputType_Bolt11Impl({required this.invoice}); - - @override - final LNInvoice invoice; - - @override - String toString() { - return 'InputType.bolt11(invoice: $invoice)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_Bolt11Impl && - (identical(other.invoice, invoice) || other.invoice == invoice)); - } - - @override - int get hashCode => Object.hash(runtimeType, invoice); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - __$$InputType_Bolt11ImplCopyWithImpl<_$InputType_Bolt11Impl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return bolt11(invoice); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return bolt11?.call(invoice); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(invoice); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return bolt11(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return bolt11?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (bolt11 != null) { - return bolt11(this); - } - return orElse(); - } -} - -abstract class InputType_Bolt11 implements InputType { - const factory InputType_Bolt11({required final LNInvoice invoice}) = - _$InputType_Bolt11Impl; - - LNInvoice get invoice; - @JsonKey(ignore: true) - _$$InputType_Bolt11ImplCopyWith<_$InputType_Bolt11Impl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_NodeIdImplCopyWith<$Res> { - factory _$$InputType_NodeIdImplCopyWith(_$InputType_NodeIdImpl value, - $Res Function(_$InputType_NodeIdImpl) then) = - __$$InputType_NodeIdImplCopyWithImpl<$Res>; - @useResult - $Res call({String nodeId}); -} - -/// @nodoc -class __$$InputType_NodeIdImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_NodeIdImpl> - implements _$$InputType_NodeIdImplCopyWith<$Res> { - __$$InputType_NodeIdImplCopyWithImpl(_$InputType_NodeIdImpl _value, - $Res Function(_$InputType_NodeIdImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? nodeId = null, - }) { - return _then(_$InputType_NodeIdImpl( - nodeId: null == nodeId - ? _value.nodeId - : nodeId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_NodeIdImpl implements InputType_NodeId { - const _$InputType_NodeIdImpl({required this.nodeId}); - - @override - final String nodeId; - - @override - String toString() { - return 'InputType.nodeId(nodeId: $nodeId)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_NodeIdImpl && - (identical(other.nodeId, nodeId) || other.nodeId == nodeId)); - } - - @override - int get hashCode => Object.hash(runtimeType, nodeId); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - __$$InputType_NodeIdImplCopyWithImpl<_$InputType_NodeIdImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return nodeId(this.nodeId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return nodeId?.call(this.nodeId); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this.nodeId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return nodeId(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return nodeId?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (nodeId != null) { - return nodeId(this); - } - return orElse(); - } -} - -abstract class InputType_NodeId implements InputType { - const factory InputType_NodeId({required final String nodeId}) = - _$InputType_NodeIdImpl; - - String get nodeId; - @JsonKey(ignore: true) - _$$InputType_NodeIdImplCopyWith<_$InputType_NodeIdImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_UrlImplCopyWith<$Res> { - factory _$$InputType_UrlImplCopyWith( - _$InputType_UrlImpl value, $Res Function(_$InputType_UrlImpl) then) = - __$$InputType_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({String url}); -} - -/// @nodoc -class __$$InputType_UrlImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_UrlImpl> - implements _$$InputType_UrlImplCopyWith<$Res> { - __$$InputType_UrlImplCopyWithImpl( - _$InputType_UrlImpl _value, $Res Function(_$InputType_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? url = null, - }) { - return _then(_$InputType_UrlImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$InputType_UrlImpl implements InputType_Url { - const _$InputType_UrlImpl({required this.url}); - - @override - final String url; - - @override - String toString() { - return 'InputType.url(url: $url)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_UrlImpl && - (identical(other.url, url) || other.url == url)); - } - - @override - int get hashCode => Object.hash(runtimeType, url); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - __$$InputType_UrlImplCopyWithImpl<_$InputType_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return url(this.url); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return url?.call(this.url); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this.url); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class InputType_Url implements InputType { - const factory InputType_Url({required final String url}) = - _$InputType_UrlImpl; - - String get url; - @JsonKey(ignore: true) - _$$InputType_UrlImplCopyWith<_$InputType_UrlImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlPayImplCopyWith<$Res> { - factory _$$InputType_LnUrlPayImplCopyWith(_$InputType_LnUrlPayImpl value, - $Res Function(_$InputType_LnUrlPayImpl) then) = - __$$InputType_LnUrlPayImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlPayImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlPayImpl> - implements _$$InputType_LnUrlPayImplCopyWith<$Res> { - __$$InputType_LnUrlPayImplCopyWithImpl(_$InputType_LnUrlPayImpl _value, - $Res Function(_$InputType_LnUrlPayImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlPayImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlPayImpl implements InputType_LnUrlPay { - const _$InputType_LnUrlPayImpl({required this.data}); - - @override - final LnUrlPayRequestData data; - - @override - String toString() { - return 'InputType.lnUrlPay(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlPayImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - __$$InputType_LnUrlPayImplCopyWithImpl<_$InputType_LnUrlPayImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlPay(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlPay?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlPay(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlPay?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlPay != null) { - return lnUrlPay(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlPay implements InputType { - const factory InputType_LnUrlPay({required final LnUrlPayRequestData data}) = - _$InputType_LnUrlPayImpl; - - LnUrlPayRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlPayImplCopyWith<_$InputType_LnUrlPayImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - factory _$$InputType_LnUrlWithdrawImplCopyWith( - _$InputType_LnUrlWithdrawImpl value, - $Res Function(_$InputType_LnUrlWithdrawImpl) then) = - __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlWithdrawImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlWithdrawImpl> - implements _$$InputType_LnUrlWithdrawImplCopyWith<$Res> { - __$$InputType_LnUrlWithdrawImplCopyWithImpl( - _$InputType_LnUrlWithdrawImpl _value, - $Res Function(_$InputType_LnUrlWithdrawImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlWithdrawImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlWithdrawImpl implements InputType_LnUrlWithdraw { - const _$InputType_LnUrlWithdrawImpl({required this.data}); - - @override - final LnUrlWithdrawRequestData data; - - @override - String toString() { - return 'InputType.lnUrlWithdraw(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlWithdrawImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => __$$InputType_LnUrlWithdrawImplCopyWithImpl< - _$InputType_LnUrlWithdrawImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlWithdraw(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlWithdraw?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlWithdraw(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlWithdraw?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlWithdraw != null) { - return lnUrlWithdraw(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlWithdraw implements InputType { - const factory InputType_LnUrlWithdraw( - {required final LnUrlWithdrawRequestData data}) = - _$InputType_LnUrlWithdrawImpl; - - LnUrlWithdrawRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlWithdrawImplCopyWith<_$InputType_LnUrlWithdrawImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlAuthImplCopyWith<$Res> { - factory _$$InputType_LnUrlAuthImplCopyWith(_$InputType_LnUrlAuthImpl value, - $Res Function(_$InputType_LnUrlAuthImpl) then) = - __$$InputType_LnUrlAuthImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlAuthRequestData data}); -} - -/// @nodoc -class __$$InputType_LnUrlAuthImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlAuthImpl> - implements _$$InputType_LnUrlAuthImplCopyWith<$Res> { - __$$InputType_LnUrlAuthImplCopyWithImpl(_$InputType_LnUrlAuthImpl _value, - $Res Function(_$InputType_LnUrlAuthImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlAuthImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlAuthRequestData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlAuthImpl implements InputType_LnUrlAuth { - const _$InputType_LnUrlAuthImpl({required this.data}); - - @override - final LnUrlAuthRequestData data; - - @override - String toString() { - return 'InputType.lnUrlAuth(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlAuthImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - __$$InputType_LnUrlAuthImplCopyWithImpl<_$InputType_LnUrlAuthImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlAuth(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlAuth?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlAuth(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlAuth?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlAuth != null) { - return lnUrlAuth(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlAuth implements InputType { - const factory InputType_LnUrlAuth( - {required final LnUrlAuthRequestData data}) = _$InputType_LnUrlAuthImpl; - - LnUrlAuthRequestData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlAuthImplCopyWith<_$InputType_LnUrlAuthImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$InputType_LnUrlErrorImplCopyWith<$Res> { - factory _$$InputType_LnUrlErrorImplCopyWith(_$InputType_LnUrlErrorImpl value, - $Res Function(_$InputType_LnUrlErrorImpl) then) = - __$$InputType_LnUrlErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$InputType_LnUrlErrorImplCopyWithImpl<$Res> - extends _$InputTypeCopyWithImpl<$Res, _$InputType_LnUrlErrorImpl> - implements _$$InputType_LnUrlErrorImplCopyWith<$Res> { - __$$InputType_LnUrlErrorImplCopyWithImpl(_$InputType_LnUrlErrorImpl _value, - $Res Function(_$InputType_LnUrlErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$InputType_LnUrlErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$InputType_LnUrlErrorImpl implements InputType_LnUrlError { - const _$InputType_LnUrlErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'InputType.lnUrlError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$InputType_LnUrlErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => - __$$InputType_LnUrlErrorImplCopyWithImpl<_$InputType_LnUrlErrorImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(BitcoinAddressData address) bitcoinAddress, - required TResult Function(LNInvoice invoice) bolt11, - required TResult Function(String nodeId) nodeId, - required TResult Function(String url) url, - required TResult Function(LnUrlPayRequestData data) lnUrlPay, - required TResult Function(LnUrlWithdrawRequestData data) lnUrlWithdraw, - required TResult Function(LnUrlAuthRequestData data) lnUrlAuth, - required TResult Function(LnUrlErrorData data) lnUrlError, - }) { - return lnUrlError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(BitcoinAddressData address)? bitcoinAddress, - TResult? Function(LNInvoice invoice)? bolt11, - TResult? Function(String nodeId)? nodeId, - TResult? Function(String url)? url, - TResult? Function(LnUrlPayRequestData data)? lnUrlPay, - TResult? Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult? Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult? Function(LnUrlErrorData data)? lnUrlError, - }) { - return lnUrlError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(BitcoinAddressData address)? bitcoinAddress, - TResult Function(LNInvoice invoice)? bolt11, - TResult Function(String nodeId)? nodeId, - TResult Function(String url)? url, - TResult Function(LnUrlPayRequestData data)? lnUrlPay, - TResult Function(LnUrlWithdrawRequestData data)? lnUrlWithdraw, - TResult Function(LnUrlAuthRequestData data)? lnUrlAuth, - TResult Function(LnUrlErrorData data)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(InputType_BitcoinAddress value) bitcoinAddress, - required TResult Function(InputType_Bolt11 value) bolt11, - required TResult Function(InputType_NodeId value) nodeId, - required TResult Function(InputType_Url value) url, - required TResult Function(InputType_LnUrlPay value) lnUrlPay, - required TResult Function(InputType_LnUrlWithdraw value) lnUrlWithdraw, - required TResult Function(InputType_LnUrlAuth value) lnUrlAuth, - required TResult Function(InputType_LnUrlError value) lnUrlError, - }) { - return lnUrlError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult? Function(InputType_Bolt11 value)? bolt11, - TResult? Function(InputType_NodeId value)? nodeId, - TResult? Function(InputType_Url value)? url, - TResult? Function(InputType_LnUrlPay value)? lnUrlPay, - TResult? Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult? Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult? Function(InputType_LnUrlError value)? lnUrlError, - }) { - return lnUrlError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(InputType_BitcoinAddress value)? bitcoinAddress, - TResult Function(InputType_Bolt11 value)? bolt11, - TResult Function(InputType_NodeId value)? nodeId, - TResult Function(InputType_Url value)? url, - TResult Function(InputType_LnUrlPay value)? lnUrlPay, - TResult Function(InputType_LnUrlWithdraw value)? lnUrlWithdraw, - TResult Function(InputType_LnUrlAuth value)? lnUrlAuth, - TResult Function(InputType_LnUrlError value)? lnUrlError, - required TResult orElse(), - }) { - if (lnUrlError != null) { - return lnUrlError(this); - } - return orElse(); - } -} - -abstract class InputType_LnUrlError implements InputType { - const factory InputType_LnUrlError({required final LnUrlErrorData data}) = - _$InputType_LnUrlErrorImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$InputType_LnUrlErrorImplCopyWith<_$InputType_LnUrlErrorImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlCallbackStatus { - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlCallbackStatusCopyWith<$Res> { - factory $LnUrlCallbackStatusCopyWith( - LnUrlCallbackStatus value, $Res Function(LnUrlCallbackStatus) then) = - _$LnUrlCallbackStatusCopyWithImpl<$Res, LnUrlCallbackStatus>; -} - -/// @nodoc -class _$LnUrlCallbackStatusCopyWithImpl<$Res, $Val extends LnUrlCallbackStatus> - implements $LnUrlCallbackStatusCopyWith<$Res> { - _$LnUrlCallbackStatusCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_OkImplCopyWith( - _$LnUrlCallbackStatus_OkImpl value, - $Res Function(_$LnUrlCallbackStatus_OkImpl) then) = - __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res>; -} - -/// @nodoc -class __$$LnUrlCallbackStatus_OkImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, - _$LnUrlCallbackStatus_OkImpl> - implements _$$LnUrlCallbackStatus_OkImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_OkImplCopyWithImpl( - _$LnUrlCallbackStatus_OkImpl _value, - $Res Function(_$LnUrlCallbackStatus_OkImpl) _then) - : super(_value, _then); -} - -/// @nodoc - -class _$LnUrlCallbackStatus_OkImpl implements LnUrlCallbackStatus_Ok { - const _$LnUrlCallbackStatus_OkImpl(); - - @override - String toString() { - return 'LnUrlCallbackStatus.ok()'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_OkImpl); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_Ok implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_Ok() = _$LnUrlCallbackStatus_OkImpl; -} - -/// @nodoc -abstract class _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith( - _$LnUrlCallbackStatus_ErrorStatusImpl value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) then) = - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlCallbackStatusCopyWithImpl<$Res, - _$LnUrlCallbackStatus_ErrorStatusImpl> - implements _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl( - _$LnUrlCallbackStatus_ErrorStatusImpl _value, - $Res Function(_$LnUrlCallbackStatus_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlCallbackStatus_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlCallbackStatus_ErrorStatusImpl - implements LnUrlCallbackStatus_ErrorStatus { - const _$LnUrlCallbackStatus_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlCallbackStatus.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlCallbackStatus_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< - _$LnUrlCallbackStatus_ErrorStatusImpl> - get copyWith => __$$LnUrlCallbackStatus_ErrorStatusImplCopyWithImpl< - _$LnUrlCallbackStatus_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function() ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function()? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function()? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlCallbackStatus_Ok value) ok, - required TResult Function(LnUrlCallbackStatus_ErrorStatus value) - errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlCallbackStatus_Ok value)? ok, - TResult? Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlCallbackStatus_Ok value)? ok, - TResult Function(LnUrlCallbackStatus_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlCallbackStatus_ErrorStatus implements LnUrlCallbackStatus { - const factory LnUrlCallbackStatus_ErrorStatus( - {required final LnUrlErrorData data}) = - _$LnUrlCallbackStatus_ErrorStatusImpl; - - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlCallbackStatus_ErrorStatusImplCopyWith< - _$LnUrlCallbackStatus_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlPayResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlPayResultCopyWith<$Res> { - factory $LnUrlPayResultCopyWith( - LnUrlPayResult value, $Res Function(LnUrlPayResult) then) = - _$LnUrlPayResultCopyWithImpl<$Res, LnUrlPayResult>; -} - -/// @nodoc -class _$LnUrlPayResultCopyWithImpl<$Res, $Val extends LnUrlPayResult> - implements $LnUrlPayResultCopyWith<$Res> { - _$LnUrlPayResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointSuccessImplCopyWith( - _$LnUrlPayResult_EndpointSuccessImpl value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) then) = - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPaySuccessData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, - _$LnUrlPayResult_EndpointSuccessImpl> - implements _$$LnUrlPayResult_EndpointSuccessImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl( - _$LnUrlPayResult_EndpointSuccessImpl _value, - $Res Function(_$LnUrlPayResult_EndpointSuccessImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointSuccessImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPaySuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointSuccessImpl - implements LnUrlPayResult_EndpointSuccess { - const _$LnUrlPayResult_EndpointSuccessImpl({required this.data}); - - @override - final LnUrlPaySuccessData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointSuccess(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointSuccessImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointSuccessImplCopyWith< - _$LnUrlPayResult_EndpointSuccessImpl> - get copyWith => __$$LnUrlPayResult_EndpointSuccessImplCopyWithImpl< - _$LnUrlPayResult_EndpointSuccessImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointSuccess(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointSuccess?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointSuccess(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointSuccess?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointSuccess != null) { - return endpointSuccess(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointSuccess implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointSuccess( - {required final LnUrlPaySuccessData data}) = - _$LnUrlPayResult_EndpointSuccessImpl; - - @override - LnUrlPaySuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointSuccessImplCopyWith< - _$LnUrlPayResult_EndpointSuccessImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_EndpointErrorImplCopyWith( - _$LnUrlPayResult_EndpointErrorImpl value, - $Res Function(_$LnUrlPayResult_EndpointErrorImpl) then) = - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, - _$LnUrlPayResult_EndpointErrorImpl> - implements _$$LnUrlPayResult_EndpointErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl( - _$LnUrlPayResult_EndpointErrorImpl _value, - $Res Function(_$LnUrlPayResult_EndpointErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_EndpointErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_EndpointErrorImpl - implements LnUrlPayResult_EndpointError { - const _$LnUrlPayResult_EndpointErrorImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.endpointError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_EndpointErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_EndpointErrorImplCopyWith< - _$LnUrlPayResult_EndpointErrorImpl> - get copyWith => __$$LnUrlPayResult_EndpointErrorImplCopyWithImpl< - _$LnUrlPayResult_EndpointErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return endpointError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return endpointError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return endpointError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return endpointError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (endpointError != null) { - return endpointError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_EndpointError implements LnUrlPayResult { - const factory LnUrlPayResult_EndpointError( - {required final LnUrlErrorData data}) = - _$LnUrlPayResult_EndpointErrorImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_EndpointErrorImplCopyWith< - _$LnUrlPayResult_EndpointErrorImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - factory _$$LnUrlPayResult_PayErrorImplCopyWith( - _$LnUrlPayResult_PayErrorImpl value, - $Res Function(_$LnUrlPayResult_PayErrorImpl) then) = - __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlPayErrorData data}); -} - -/// @nodoc -class __$$LnUrlPayResult_PayErrorImplCopyWithImpl<$Res> - extends _$LnUrlPayResultCopyWithImpl<$Res, _$LnUrlPayResult_PayErrorImpl> - implements _$$LnUrlPayResult_PayErrorImplCopyWith<$Res> { - __$$LnUrlPayResult_PayErrorImplCopyWithImpl( - _$LnUrlPayResult_PayErrorImpl _value, - $Res Function(_$LnUrlPayResult_PayErrorImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlPayResult_PayErrorImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlPayErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlPayResult_PayErrorImpl implements LnUrlPayResult_PayError { - const _$LnUrlPayResult_PayErrorImpl({required this.data}); - - @override - final LnUrlPayErrorData data; - - @override - String toString() { - return 'LnUrlPayResult.payError(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlPayResult_PayErrorImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> - get copyWith => __$$LnUrlPayResult_PayErrorImplCopyWithImpl< - _$LnUrlPayResult_PayErrorImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlPaySuccessData data) endpointSuccess, - required TResult Function(LnUrlErrorData data) endpointError, - required TResult Function(LnUrlPayErrorData data) payError, - }) { - return payError(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult? Function(LnUrlErrorData data)? endpointError, - TResult? Function(LnUrlPayErrorData data)? payError, - }) { - return payError?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlPaySuccessData data)? endpointSuccess, - TResult Function(LnUrlErrorData data)? endpointError, - TResult Function(LnUrlPayErrorData data)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlPayResult_EndpointSuccess value) - endpointSuccess, - required TResult Function(LnUrlPayResult_EndpointError value) endpointError, - required TResult Function(LnUrlPayResult_PayError value) payError, - }) { - return payError(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult? Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult? Function(LnUrlPayResult_PayError value)? payError, - }) { - return payError?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlPayResult_EndpointSuccess value)? endpointSuccess, - TResult Function(LnUrlPayResult_EndpointError value)? endpointError, - TResult Function(LnUrlPayResult_PayError value)? payError, - required TResult orElse(), - }) { - if (payError != null) { - return payError(this); - } - return orElse(); - } -} - -abstract class LnUrlPayResult_PayError implements LnUrlPayResult { - const factory LnUrlPayResult_PayError( - {required final LnUrlPayErrorData data}) = _$LnUrlPayResult_PayErrorImpl; - - @override - LnUrlPayErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlPayResult_PayErrorImplCopyWith<_$LnUrlPayResult_PayErrorImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$LnUrlWithdrawResult { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $LnUrlWithdrawResultCopyWith<$Res> { - factory $LnUrlWithdrawResultCopyWith( - LnUrlWithdrawResult value, $Res Function(LnUrlWithdrawResult) then) = - _$LnUrlWithdrawResultCopyWithImpl<$Res, LnUrlWithdrawResult>; -} - -/// @nodoc -class _$LnUrlWithdrawResultCopyWithImpl<$Res, $Val extends LnUrlWithdrawResult> - implements $LnUrlWithdrawResultCopyWith<$Res> { - _$LnUrlWithdrawResultCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_OkImplCopyWith( - _$LnUrlWithdrawResult_OkImpl value, - $Res Function(_$LnUrlWithdrawResult_OkImpl) then) = - __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlWithdrawSuccessData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_OkImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, - _$LnUrlWithdrawResult_OkImpl> - implements _$$LnUrlWithdrawResult_OkImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_OkImplCopyWithImpl( - _$LnUrlWithdrawResult_OkImpl _value, - $Res Function(_$LnUrlWithdrawResult_OkImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_OkImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlWithdrawSuccessData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_OkImpl implements LnUrlWithdrawResult_Ok { - const _$LnUrlWithdrawResult_OkImpl({required this.data}); - - @override - final LnUrlWithdrawSuccessData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.ok(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_OkImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> - get copyWith => __$$LnUrlWithdrawResult_OkImplCopyWithImpl< - _$LnUrlWithdrawResult_OkImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return ok(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return ok?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, - }) { - return ok(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return ok?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (ok != null) { - return ok(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_Ok implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_Ok( - {required final LnUrlWithdrawSuccessData data}) = - _$LnUrlWithdrawResult_OkImpl; - - @override - LnUrlWithdrawSuccessData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_OkImplCopyWith<_$LnUrlWithdrawResult_OkImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - factory _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith( - _$LnUrlWithdrawResult_ErrorStatusImpl value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) then) = - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res>; - @useResult - $Res call({LnUrlErrorData data}); -} - -/// @nodoc -class __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl<$Res> - extends _$LnUrlWithdrawResultCopyWithImpl<$Res, - _$LnUrlWithdrawResult_ErrorStatusImpl> - implements _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith<$Res> { - __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl( - _$LnUrlWithdrawResult_ErrorStatusImpl _value, - $Res Function(_$LnUrlWithdrawResult_ErrorStatusImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$LnUrlWithdrawResult_ErrorStatusImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnUrlErrorData, - )); - } -} - -/// @nodoc - -class _$LnUrlWithdrawResult_ErrorStatusImpl - implements LnUrlWithdrawResult_ErrorStatus { - const _$LnUrlWithdrawResult_ErrorStatusImpl({required this.data}); - - @override - final LnUrlErrorData data; - - @override - String toString() { - return 'LnUrlWithdrawResult.errorStatus(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LnUrlWithdrawResult_ErrorStatusImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< - _$LnUrlWithdrawResult_ErrorStatusImpl> - get copyWith => __$$LnUrlWithdrawResult_ErrorStatusImplCopyWithImpl< - _$LnUrlWithdrawResult_ErrorStatusImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnUrlWithdrawSuccessData data) ok, - required TResult Function(LnUrlErrorData data) errorStatus, - }) { - return errorStatus(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnUrlWithdrawSuccessData data)? ok, - TResult? Function(LnUrlErrorData data)? errorStatus, - }) { - return errorStatus?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnUrlWithdrawSuccessData data)? ok, - TResult Function(LnUrlErrorData data)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(LnUrlWithdrawResult_Ok value) ok, - required TResult Function(LnUrlWithdrawResult_ErrorStatus value) - errorStatus, - }) { - return errorStatus(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(LnUrlWithdrawResult_Ok value)? ok, - TResult? Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - }) { - return errorStatus?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(LnUrlWithdrawResult_Ok value)? ok, - TResult Function(LnUrlWithdrawResult_ErrorStatus value)? errorStatus, - required TResult orElse(), - }) { - if (errorStatus != null) { - return errorStatus(this); - } - return orElse(); - } -} - -abstract class LnUrlWithdrawResult_ErrorStatus implements LnUrlWithdrawResult { - const factory LnUrlWithdrawResult_ErrorStatus( - {required final LnUrlErrorData data}) = - _$LnUrlWithdrawResult_ErrorStatusImpl; - - @override - LnUrlErrorData get data; - @JsonKey(ignore: true) - _$$LnUrlWithdrawResult_ErrorStatusImplCopyWith< - _$LnUrlWithdrawResult_ErrorStatusImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeConfig { - GreenlightNodeConfig get config => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeConfigCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeConfigCopyWith<$Res> { - factory $NodeConfigCopyWith( - NodeConfig value, $Res Function(NodeConfig) then) = - _$NodeConfigCopyWithImpl<$Res, NodeConfig>; - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class _$NodeConfigCopyWithImpl<$Res, $Val extends NodeConfig> - implements $NodeConfigCopyWith<$Res> { - _$NodeConfigCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_value.copyWith( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeConfig_GreenlightImplCopyWith<$Res> - implements $NodeConfigCopyWith<$Res> { - factory _$$NodeConfig_GreenlightImplCopyWith( - _$NodeConfig_GreenlightImpl value, - $Res Function(_$NodeConfig_GreenlightImpl) then) = - __$$NodeConfig_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightNodeConfig config}); -} - -/// @nodoc -class __$$NodeConfig_GreenlightImplCopyWithImpl<$Res> - extends _$NodeConfigCopyWithImpl<$Res, _$NodeConfig_GreenlightImpl> - implements _$$NodeConfig_GreenlightImplCopyWith<$Res> { - __$$NodeConfig_GreenlightImplCopyWithImpl(_$NodeConfig_GreenlightImpl _value, - $Res Function(_$NodeConfig_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_$NodeConfig_GreenlightImpl( - config: null == config - ? _value.config - : config // ignore: cast_nullable_to_non_nullable - as GreenlightNodeConfig, - )); - } -} - -/// @nodoc - -class _$NodeConfig_GreenlightImpl implements NodeConfig_Greenlight { - const _$NodeConfig_GreenlightImpl({required this.config}); - - @override - final GreenlightNodeConfig config; - - @override - String toString() { - return 'NodeConfig.greenlight(config: $config)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeConfig_GreenlightImpl && - (identical(other.config, config) || other.config == config)); - } - - @override - int get hashCode => Object.hash(runtimeType, config); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> - get copyWith => __$$NodeConfig_GreenlightImplCopyWithImpl< - _$NodeConfig_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightNodeConfig config) greenlight, - }) { - return greenlight(config); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightNodeConfig config)? greenlight, - }) { - return greenlight?.call(config); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightNodeConfig config)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(config); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeConfig_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeConfig_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeConfig_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeConfig_Greenlight implements NodeConfig { - const factory NodeConfig_Greenlight( - {required final GreenlightNodeConfig config}) = - _$NodeConfig_GreenlightImpl; - - @override - GreenlightNodeConfig get config; - @override - @JsonKey(ignore: true) - _$$NodeConfig_GreenlightImplCopyWith<_$NodeConfig_GreenlightImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$NodeCredentials { - GreenlightCredentials get credentials => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightCredentials credentials) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightCredentials credentials)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightCredentials credentials)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $NodeCredentialsCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $NodeCredentialsCopyWith<$Res> { - factory $NodeCredentialsCopyWith( - NodeCredentials value, $Res Function(NodeCredentials) then) = - _$NodeCredentialsCopyWithImpl<$Res, NodeCredentials>; - @useResult - $Res call({GreenlightCredentials credentials}); -} - -/// @nodoc -class _$NodeCredentialsCopyWithImpl<$Res, $Val extends NodeCredentials> - implements $NodeCredentialsCopyWith<$Res> { - _$NodeCredentialsCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? credentials = null, - }) { - return _then(_value.copyWith( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightCredentials, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$NodeCredentials_GreenlightImplCopyWith<$Res> - implements $NodeCredentialsCopyWith<$Res> { - factory _$$NodeCredentials_GreenlightImplCopyWith( - _$NodeCredentials_GreenlightImpl value, - $Res Function(_$NodeCredentials_GreenlightImpl) then) = - __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({GreenlightCredentials credentials}); -} - -/// @nodoc -class __$$NodeCredentials_GreenlightImplCopyWithImpl<$Res> - extends _$NodeCredentialsCopyWithImpl<$Res, - _$NodeCredentials_GreenlightImpl> - implements _$$NodeCredentials_GreenlightImplCopyWith<$Res> { - __$$NodeCredentials_GreenlightImplCopyWithImpl( - _$NodeCredentials_GreenlightImpl _value, - $Res Function(_$NodeCredentials_GreenlightImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? credentials = null, - }) { - return _then(_$NodeCredentials_GreenlightImpl( - credentials: null == credentials - ? _value.credentials - : credentials // ignore: cast_nullable_to_non_nullable - as GreenlightCredentials, - )); - } -} - -/// @nodoc - -class _$NodeCredentials_GreenlightImpl implements NodeCredentials_Greenlight { - const _$NodeCredentials_GreenlightImpl({required this.credentials}); - - @override - final GreenlightCredentials credentials; - - @override - String toString() { - return 'NodeCredentials.greenlight(credentials: $credentials)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$NodeCredentials_GreenlightImpl && - (identical(other.credentials, credentials) || - other.credentials == credentials)); - } - - @override - int get hashCode => Object.hash(runtimeType, credentials); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> - get copyWith => __$$NodeCredentials_GreenlightImplCopyWithImpl< - _$NodeCredentials_GreenlightImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(GreenlightCredentials credentials) greenlight, - }) { - return greenlight(credentials); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(GreenlightCredentials credentials)? greenlight, - }) { - return greenlight?.call(credentials); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(GreenlightCredentials credentials)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(credentials); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(NodeCredentials_Greenlight value) greenlight, - }) { - return greenlight(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(NodeCredentials_Greenlight value)? greenlight, - }) { - return greenlight?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(NodeCredentials_Greenlight value)? greenlight, - required TResult orElse(), - }) { - if (greenlight != null) { - return greenlight(this); - } - return orElse(); - } -} - -abstract class NodeCredentials_Greenlight implements NodeCredentials { - const factory NodeCredentials_Greenlight( - {required final GreenlightCredentials credentials}) = - _$NodeCredentials_GreenlightImpl; - - @override - GreenlightCredentials get credentials; - @override - @JsonKey(ignore: true) - _$$NodeCredentials_GreenlightImplCopyWith<_$NodeCredentials_GreenlightImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$PaymentDetails { - Object get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PaymentDetailsCopyWith<$Res> { - factory $PaymentDetailsCopyWith( - PaymentDetails value, $Res Function(PaymentDetails) then) = - _$PaymentDetailsCopyWithImpl<$Res, PaymentDetails>; -} - -/// @nodoc -class _$PaymentDetailsCopyWithImpl<$Res, $Val extends PaymentDetails> - implements $PaymentDetailsCopyWith<$Res> { - _$PaymentDetailsCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$PaymentDetails_LnImplCopyWith<$Res> { - factory _$$PaymentDetails_LnImplCopyWith(_$PaymentDetails_LnImpl value, - $Res Function(_$PaymentDetails_LnImpl) then) = - __$$PaymentDetails_LnImplCopyWithImpl<$Res>; - @useResult - $Res call({LnPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_LnImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, _$PaymentDetails_LnImpl> - implements _$$PaymentDetails_LnImplCopyWith<$Res> { - __$$PaymentDetails_LnImplCopyWithImpl(_$PaymentDetails_LnImpl _value, - $Res Function(_$PaymentDetails_LnImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_LnImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as LnPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_LnImpl implements PaymentDetails_Ln { - const _$PaymentDetails_LnImpl({required this.data}); - - @override - final LnPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.ln(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_LnImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - __$$PaymentDetails_LnImplCopyWithImpl<_$PaymentDetails_LnImpl>( - this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return ln(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return ln?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return ln(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return ln?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (ln != null) { - return ln(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_Ln implements PaymentDetails { - const factory PaymentDetails_Ln({required final LnPaymentDetails data}) = - _$PaymentDetails_LnImpl; - - @override - LnPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_LnImplCopyWith<_$PaymentDetails_LnImpl> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - factory _$$PaymentDetails_ClosedChannelImplCopyWith( - _$PaymentDetails_ClosedChannelImpl value, - $Res Function(_$PaymentDetails_ClosedChannelImpl) then) = - __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res>; - @useResult - $Res call({ClosedChannelPaymentDetails data}); -} - -/// @nodoc -class __$$PaymentDetails_ClosedChannelImplCopyWithImpl<$Res> - extends _$PaymentDetailsCopyWithImpl<$Res, - _$PaymentDetails_ClosedChannelImpl> - implements _$$PaymentDetails_ClosedChannelImplCopyWith<$Res> { - __$$PaymentDetails_ClosedChannelImplCopyWithImpl( - _$PaymentDetails_ClosedChannelImpl _value, - $Res Function(_$PaymentDetails_ClosedChannelImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$PaymentDetails_ClosedChannelImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ClosedChannelPaymentDetails, - )); - } -} - -/// @nodoc - -class _$PaymentDetails_ClosedChannelImpl - implements PaymentDetails_ClosedChannel { - const _$PaymentDetails_ClosedChannelImpl({required this.data}); - - @override - final ClosedChannelPaymentDetails data; - - @override - String toString() { - return 'PaymentDetails.closedChannel(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PaymentDetails_ClosedChannelImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$PaymentDetails_ClosedChannelImplCopyWith< - _$PaymentDetails_ClosedChannelImpl> - get copyWith => __$$PaymentDetails_ClosedChannelImplCopyWithImpl< - _$PaymentDetails_ClosedChannelImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(LnPaymentDetails data) ln, - required TResult Function(ClosedChannelPaymentDetails data) closedChannel, - }) { - return closedChannel(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(LnPaymentDetails data)? ln, - TResult? Function(ClosedChannelPaymentDetails data)? closedChannel, - }) { - return closedChannel?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(LnPaymentDetails data)? ln, - TResult Function(ClosedChannelPaymentDetails data)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(PaymentDetails_Ln value) ln, - required TResult Function(PaymentDetails_ClosedChannel value) closedChannel, - }) { - return closedChannel(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(PaymentDetails_Ln value)? ln, - TResult? Function(PaymentDetails_ClosedChannel value)? closedChannel, - }) { - return closedChannel?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(PaymentDetails_Ln value)? ln, - TResult Function(PaymentDetails_ClosedChannel value)? closedChannel, - required TResult orElse(), - }) { - if (closedChannel != null) { - return closedChannel(this); - } - return orElse(); - } -} - -abstract class PaymentDetails_ClosedChannel implements PaymentDetails { - const factory PaymentDetails_ClosedChannel( - {required final ClosedChannelPaymentDetails data}) = - _$PaymentDetails_ClosedChannelImpl; - - @override - ClosedChannelPaymentDetails get data; - @JsonKey(ignore: true) - _$$PaymentDetails_ClosedChannelImplCopyWith< - _$PaymentDetails_ClosedChannelImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$ReportIssueRequest { - ReportPaymentFailureDetails get data => throw _privateConstructorUsedError; - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) - paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ReportIssueRequestCopyWith get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ReportIssueRequestCopyWith<$Res> { - factory $ReportIssueRequestCopyWith( - ReportIssueRequest value, $Res Function(ReportIssueRequest) then) = - _$ReportIssueRequestCopyWithImpl<$Res, ReportIssueRequest>; - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class _$ReportIssueRequestCopyWithImpl<$Res, $Val extends ReportIssueRequest> - implements $ReportIssueRequestCopyWith<$Res> { - _$ReportIssueRequestCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> - implements $ReportIssueRequestCopyWith<$Res> { - factory _$$ReportIssueRequest_PaymentFailureImplCopyWith( - _$ReportIssueRequest_PaymentFailureImpl value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) then) = - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res>; - @override - @useResult - $Res call({ReportPaymentFailureDetails data}); -} - -/// @nodoc -class __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl<$Res> - extends _$ReportIssueRequestCopyWithImpl<$Res, - _$ReportIssueRequest_PaymentFailureImpl> - implements _$$ReportIssueRequest_PaymentFailureImplCopyWith<$Res> { - __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl( - _$ReportIssueRequest_PaymentFailureImpl _value, - $Res Function(_$ReportIssueRequest_PaymentFailureImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$ReportIssueRequest_PaymentFailureImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as ReportPaymentFailureDetails, - )); - } -} - -/// @nodoc - -class _$ReportIssueRequest_PaymentFailureImpl - implements ReportIssueRequest_PaymentFailure { - const _$ReportIssueRequest_PaymentFailureImpl({required this.data}); - - @override - final ReportPaymentFailureDetails data; - - @override - String toString() { - return 'ReportIssueRequest.paymentFailure(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ReportIssueRequest_PaymentFailureImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$ReportIssueRequest_PaymentFailureImplCopyWith< - _$ReportIssueRequest_PaymentFailureImpl> - get copyWith => __$$ReportIssueRequest_PaymentFailureImplCopyWithImpl< - _$ReportIssueRequest_PaymentFailureImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(ReportPaymentFailureDetails data) paymentFailure, - }) { - return paymentFailure(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(ReportPaymentFailureDetails data)? paymentFailure, - }) { - return paymentFailure?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(ReportPaymentFailureDetails data)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(ReportIssueRequest_PaymentFailure value) - paymentFailure, - }) { - return paymentFailure(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - }) { - return paymentFailure?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(ReportIssueRequest_PaymentFailure value)? paymentFailure, - required TResult orElse(), - }) { - if (paymentFailure != null) { - return paymentFailure(this); - } - return orElse(); - } -} - -abstract class ReportIssueRequest_PaymentFailure implements ReportIssueRequest { - const factory ReportIssueRequest_PaymentFailure( - {required final ReportPaymentFailureDetails data}) = - _$ReportIssueRequest_PaymentFailureImpl; - - @override - ReportPaymentFailureDetails get data; - @override - @JsonKey(ignore: true) - _$$ReportIssueRequest_PaymentFailureImplCopyWith< - _$ReportIssueRequest_PaymentFailureImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -mixin _$SuccessActionProcessed { - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $SuccessActionProcessedCopyWith<$Res> { - factory $SuccessActionProcessedCopyWith(SuccessActionProcessed value, - $Res Function(SuccessActionProcessed) then) = - _$SuccessActionProcessedCopyWithImpl<$Res, SuccessActionProcessed>; -} - -/// @nodoc -class _$SuccessActionProcessedCopyWithImpl<$Res, - $Val extends SuccessActionProcessed> - implements $SuccessActionProcessedCopyWith<$Res> { - _$SuccessActionProcessedCopyWithImpl(this._value, this._then); - - // ignore: unused_field - final $Val _value; - // ignore: unused_field - final $Res Function($Val) _then; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_AesImplCopyWith( - _$SuccessActionProcessed_AesImpl value, - $Res Function(_$SuccessActionProcessed_AesImpl) then) = - __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res>; - @useResult - $Res call({AesSuccessActionDataResult result}); - - $AesSuccessActionDataResultCopyWith<$Res> get result; -} - -/// @nodoc -class __$$SuccessActionProcessed_AesImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_AesImpl> - implements _$$SuccessActionProcessed_AesImplCopyWith<$Res> { - __$$SuccessActionProcessed_AesImplCopyWithImpl( - _$SuccessActionProcessed_AesImpl _value, - $Res Function(_$SuccessActionProcessed_AesImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? result = null, - }) { - return _then(_$SuccessActionProcessed_AesImpl( - result: null == result - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as AesSuccessActionDataResult, - )); - } - - @override - @pragma('vm:prefer-inline') - $AesSuccessActionDataResultCopyWith<$Res> get result { - return $AesSuccessActionDataResultCopyWith<$Res>(_value.result, (value) { - return _then(_value.copyWith(result: value)); - }); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_AesImpl implements SuccessActionProcessed_Aes { - const _$SuccessActionProcessed_AesImpl({required this.result}); - - @override - final AesSuccessActionDataResult result; - - @override - String toString() { - return 'SuccessActionProcessed.aes(result: $result)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_AesImpl && - (identical(other.result, result) || other.result == result)); - } - - @override - int get hashCode => Object.hash(runtimeType, result); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> - get copyWith => __$$SuccessActionProcessed_AesImplCopyWithImpl< - _$SuccessActionProcessed_AesImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return aes(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return aes?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return aes(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return aes?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (aes != null) { - return aes(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Aes implements SuccessActionProcessed { - const factory SuccessActionProcessed_Aes( - {required final AesSuccessActionDataResult result}) = - _$SuccessActionProcessed_AesImpl; - - AesSuccessActionDataResult get result; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_AesImplCopyWith<_$SuccessActionProcessed_AesImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_MessageImplCopyWith( - _$SuccessActionProcessed_MessageImpl value, - $Res Function(_$SuccessActionProcessed_MessageImpl) then) = - __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res>; - @useResult - $Res call({MessageSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_MessageImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_MessageImpl> - implements _$$SuccessActionProcessed_MessageImplCopyWith<$Res> { - __$$SuccessActionProcessed_MessageImplCopyWithImpl( - _$SuccessActionProcessed_MessageImpl _value, - $Res Function(_$SuccessActionProcessed_MessageImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_MessageImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as MessageSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_MessageImpl - implements SuccessActionProcessed_Message { - const _$SuccessActionProcessed_MessageImpl({required this.data}); - - @override - final MessageSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.message(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_MessageImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_MessageImplCopyWith< - _$SuccessActionProcessed_MessageImpl> - get copyWith => __$$SuccessActionProcessed_MessageImplCopyWithImpl< - _$SuccessActionProcessed_MessageImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return message(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return message?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return message(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return message?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (message != null) { - return message(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Message - implements SuccessActionProcessed { - const factory SuccessActionProcessed_Message( - {required final MessageSuccessActionData data}) = - _$SuccessActionProcessed_MessageImpl; - - MessageSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_MessageImplCopyWith< - _$SuccessActionProcessed_MessageImpl> - get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - factory _$$SuccessActionProcessed_UrlImplCopyWith( - _$SuccessActionProcessed_UrlImpl value, - $Res Function(_$SuccessActionProcessed_UrlImpl) then) = - __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res>; - @useResult - $Res call({UrlSuccessActionData data}); -} - -/// @nodoc -class __$$SuccessActionProcessed_UrlImplCopyWithImpl<$Res> - extends _$SuccessActionProcessedCopyWithImpl<$Res, - _$SuccessActionProcessed_UrlImpl> - implements _$$SuccessActionProcessed_UrlImplCopyWith<$Res> { - __$$SuccessActionProcessed_UrlImplCopyWithImpl( - _$SuccessActionProcessed_UrlImpl _value, - $Res Function(_$SuccessActionProcessed_UrlImpl) _then) - : super(_value, _then); - - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? data = null, - }) { - return _then(_$SuccessActionProcessed_UrlImpl( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as UrlSuccessActionData, - )); - } -} - -/// @nodoc - -class _$SuccessActionProcessed_UrlImpl implements SuccessActionProcessed_Url { - const _$SuccessActionProcessed_UrlImpl({required this.data}); - - @override - final UrlSuccessActionData data; - - @override - String toString() { - return 'SuccessActionProcessed.url(data: $data)'; - } - - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessActionProcessed_UrlImpl && - (identical(other.data, data) || other.data == data)); - } - - @override - int get hashCode => Object.hash(runtimeType, data); - - @JsonKey(ignore: true) - @override - @pragma('vm:prefer-inline') - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> - get copyWith => __$$SuccessActionProcessed_UrlImplCopyWithImpl< - _$SuccessActionProcessed_UrlImpl>(this, _$identity); - - @override - @optionalTypeArgs - TResult when({ - required TResult Function(AesSuccessActionDataResult result) aes, - required TResult Function(MessageSuccessActionData data) message, - required TResult Function(UrlSuccessActionData data) url, - }) { - return url(data); - } - - @override - @optionalTypeArgs - TResult? whenOrNull({ - TResult? Function(AesSuccessActionDataResult result)? aes, - TResult? Function(MessageSuccessActionData data)? message, - TResult? Function(UrlSuccessActionData data)? url, - }) { - return url?.call(data); - } - - @override - @optionalTypeArgs - TResult maybeWhen({ - TResult Function(AesSuccessActionDataResult result)? aes, - TResult Function(MessageSuccessActionData data)? message, - TResult Function(UrlSuccessActionData data)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(data); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map({ - required TResult Function(SuccessActionProcessed_Aes value) aes, - required TResult Function(SuccessActionProcessed_Message value) message, - required TResult Function(SuccessActionProcessed_Url value) url, - }) { - return url(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull({ - TResult? Function(SuccessActionProcessed_Aes value)? aes, - TResult? Function(SuccessActionProcessed_Message value)? message, - TResult? Function(SuccessActionProcessed_Url value)? url, - }) { - return url?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap({ - TResult Function(SuccessActionProcessed_Aes value)? aes, - TResult Function(SuccessActionProcessed_Message value)? message, - TResult Function(SuccessActionProcessed_Url value)? url, - required TResult orElse(), - }) { - if (url != null) { - return url(this); - } - return orElse(); - } -} - -abstract class SuccessActionProcessed_Url implements SuccessActionProcessed { - const factory SuccessActionProcessed_Url( - {required final UrlSuccessActionData data}) = - _$SuccessActionProcessed_UrlImpl; - - UrlSuccessActionData get data; - @JsonKey(ignore: true) - _$$SuccessActionProcessed_UrlImplCopyWith<_$SuccessActionProcessed_UrlImpl> - get copyWith => throw _privateConstructorUsedError; -} diff --git a/libs/sdk-flutter/lib/generated/binding.dart b/libs/sdk-flutter/lib/generated/binding.dart index 40a27f5fb..92a547bc9 100644 --- a/libs/sdk-flutter/lib/generated/binding.dart +++ b/libs/sdk-flutter/lib/generated/binding.dart @@ -5,6 +5,7 @@ import 'breez_services.dart'; import 'chain.dart'; +import 'error.dart'; import 'fiat.dart'; import 'frb_generated.dart'; import 'input_parser.dart'; @@ -18,37 +19,14 @@ import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; // The type `BindingLogger` is not used by any `pub` functions, thus it is ignored. /// Wrapper around [BreezServices::connect] which also initializes SDK logging -Future connect({required ConnectRequest req, dynamic hint}) => +Future connect({required ConnectRequest req, dynamic hint}) => BreezSdkBindings.instance.api.crateBindingConnect(req: req, hint: hint); -/// Check whether node service is initialized or not -Future isInitialized({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingIsInitialized(hint: hint); - -/// See [BreezServices::sync] -Future sync({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingSync(hint: hint); - -/// See [BreezServices::node_credentials] -Future nodeCredentials({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingNodeCredentials(hint: hint); - -/// See [BreezServices::node_info] -Future nodeInfo({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingNodeInfo(hint: hint); - -/// See [BreezServices::configure_node] -Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingConfigureNode(req: req, hint: hint); - -/// Cleanup node resources and stop the signer. -Future disconnect({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingDisconnect(hint: hint); - -/// See [BreezServices::sign_message] -Future signMessage({required SignMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSignMessage(req: req, hint: hint); +Future parseInvoice({required String invoice, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice, hint: hint); -/// See [BreezServices::check_message] -Future checkMessage({required CheckMessageRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingCheckMessage(req: req, hint: hint); +Future parseInput({required String input, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingParseInput(input: input, hint: hint); /// See [breez_services::mnemonic_to_seed] Future mnemonicToSeed({required String phrase, dynamic hint}) => @@ -79,183 +57,247 @@ Stream breezEventsStream({dynamic hint}) => Stream breezLogStream({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingBreezLogStream(hint: hint); -/// See [BreezServices::list_lsps] -Future> listLsps({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListLsps(hint: hint); - -/// See [BreezServices::connect_lsp] -Future connectLsp({required String lspId, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingConnectLsp(lspId: lspId, hint: hint); - -/// See [BreezServices::lsp_id] -Future lspId({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingLspId(hint: hint); - -/// See [BreezServices::fetch_lsp_info] -Future fetchLspInfo({required String id, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchLspInfo(id: id, hint: hint); - -/// See [BreezServices::lsp_info] -Future lspInfo({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLspInfo(hint: hint); - -/// See [BreezServices::close_lsp_channels] -Future closeLspChannels({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingCloseLspChannels(hint: hint); - -Future registerWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRegisterWebhook(webhookUrl: webhookUrl, hint: hint); - -Future unregisterWebhook({required String webhookUrl, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingUnregisterWebhook(webhookUrl: webhookUrl, hint: hint); - -/// See [BreezServices::backup] -Future backup({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingBackup(hint: hint); - -/// See [BreezServices::backup_status] -Future backupStatus({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBackupStatus(hint: hint); - -Future parseInvoice({required String invoice, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingParseInvoice(invoice: invoice, hint: hint); - -Future parseInput({required String input, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingParseInput(input: input, hint: hint); - -/// See [BreezServices::list_payments] -Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListPayments(req: req, hint: hint); - -/// See [BreezServices::list_payments] -Future paymentByHash({required String hash, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPaymentByHash(hash: hash, hint: hint); - -/// See [BreezServices::set_payment_metadata] -Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSetPaymentMetadata(hash: hash, metadata: metadata, hint: hint); - -/// See [BreezServices::send_payment] -Future sendPayment({required SendPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendPayment(req: req, hint: hint); - -/// See [BreezServices::send_spontaneous_payment] -Future sendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendSpontaneousPayment(req: req, hint: hint); - -/// See [BreezServices::receive_payment] -Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReceivePayment(req: req, hint: hint); - -/// See [BreezServices::lnurl_pay] -Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlPay(req: req, hint: hint); - -/// See [BreezServices::lnurl_withdraw] -Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlWithdraw(req: req, hint: hint); - -/// See [BreezServices::lnurl_auth] -Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingLnurlAuth(reqData: reqData, hint: hint); - -/// See [BreezServices::report_issue] -Future reportIssue({required ReportIssueRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReportIssue(req: req, hint: hint); - -/// See [BreezServices::fetch_fiat_rates] -Future> fetchFiatRates({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchFiatRates(hint: hint); - -/// See [BreezServices::list_fiat_currencies] -Future> listFiatCurrencies({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListFiatCurrencies(hint: hint); - -/// See [BreezServices::max_reverse_swap_amount] -Future maxReverseSwapAmount({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingMaxReverseSwapAmount(hint: hint); - -/// See [BreezServices::send_onchain] -Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingSendOnchain(req: req, hint: hint); - -/// See [BreezServices::pay_onchain] -Future payOnchain({required PayOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPayOnchain(req: req, hint: hint); - -/// See [BreezServices::receive_onchain] -Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingReceiveOnchain(req: req, hint: hint); - -/// See [BreezServices::buy_bitcoin] -Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingBuyBitcoin(req: req, hint: hint); - -/// See [BreezServices::redeem_onchain_funds] -Future redeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRedeemOnchainFunds(req: req, hint: hint); - -/// See [BreezServices::prepare_redeem_onchain_funds] -Future prepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareRedeemOnchainFunds(req: req, hint: hint); - -/// See [BreezServices::list_refundables] -Future> listRefundables({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingListRefundables(hint: hint); - -/// See [BreezServices::prepare_refund] -Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareRefund(req: req, hint: hint); - -/// See [BreezServices::refund] -Future refund({required RefundRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRefund(req: req, hint: hint); - -/// See [BreezServices::rescan_swaps] -Future rescanSwaps({dynamic hint}) => BreezSdkBindings.instance.api.crateBindingRescanSwaps(hint: hint); - -/// See [BreezServices::redeem_swap] -Future redeemSwap({required String swapAddress, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRedeemSwap(swapAddress: swapAddress, hint: hint); - -/// See [BreezServices::in_progress_swap] -Future inProgressSwap({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressSwap(hint: hint); - -/// See [BreezServices::in_progress_reverse_swaps] -Future> inProgressReverseSwaps({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressReverseSwaps(hint: hint); - -/// See [BreezServices::open_channel_fee] -Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingOpenChannelFee(req: req, hint: hint); - -/// See [BreezServices::fetch_reverse_swap_fees] -Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingFetchReverseSwapFees(req: req, hint: hint); - -/// See [BreezServices::onchain_payment_limits] -Future onchainPaymentLimits({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingOnchainPaymentLimits(hint: hint); - -/// See [BreezServices::prepare_onchain_payment] -Future prepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingPrepareOnchainPayment(req: req, hint: hint); - -/// See [BreezServices::in_progress_onchain_payments] -Future> inProgressOnchainPayments({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingInProgressOnchainPayments(hint: hint); - -/// See [BreezServices::recommended_fees] -Future recommendedFees({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingRecommendedFees(hint: hint); - -/// See [BreezServices::execute_dev_command] -Future executeCommand({required String command, dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingExecuteCommand(command: command, hint: hint); - -/// See [BreezServices::generate_diagnostic_data] -Future generateDiagnosticData({dynamic hint}) => - BreezSdkBindings.instance.api.crateBindingGenerateDiagnosticData(hint: hint); +// Rust type: RustOpaqueNom> +@sealed +class BindingBreezServices extends RustOpaque { + BindingBreezServices.dcoDecode(List wire) : super.dcoDecode(wire, _kStaticData); + + BindingBreezServices.sseDecode(BigInt ptr, int externalSizeOnNative) + : super.sseDecode(ptr, externalSizeOnNative, _kStaticData); + + static final _kStaticData = RustArcStaticData( + rustArcIncrementStrongCount: + BreezSdkBindings.instance.api.rust_arc_increment_strong_count_BindingBreezServices, + rustArcDecrementStrongCount: + BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_BindingBreezServices, + rustArcDecrementStrongCountPtr: + BreezSdkBindings.instance.api.rust_arc_decrement_strong_count_BindingBreezServicesPtr, + ); + + /// See [BreezServices::backup] + Future backup({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesBackup(that: this, hint: hint); + + /// See [BreezServices::backup_status] + Future backupStatus({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesBackupStatus(that: this, hint: hint); + + /// See [BreezServices::buy_bitcoin] + Future buyBitcoin({required BuyBitcoinRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesBuyBitcoin(that: this, req: req, hint: hint); + + /// See [BreezServices::check_message] + Future checkMessage({required CheckMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesCheckMessage(that: this, req: req, hint: hint); + + /// See [BreezServices::close_lsp_channels] + Future closeLspChannels({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesCloseLspChannels(that: this, hint: hint); + + /// See [BreezServices::configure_node] + Future configureNode({required ConfigureNodeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesConfigureNode(that: this, req: req, hint: hint); + + /// See [BreezServices::connect_lsp] + Future connectLsp({required String lspId, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesConnectLsp(that: this, lspId: lspId, hint: hint); + + /// Cleanup node resources and stop the signer. + Future disconnect({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesDisconnect(that: this, hint: hint); + + /// See [BreezServices::execute_dev_command] + Future executeCommand({required String command, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesExecuteCommand(that: this, command: command, hint: hint); + + /// See [BreezServices::fetch_fiat_rates] + Future> fetchFiatRates({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesFetchFiatRates(that: this, hint: hint); + + /// See [BreezServices::fetch_lsp_info] + Future fetchLspInfo({required String id, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesFetchLspInfo(that: this, id: id, hint: hint); + + /// See [BreezServices::fetch_reverse_swap_fees] + Future fetchReverseSwapFees({required ReverseSwapFeesRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesFetchReverseSwapFees(that: this, req: req, hint: hint); + + /// See [BreezServices::generate_diagnostic_data] + Future generateDiagnosticData({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesGenerateDiagnosticData(that: this, hint: hint); + + /// See [BreezServices::in_progress_onchain_payments] + Future> inProgressOnchainPayments({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesInProgressOnchainPayments(that: this, hint: hint); + + /// See [BreezServices::in_progress_reverse_swaps] + Future> inProgressReverseSwaps({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesInProgressReverseSwaps(that: this, hint: hint); + + /// See [BreezServices::in_progress_swap] + Future inProgressSwap({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesInProgressSwap(that: this, hint: hint); + + /// See [BreezServices::list_fiat_currencies] + Future> listFiatCurrencies({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesListFiatCurrencies(that: this, hint: hint); + + /// See [BreezServices::list_lsps] + Future> listLsps({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesListLsps(that: this, hint: hint); + + /// See [BreezServices::list_payments] + Future> listPayments({required ListPaymentsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesListPayments(that: this, req: req, hint: hint); + + /// See [BreezServices::list_refundables] + Future> listRefundables({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesListRefundables(that: this, hint: hint); + + /// See [BreezServices::lnurl_auth] + Future lnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlAuth(that: this, reqData: reqData, hint: hint); + + /// See [BreezServices::lnurl_pay] + Future lnurlPay({required LnUrlPayRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlPay(that: this, req: req, hint: hint); + + /// See [BreezServices::lnurl_withdraw] + Future lnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesLnurlWithdraw(that: this, req: req, hint: hint); + + /// See [BreezServices::lsp_id] + Future lspId({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesLspId(that: this, hint: hint); + + /// See [BreezServices::lsp_info] + Future lspInfo({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesLspInfo(that: this, hint: hint); + + /// See [BreezServices::max_reverse_swap_amount] + Future maxReverseSwapAmount({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesMaxReverseSwapAmount(that: this, hint: hint); + + /// See [BreezServices::node_credentials] + Future nodeCredentials({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesNodeCredentials(that: this, hint: hint); + + /// See [BreezServices::node_info] + Future nodeInfo({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesNodeInfo(that: this, hint: hint); + + /// See [BreezServices::onchain_payment_limits] + Future onchainPaymentLimits({dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesOnchainPaymentLimits(that: this, hint: hint); + + /// See [BreezServices::open_channel_fee] + Future openChannelFee({required OpenChannelFeeRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesOpenChannelFee(that: this, req: req, hint: hint); + + /// See [BreezServices::pay_onchain] + Future payOnchain({required PayOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPayOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::list_payments] + Future paymentByHash({required String hash, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPaymentByHash(that: this, hash: hash, hint: hint); + + /// See [BreezServices::prepare_onchain_payment] + Future prepareOnchainPayment( + {required PrepareOnchainPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareOnchainPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::prepare_redeem_onchain_funds] + Future prepareRedeemOnchainFunds( + {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareRedeemOnchainFunds(that: this, req: req, hint: hint); + + /// See [BreezServices::prepare_refund] + Future prepareRefund({required PrepareRefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesPrepareRefund(that: this, req: req, hint: hint); + + /// See [BreezServices::receive_onchain] + Future receiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReceiveOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::receive_payment] + Future receivePayment({required ReceivePaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReceivePayment(that: this, req: req, hint: hint); + + /// See [BreezServices::recommended_fees] + Future recommendedFees({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRecommendedFees(that: this, hint: hint); + + /// See [BreezServices::redeem_onchain_funds] + Future redeemOnchainFunds( + {required RedeemOnchainFundsRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRedeemOnchainFunds(that: this, req: req, hint: hint); + + /// See [BreezServices::redeem_swap] + Future redeemSwap({required String swapAddress, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRedeemSwap(that: this, swapAddress: swapAddress, hint: hint); + + /// See [BreezServices::refund] + Future refund({required RefundRequest req, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRefund(that: this, req: req, hint: hint); + + Future registerWebhook({required String webhookUrl, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesRegisterWebhook(that: this, webhookUrl: webhookUrl, hint: hint); + + /// See [BreezServices::report_issue] + Future reportIssue({required ReportIssueRequest req, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesReportIssue(that: this, req: req, hint: hint); + + /// See [BreezServices::rescan_swaps] + Future rescanSwaps({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesRescanSwaps(that: this, hint: hint); + + /// See [BreezServices::send_onchain] + Future sendOnchain({required SendOnchainRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendOnchain(that: this, req: req, hint: hint); + + /// See [BreezServices::send_payment] + Future sendPayment({required SendPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::send_spontaneous_payment] + Future sendSpontaneousPayment( + {required SendSpontaneousPaymentRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSendSpontaneousPayment(that: this, req: req, hint: hint); + + /// See [BreezServices::set_payment_metadata] + Future setPaymentMetadata({required String hash, required String metadata, dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesSetPaymentMetadata( + that: this, hash: hash, metadata: metadata, hint: hint); + + /// See [BreezServices::sign_message] + Future signMessage({required SignMessageRequest req, dynamic hint}) => + BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesSignMessage(that: this, req: req, hint: hint); + + /// See [BreezServices::sync] + Future sync({dynamic hint}) => + BreezSdkBindings.instance.api.crateBindingBindingBreezServicesSync(that: this, hint: hint); + + Future unregisterWebhook({required String webhookUrl, dynamic hint}) => BreezSdkBindings.instance.api + .crateBindingBindingBreezServicesUnregisterWebhook(that: this, webhookUrl: webhookUrl, hint: hint); +} diff --git a/libs/sdk-flutter/lib/generated/error.dart b/libs/sdk-flutter/lib/generated/error.dart new file mode 100644 index 000000000..650dc8b7e --- /dev/null +++ b/libs/sdk-flutter/lib/generated/error.dart @@ -0,0 +1,31 @@ +// This file is automatically generated, so please do not edit it. +// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36. + +// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import + +import 'frb_generated.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +part 'error.freezed.dart'; + +@freezed +sealed class ConnectError with _$ConnectError implements FrbException { + const ConnectError._(); + + /// This error is raised when a general error occurs not specific to other error variants + /// in this enum. + const factory ConnectError.generic({ + required String err, + }) = ConnectError_Generic; + + /// This error is raised when [crate::models::ConnectRequest::restore_only] is set to true + /// and no node exists for [crate::models::ConnectRequest::seed]. + const factory ConnectError.restoreOnly({ + required String err, + }) = ConnectError_RestoreOnly; + + /// This error is raised when a connection to an external service fails. + const factory ConnectError.serviceConnectivity({ + required String err, + }) = ConnectError_ServiceConnectivity; +} diff --git a/libs/sdk-flutter/lib/generated/error.freezed.dart b/libs/sdk-flutter/lib/generated/error.freezed.dart new file mode 100644 index 000000000..01e158595 --- /dev/null +++ b/libs/sdk-flutter/lib/generated/error.freezed.dart @@ -0,0 +1,529 @@ +// coverage:ignore-file +// GENERATED CODE - DO NOT MODIFY BY HAND +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'error.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +T _$identity(T value) => value; + +final _privateConstructorUsedError = UnsupportedError( + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + +/// @nodoc +mixin _$ConnectError { + String get err => throw _privateConstructorUsedError; + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) => + throw _privateConstructorUsedError; + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) => + throw _privateConstructorUsedError; + + @JsonKey(ignore: true) + $ConnectErrorCopyWith get copyWith => throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class $ConnectErrorCopyWith<$Res> { + factory $ConnectErrorCopyWith(ConnectError value, $Res Function(ConnectError) then) = + _$ConnectErrorCopyWithImpl<$Res, ConnectError>; + @useResult + $Res call({String err}); +} + +/// @nodoc +class _$ConnectErrorCopyWithImpl<$Res, $Val extends ConnectError> implements $ConnectErrorCopyWith<$Res> { + _$ConnectErrorCopyWithImpl(this._value, this._then); + + // ignore: unused_field + final $Val _value; + // ignore: unused_field + final $Res Function($Val) _then; + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_value.copyWith( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + ) as $Val); + } +} + +/// @nodoc +abstract class _$$ConnectError_GenericImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_GenericImplCopyWith( + _$ConnectError_GenericImpl value, $Res Function(_$ConnectError_GenericImpl) then) = + __$$ConnectError_GenericImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_GenericImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_GenericImpl> + implements _$$ConnectError_GenericImplCopyWith<$Res> { + __$$ConnectError_GenericImplCopyWithImpl( + _$ConnectError_GenericImpl _value, $Res Function(_$ConnectError_GenericImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_GenericImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_GenericImpl extends ConnectError_Generic { + const _$ConnectError_GenericImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.generic(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_GenericImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_GenericImplCopyWith<_$ConnectError_GenericImpl> get copyWith => + __$$ConnectError_GenericImplCopyWithImpl<_$ConnectError_GenericImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return generic(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return generic?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (generic != null) { + return generic(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return generic(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return generic?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (generic != null) { + return generic(this); + } + return orElse(); + } +} + +abstract class ConnectError_Generic extends ConnectError { + const factory ConnectError_Generic({required final String err}) = _$ConnectError_GenericImpl; + const ConnectError_Generic._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_GenericImplCopyWith<_$ConnectError_GenericImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConnectError_RestoreOnlyImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_RestoreOnlyImplCopyWith( + _$ConnectError_RestoreOnlyImpl value, $Res Function(_$ConnectError_RestoreOnlyImpl) then) = + __$$ConnectError_RestoreOnlyImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_RestoreOnlyImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_RestoreOnlyImpl> + implements _$$ConnectError_RestoreOnlyImplCopyWith<$Res> { + __$$ConnectError_RestoreOnlyImplCopyWithImpl( + _$ConnectError_RestoreOnlyImpl _value, $Res Function(_$ConnectError_RestoreOnlyImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_RestoreOnlyImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_RestoreOnlyImpl extends ConnectError_RestoreOnly { + const _$ConnectError_RestoreOnlyImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.restoreOnly(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_RestoreOnlyImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_RestoreOnlyImplCopyWith<_$ConnectError_RestoreOnlyImpl> get copyWith => + __$$ConnectError_RestoreOnlyImplCopyWithImpl<_$ConnectError_RestoreOnlyImpl>(this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return restoreOnly(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return restoreOnly?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (restoreOnly != null) { + return restoreOnly(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return restoreOnly(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return restoreOnly?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (restoreOnly != null) { + return restoreOnly(this); + } + return orElse(); + } +} + +abstract class ConnectError_RestoreOnly extends ConnectError { + const factory ConnectError_RestoreOnly({required final String err}) = _$ConnectError_RestoreOnlyImpl; + const ConnectError_RestoreOnly._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_RestoreOnlyImplCopyWith<_$ConnectError_RestoreOnlyImpl> get copyWith => + throw _privateConstructorUsedError; +} + +/// @nodoc +abstract class _$$ConnectError_ServiceConnectivityImplCopyWith<$Res> implements $ConnectErrorCopyWith<$Res> { + factory _$$ConnectError_ServiceConnectivityImplCopyWith(_$ConnectError_ServiceConnectivityImpl value, + $Res Function(_$ConnectError_ServiceConnectivityImpl) then) = + __$$ConnectError_ServiceConnectivityImplCopyWithImpl<$Res>; + @override + @useResult + $Res call({String err}); +} + +/// @nodoc +class __$$ConnectError_ServiceConnectivityImplCopyWithImpl<$Res> + extends _$ConnectErrorCopyWithImpl<$Res, _$ConnectError_ServiceConnectivityImpl> + implements _$$ConnectError_ServiceConnectivityImplCopyWith<$Res> { + __$$ConnectError_ServiceConnectivityImplCopyWithImpl(_$ConnectError_ServiceConnectivityImpl _value, + $Res Function(_$ConnectError_ServiceConnectivityImpl) _then) + : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? err = null, + }) { + return _then(_$ConnectError_ServiceConnectivityImpl( + err: null == err + ? _value.err + : err // ignore: cast_nullable_to_non_nullable + as String, + )); + } +} + +/// @nodoc + +class _$ConnectError_ServiceConnectivityImpl extends ConnectError_ServiceConnectivity { + const _$ConnectError_ServiceConnectivityImpl({required this.err}) : super._(); + + @override + final String err; + + @override + String toString() { + return 'ConnectError.serviceConnectivity(err: $err)'; + } + + @override + bool operator ==(Object other) { + return identical(this, other) || + (other.runtimeType == runtimeType && + other is _$ConnectError_ServiceConnectivityImpl && + (identical(other.err, err) || other.err == err)); + } + + @override + int get hashCode => Object.hash(runtimeType, err); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$ConnectError_ServiceConnectivityImplCopyWith<_$ConnectError_ServiceConnectivityImpl> get copyWith => + __$$ConnectError_ServiceConnectivityImplCopyWithImpl<_$ConnectError_ServiceConnectivityImpl>( + this, _$identity); + + @override + @optionalTypeArgs + TResult when({ + required TResult Function(String err) generic, + required TResult Function(String err) restoreOnly, + required TResult Function(String err) serviceConnectivity, + }) { + return serviceConnectivity(err); + } + + @override + @optionalTypeArgs + TResult? whenOrNull({ + TResult? Function(String err)? generic, + TResult? Function(String err)? restoreOnly, + TResult? Function(String err)? serviceConnectivity, + }) { + return serviceConnectivity?.call(err); + } + + @override + @optionalTypeArgs + TResult maybeWhen({ + TResult Function(String err)? generic, + TResult Function(String err)? restoreOnly, + TResult Function(String err)? serviceConnectivity, + required TResult orElse(), + }) { + if (serviceConnectivity != null) { + return serviceConnectivity(err); + } + return orElse(); + } + + @override + @optionalTypeArgs + TResult map({ + required TResult Function(ConnectError_Generic value) generic, + required TResult Function(ConnectError_RestoreOnly value) restoreOnly, + required TResult Function(ConnectError_ServiceConnectivity value) serviceConnectivity, + }) { + return serviceConnectivity(this); + } + + @override + @optionalTypeArgs + TResult? mapOrNull({ + TResult? Function(ConnectError_Generic value)? generic, + TResult? Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult? Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + }) { + return serviceConnectivity?.call(this); + } + + @override + @optionalTypeArgs + TResult maybeMap({ + TResult Function(ConnectError_Generic value)? generic, + TResult Function(ConnectError_RestoreOnly value)? restoreOnly, + TResult Function(ConnectError_ServiceConnectivity value)? serviceConnectivity, + required TResult orElse(), + }) { + if (serviceConnectivity != null) { + return serviceConnectivity(this); + } + return orElse(); + } +} + +abstract class ConnectError_ServiceConnectivity extends ConnectError { + const factory ConnectError_ServiceConnectivity({required final String err}) = + _$ConnectError_ServiceConnectivityImpl; + const ConnectError_ServiceConnectivity._() : super._(); + + @override + String get err; + @override + @JsonKey(ignore: true) + _$$ConnectError_ServiceConnectivityImplCopyWith<_$ConnectError_ServiceConnectivityImpl> get copyWith => + throw _privateConstructorUsedError; +} diff --git a/libs/sdk-flutter/lib/generated/frb_generated.dart b/libs/sdk-flutter/lib/generated/frb_generated.dart index 99dc53fa0..2a17c3c2f 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.dart @@ -8,6 +8,7 @@ import 'breez_services.dart'; import 'chain.dart'; import 'dart:async'; import 'dart:convert'; +import 'error.dart'; import 'fiat.dart'; import 'frb_generated.io.dart' if (dart.library.html) 'frb_generated.web.dart'; import 'input_parser.dart'; @@ -61,7 +62,7 @@ class BreezSdkBindings String get codegenVersion => '2.0.0-dev.36'; @override - int get rustContentHash => 1499828454; + int get rustContentHash => -1104475804; static const kDefaultExternalLibraryLoaderConfig = ExternalLibraryLoaderConfig( stem: 'breez_sdk_core', @@ -71,138 +72,182 @@ class BreezSdkBindings } abstract class BreezSdkBindingsApi extends BaseApi { - Future crateBindingBackup({dynamic hint}); + Future crateBindingBindingBreezServicesBackup({required BindingBreezServices that, dynamic hint}); - Future crateBindingBackupStatus({dynamic hint}); + Future crateBindingBindingBreezServicesBackupStatus( + {required BindingBreezServices that, dynamic hint}); - Stream crateBindingBreezEventsStream({dynamic hint}); + Future crateBindingBindingBreezServicesBuyBitcoin( + {required BindingBreezServices that, required BuyBitcoinRequest req, dynamic hint}); - Stream crateBindingBreezLogStream({dynamic hint}); + Future crateBindingBindingBreezServicesCheckMessage( + {required BindingBreezServices that, required CheckMessageRequest req, dynamic hint}); - Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesCloseLspChannels( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesConfigureNode( + {required BindingBreezServices that, required ConfigureNodeRequest req, dynamic hint}); - Future crateBindingCloseLspChannels({dynamic hint}); + Future crateBindingBindingBreezServicesConnectLsp( + {required BindingBreezServices that, required String lspId, dynamic hint}); - Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesDisconnect({required BindingBreezServices that, dynamic hint}); - Future crateBindingConnect({required ConnectRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesExecuteCommand( + {required BindingBreezServices that, required String command, dynamic hint}); - Future crateBindingConnectLsp({required String lspId, dynamic hint}); + Future> crateBindingBindingBreezServicesFetchFiatRates( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingDefaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}); + Future crateBindingBindingBreezServicesFetchLspInfo( + {required BindingBreezServices that, required String id, dynamic hint}); - Future crateBindingDisconnect({dynamic hint}); + Future crateBindingBindingBreezServicesFetchReverseSwapFees( + {required BindingBreezServices that, required ReverseSwapFeesRequest req, dynamic hint}); - Future crateBindingExecuteCommand({required String command, dynamic hint}); + Future crateBindingBindingBreezServicesGenerateDiagnosticData( + {required BindingBreezServices that, dynamic hint}); - Future> crateBindingFetchFiatRates({dynamic hint}); + Future> crateBindingBindingBreezServicesInProgressOnchainPayments( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingFetchLspInfo({required String id, dynamic hint}); + Future> crateBindingBindingBreezServicesInProgressReverseSwaps( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingFetchReverseSwapFees( - {required ReverseSwapFeesRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesInProgressSwap( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingGenerateDiagnosticData({dynamic hint}); + Future> crateBindingBindingBreezServicesListFiatCurrencies( + {required BindingBreezServices that, dynamic hint}); - Future> crateBindingInProgressOnchainPayments({dynamic hint}); + Future> crateBindingBindingBreezServicesListLsps( + {required BindingBreezServices that, dynamic hint}); - Future> crateBindingInProgressReverseSwaps({dynamic hint}); + Future> crateBindingBindingBreezServicesListPayments( + {required BindingBreezServices that, required ListPaymentsRequest req, dynamic hint}); - Future crateBindingInProgressSwap({dynamic hint}); + Future> crateBindingBindingBreezServicesListRefundables( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingIsInitialized({dynamic hint}); + Future crateBindingBindingBreezServicesLnurlAuth( + {required BindingBreezServices that, required LnUrlAuthRequestData reqData, dynamic hint}); - Future> crateBindingListFiatCurrencies({dynamic hint}); + Future crateBindingBindingBreezServicesLnurlPay( + {required BindingBreezServices that, required LnUrlPayRequest req, dynamic hint}); - Future> crateBindingListLsps({dynamic hint}); + Future crateBindingBindingBreezServicesLnurlWithdraw( + {required BindingBreezServices that, required LnUrlWithdrawRequest req, dynamic hint}); - Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesLspId({required BindingBreezServices that, dynamic hint}); - Future> crateBindingListRefundables({dynamic hint}); + Future crateBindingBindingBreezServicesLspInfo( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}); + Future crateBindingBindingBreezServicesMaxReverseSwapAmount( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesNodeCredentials( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesNodeInfo( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingLspId({dynamic hint}); + Future crateBindingBindingBreezServicesOnchainPaymentLimits( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingLspInfo({dynamic hint}); + Future crateBindingBindingBreezServicesOpenChannelFee( + {required BindingBreezServices that, required OpenChannelFeeRequest req, dynamic hint}); - Future crateBindingMaxReverseSwapAmount({dynamic hint}); + Future crateBindingBindingBreezServicesPayOnchain( + {required BindingBreezServices that, required PayOnchainRequest req, dynamic hint}); - Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}); + Future crateBindingBindingBreezServicesPaymentByHash( + {required BindingBreezServices that, required String hash, dynamic hint}); - Future crateBindingNodeCredentials({dynamic hint}); + Future crateBindingBindingBreezServicesPrepareOnchainPayment( + {required BindingBreezServices that, required PrepareOnchainPaymentRequest req, dynamic hint}); - Future crateBindingNodeInfo({dynamic hint}); + Future crateBindingBindingBreezServicesPrepareRedeemOnchainFunds( + {required BindingBreezServices that, required PrepareRedeemOnchainFundsRequest req, dynamic hint}); - Future crateBindingOnchainPaymentLimits({dynamic hint}); + Future crateBindingBindingBreezServicesPrepareRefund( + {required BindingBreezServices that, required PrepareRefundRequest req, dynamic hint}); - Future crateBindingOpenChannelFee( - {required OpenChannelFeeRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesReceiveOnchain( + {required BindingBreezServices that, required ReceiveOnchainRequest req, dynamic hint}); - Future crateBindingParseInput({required String input, dynamic hint}); + Future crateBindingBindingBreezServicesReceivePayment( + {required BindingBreezServices that, required ReceivePaymentRequest req, dynamic hint}); - Future crateBindingParseInvoice({required String invoice, dynamic hint}); + Future crateBindingBindingBreezServicesRecommendedFees( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesRedeemOnchainFunds( + {required BindingBreezServices that, required RedeemOnchainFundsRequest req, dynamic hint}); - Future crateBindingPaymentByHash({required String hash, dynamic hint}); + Future crateBindingBindingBreezServicesRedeemSwap( + {required BindingBreezServices that, required String swapAddress, dynamic hint}); - Future crateBindingPrepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesRefund( + {required BindingBreezServices that, required RefundRequest req, dynamic hint}); - Future crateBindingPrepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesRegisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}); - Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesReportIssue( + {required BindingBreezServices that, required ReportIssueRequest req, dynamic hint}); - Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesRescanSwaps( + {required BindingBreezServices that, dynamic hint}); - Future crateBindingReceivePayment( - {required ReceivePaymentRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesSendOnchain( + {required BindingBreezServices that, required SendOnchainRequest req, dynamic hint}); - Future crateBindingRecommendedFees({dynamic hint}); + Future crateBindingBindingBreezServicesSendPayment( + {required BindingBreezServices that, required SendPaymentRequest req, dynamic hint}); - Future crateBindingRedeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesSendSpontaneousPayment( + {required BindingBreezServices that, required SendSpontaneousPaymentRequest req, dynamic hint}); - Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}); + Future crateBindingBindingBreezServicesSetPaymentMetadata( + {required BindingBreezServices that, required String hash, required String metadata, dynamic hint}); - Future crateBindingRefund({required RefundRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesSignMessage( + {required BindingBreezServices that, required SignMessageRequest req, dynamic hint}); - Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}); + Future crateBindingBindingBreezServicesSync({required BindingBreezServices that, dynamic hint}); - Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}); + Future crateBindingBindingBreezServicesUnregisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}); - Future crateBindingRescanSwaps({dynamic hint}); + Stream crateBindingBreezEventsStream({dynamic hint}); - Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}); + Stream crateBindingBreezLogStream({dynamic hint}); - Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}); + Future crateBindingConnect({required ConnectRequest req, dynamic hint}); - Future crateBindingSendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}); + Future crateBindingDefaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}); - Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}); + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}); - Future crateBindingSetPaymentMetadata({required String hash, required String metadata, dynamic hint}); + Future crateBindingParseInput({required String input, dynamic hint}); + + Future crateBindingParseInvoice({required String invoice, dynamic hint}); - Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}); + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}); Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}); - Future crateBindingSync({dynamic hint}); + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_BindingBreezServices; + + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_BindingBreezServices; - Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}); + CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_BindingBreezServicesPtr; } class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements BreezSdkBindingsApi { @@ -214,1404 +259,1585 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements }); @override - Future crateBindingBackup({dynamic hint}) { + Future crateBindingBindingBreezServicesBackup({required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__backup(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_backup(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingBackupConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesBackupConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingBackupConstMeta => const TaskConstMeta( - debugName: "backup", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesBackupConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_backup", + argNames: ["that"], ); @override - Future crateBindingBackupStatus({dynamic hint}) { + Future crateBindingBindingBreezServicesBackupStatus( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__backup_status(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_backup_status(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_backup_status, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingBackupStatusConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesBackupStatusConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingBackupStatusConstMeta => const TaskConstMeta( - debugName: "backup_status", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesBackupStatusConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_backup_status", + argNames: ["that"], ); @override - Stream crateBindingBreezEventsStream({dynamic hint}) { - final s = RustStreamSink(); - unawaited(handler.executeNormal(NormalTask( + Future crateBindingBindingBreezServicesBuyBitcoin( + {required BindingBreezServices that, required BuyBitcoinRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_StreamSink_breez_event_Dco(s); - return wire.wire__crate__binding__breez_events_stream(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_buy_bitcoin_request(req); + return wire.wire__crate__binding__BindingBreezServices_buy_bitcoin(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_buy_bitcoin_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingBreezEventsStreamConstMeta, - argValues: [s], + constMeta: kCrateBindingBindingBreezServicesBuyBitcoinConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, - ))); - return s.stream; + )); } - TaskConstMeta get kCrateBindingBreezEventsStreamConstMeta => const TaskConstMeta( - debugName: "breez_events_stream", - argNames: ["s"], + TaskConstMeta get kCrateBindingBindingBreezServicesBuyBitcoinConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_buy_bitcoin", + argNames: ["that", "req"], ); @override - Stream crateBindingBreezLogStream({dynamic hint}) { - final s = RustStreamSink(); - unawaited(handler.executeNormal(NormalTask( + Future crateBindingBindingBreezServicesCheckMessage( + {required BindingBreezServices that, required CheckMessageRequest req, dynamic hint}) { + return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_StreamSink_log_entry_Dco(s); - return wire.wire__crate__binding__breez_log_stream(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_check_message_request(req); + return wire.wire__crate__binding__BindingBreezServices_check_message(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_check_message_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingBreezLogStreamConstMeta, - argValues: [s], + constMeta: kCrateBindingBindingBreezServicesCheckMessageConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, - ))); - return s.stream; + )); } - TaskConstMeta get kCrateBindingBreezLogStreamConstMeta => const TaskConstMeta( - debugName: "breez_log_stream", - argNames: ["s"], + TaskConstMeta get kCrateBindingBindingBreezServicesCheckMessageConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_check_message", + argNames: ["that", "req"], ); @override - Future crateBindingBuyBitcoin({required BuyBitcoinRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesCloseLspChannels( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_buy_bitcoin_request(req); - return wire.wire__crate__binding__buy_bitcoin(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_close_lsp_channels(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_buy_bitcoin_response, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingBuyBitcoinConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesCloseLspChannelsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingBuyBitcoinConstMeta => const TaskConstMeta( - debugName: "buy_bitcoin", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesCloseLspChannelsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_close_lsp_channels", + argNames: ["that"], ); @override - Future crateBindingCheckMessage({required CheckMessageRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesConfigureNode( + {required BindingBreezServices that, required ConfigureNodeRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_check_message_request(req); - return wire.wire__crate__binding__check_message(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_configure_node_request(req); + return wire.wire__crate__binding__BindingBreezServices_configure_node(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_check_message_response, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingCheckMessageConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesConfigureNodeConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingCheckMessageConstMeta => const TaskConstMeta( - debugName: "check_message", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesConfigureNodeConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_configure_node", + argNames: ["that", "req"], ); @override - Future crateBindingCloseLspChannels({dynamic hint}) { + Future crateBindingBindingBreezServicesConnectLsp( + {required BindingBreezServices that, required String lspId, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__close_lsp_channels(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(lspId); + return wire.wire__crate__binding__BindingBreezServices_connect_lsp(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingCloseLspChannelsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesConnectLspConstMeta, + argValues: [that, lspId], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingCloseLspChannelsConstMeta => const TaskConstMeta( - debugName: "close_lsp_channels", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesConnectLspConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_connect_lsp", + argNames: ["that", "lspId"], ); @override - Future crateBindingConfigureNode({required ConfigureNodeRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesDisconnect( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_configure_node_request(req); - return wire.wire__crate__binding__configure_node(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_disconnect(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingConfigureNodeConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesDisconnectConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingConfigureNodeConstMeta => const TaskConstMeta( - debugName: "configure_node", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesDisconnectConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_disconnect", + argNames: ["that"], ); @override - Future crateBindingConnect({required ConnectRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesExecuteCommand( + {required BindingBreezServices that, required String command, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_connect_request(req); - return wire.wire__crate__binding__connect(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(command); + return wire.wire__crate__binding__BindingBreezServices_execute_command(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingConnectConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesExecuteCommandConstMeta, + argValues: [that, command], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingConnectConstMeta => const TaskConstMeta( - debugName: "connect", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesExecuteCommandConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_execute_command", + argNames: ["that", "command"], ); @override - Future crateBindingConnectLsp({required String lspId, dynamic hint}) { + Future> crateBindingBindingBreezServicesFetchFiatRates( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(lspId); - return wire.wire__crate__binding__connect_lsp(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_fetch_fiat_rates(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_list_rate, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingConnectLspConstMeta, - argValues: [lspId], + constMeta: kCrateBindingBindingBreezServicesFetchFiatRatesConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingConnectLspConstMeta => const TaskConstMeta( - debugName: "connect_lsp", - argNames: ["lspId"], + TaskConstMeta get kCrateBindingBindingBreezServicesFetchFiatRatesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_fiat_rates", + argNames: ["that"], ); @override - Future crateBindingDefaultConfig( - {required EnvironmentType envType, - required String apiKey, - required NodeConfig nodeConfig, - dynamic hint}) { + Future crateBindingBindingBreezServicesFetchLspInfo( + {required BindingBreezServices that, required String id, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_environment_type(envType); - var arg1 = cst_encode_String(apiKey); - var arg2 = cst_encode_box_autoadd_node_config(nodeConfig); - return wire.wire__crate__binding__default_config(port_, arg0, arg1, arg2); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(id); + return wire.wire__crate__binding__BindingBreezServices_fetch_lsp_info(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_config, - decodeErrorData: null, + decodeSuccessData: dco_decode_opt_box_autoadd_lsp_information, + decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingDefaultConfigConstMeta, - argValues: [envType, apiKey, nodeConfig], + constMeta: kCrateBindingBindingBreezServicesFetchLspInfoConstMeta, + argValues: [that, id], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingDefaultConfigConstMeta => const TaskConstMeta( - debugName: "default_config", - argNames: ["envType", "apiKey", "nodeConfig"], + TaskConstMeta get kCrateBindingBindingBreezServicesFetchLspInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_lsp_info", + argNames: ["that", "id"], ); @override - Future crateBindingDisconnect({dynamic hint}) { + Future crateBindingBindingBreezServicesFetchReverseSwapFees( + {required BindingBreezServices that, required ReverseSwapFeesRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__disconnect(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_reverse_swap_fees_request(req); + return wire.wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_reverse_swap_pair_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingDisconnectConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesFetchReverseSwapFeesConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingDisconnectConstMeta => const TaskConstMeta( - debugName: "disconnect", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesFetchReverseSwapFeesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_fetch_reverse_swap_fees", + argNames: ["that", "req"], ); @override - Future crateBindingExecuteCommand({required String command, dynamic hint}) { + Future crateBindingBindingBreezServicesGenerateDiagnosticData( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(command); - return wire.wire__crate__binding__execute_command(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_generate_diagnostic_data(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingExecuteCommandConstMeta, - argValues: [command], + constMeta: kCrateBindingBindingBreezServicesGenerateDiagnosticDataConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingExecuteCommandConstMeta => const TaskConstMeta( - debugName: "execute_command", - argNames: ["command"], + TaskConstMeta get kCrateBindingBindingBreezServicesGenerateDiagnosticDataConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_generate_diagnostic_data", + argNames: ["that"], ); @override - Future> crateBindingFetchFiatRates({dynamic hint}) { + Future> crateBindingBindingBreezServicesInProgressOnchainPayments( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__fetch_fiat_rates(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_onchain_payments(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_rate, + decodeSuccessData: dco_decode_list_reverse_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingFetchFiatRatesConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesInProgressOnchainPaymentsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingFetchFiatRatesConstMeta => const TaskConstMeta( - debugName: "fetch_fiat_rates", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressOnchainPaymentsConstMeta => + const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_onchain_payments", + argNames: ["that"], ); @override - Future crateBindingFetchLspInfo({required String id, dynamic hint}) { + Future> crateBindingBindingBreezServicesInProgressReverseSwaps( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(id); - return wire.wire__crate__binding__fetch_lsp_info(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_lsp_information, + decodeSuccessData: dco_decode_list_reverse_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingFetchLspInfoConstMeta, - argValues: [id], + constMeta: kCrateBindingBindingBreezServicesInProgressReverseSwapsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingFetchLspInfoConstMeta => const TaskConstMeta( - debugName: "fetch_lsp_info", - argNames: ["id"], + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressReverseSwapsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_reverse_swaps", + argNames: ["that"], ); @override - Future crateBindingFetchReverseSwapFees( - {required ReverseSwapFeesRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesInProgressSwap( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_reverse_swap_fees_request(req); - return wire.wire__crate__binding__fetch_reverse_swap_fees(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_in_progress_swap(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_reverse_swap_pair_info, + decodeSuccessData: dco_decode_opt_box_autoadd_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingFetchReverseSwapFeesConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesInProgressSwapConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingFetchReverseSwapFeesConstMeta => const TaskConstMeta( - debugName: "fetch_reverse_swap_fees", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesInProgressSwapConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_in_progress_swap", + argNames: ["that"], ); @override - Future crateBindingGenerateDiagnosticData({dynamic hint}) { + Future> crateBindingBindingBreezServicesListFiatCurrencies( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__generate_diagnostic_data(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_fiat_currencies(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_String, + decodeSuccessData: dco_decode_list_fiat_currency, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingGenerateDiagnosticDataConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesListFiatCurrenciesConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingGenerateDiagnosticDataConstMeta => const TaskConstMeta( - debugName: "generate_diagnostic_data", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesListFiatCurrenciesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_fiat_currencies", + argNames: ["that"], ); @override - Future> crateBindingInProgressOnchainPayments({dynamic hint}) { + Future> crateBindingBindingBreezServicesListLsps( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__in_progress_onchain_payments(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_lsps(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeSuccessData: dco_decode_list_lsp_information, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingInProgressOnchainPaymentsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesListLspsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingInProgressOnchainPaymentsConstMeta => const TaskConstMeta( - debugName: "in_progress_onchain_payments", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesListLspsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_lsps", + argNames: ["that"], ); @override - Future> crateBindingInProgressReverseSwaps({dynamic hint}) { + Future> crateBindingBindingBreezServicesListPayments( + {required BindingBreezServices that, required ListPaymentsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__in_progress_reverse_swaps(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_list_payments_request(req); + return wire.wire__crate__binding__BindingBreezServices_list_payments(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_reverse_swap_info, + decodeSuccessData: dco_decode_list_payment, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingInProgressReverseSwapsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesListPaymentsConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingInProgressReverseSwapsConstMeta => const TaskConstMeta( - debugName: "in_progress_reverse_swaps", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesListPaymentsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_payments", + argNames: ["that", "req"], ); @override - Future crateBindingInProgressSwap({dynamic hint}) { + Future> crateBindingBindingBreezServicesListRefundables( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__in_progress_swap(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_list_refundables(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_swap_info, + decodeSuccessData: dco_decode_list_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingInProgressSwapConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesListRefundablesConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingInProgressSwapConstMeta => const TaskConstMeta( - debugName: "in_progress_swap", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesListRefundablesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_list_refundables", + argNames: ["that"], ); @override - Future crateBindingIsInitialized({dynamic hint}) { + Future crateBindingBindingBreezServicesLnurlAuth( + {required BindingBreezServices that, required LnUrlAuthRequestData reqData, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__is_initialized(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); + return wire.wire__crate__binding__BindingBreezServices_lnurl_auth(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_bool, - decodeErrorData: null, + decodeSuccessData: dco_decode_ln_url_callback_status, + decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingIsInitializedConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesLnurlAuthConstMeta, + argValues: [that, reqData], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingIsInitializedConstMeta => const TaskConstMeta( - debugName: "is_initialized", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlAuthConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_auth", + argNames: ["that", "reqData"], ); @override - Future> crateBindingListFiatCurrencies({dynamic hint}) { + Future crateBindingBindingBreezServicesLnurlPay( + {required BindingBreezServices that, required LnUrlPayRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__list_fiat_currencies(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_pay_request(req); + return wire.wire__crate__binding__BindingBreezServices_lnurl_pay(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_fiat_currency, + decodeSuccessData: dco_decode_ln_url_pay_result, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingListFiatCurrenciesConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesLnurlPayConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingListFiatCurrenciesConstMeta => const TaskConstMeta( - debugName: "list_fiat_currencies", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlPayConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_pay", + argNames: ["that", "req"], ); @override - Future> crateBindingListLsps({dynamic hint}) { + Future crateBindingBindingBreezServicesLnurlWithdraw( + {required BindingBreezServices that, required LnUrlWithdrawRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__list_lsps(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_ln_url_withdraw_request(req); + return wire.wire__crate__binding__BindingBreezServices_lnurl_withdraw(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_lsp_information, + decodeSuccessData: dco_decode_ln_url_withdraw_result, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingListLspsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesLnurlWithdrawConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingListLspsConstMeta => const TaskConstMeta( - debugName: "list_lsps", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesLnurlWithdrawConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lnurl_withdraw", + argNames: ["that", "req"], ); @override - Future> crateBindingListPayments({required ListPaymentsRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesLspId({required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_list_payments_request(req); - return wire.wire__crate__binding__list_payments(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_lsp_id(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_payment, + decodeSuccessData: dco_decode_opt_String, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingListPaymentsConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesLspIdConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingListPaymentsConstMeta => const TaskConstMeta( - debugName: "list_payments", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesLspIdConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lsp_id", + argNames: ["that"], ); @override - Future> crateBindingListRefundables({dynamic hint}) { + Future crateBindingBindingBreezServicesLspInfo( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__list_refundables(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_lsp_info(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_swap_info, + decodeSuccessData: dco_decode_lsp_information, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingListRefundablesConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesLspInfoConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingListRefundablesConstMeta => const TaskConstMeta( - debugName: "list_refundables", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesLspInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_lsp_info", + argNames: ["that"], ); @override - Future crateBindingLnurlAuth({required LnUrlAuthRequestData reqData, dynamic hint}) { + Future crateBindingBindingBreezServicesMaxReverseSwapAmount( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ln_url_auth_request_data(reqData); - return wire.wire__crate__binding__lnurl_auth(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_max_reverse_swap_amount(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_ln_url_callback_status, + decodeSuccessData: dco_decode_max_reverse_swap_amount_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingLnurlAuthConstMeta, - argValues: [reqData], + constMeta: kCrateBindingBindingBreezServicesMaxReverseSwapAmountConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingLnurlAuthConstMeta => const TaskConstMeta( - debugName: "lnurl_auth", - argNames: ["reqData"], + TaskConstMeta get kCrateBindingBindingBreezServicesMaxReverseSwapAmountConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_max_reverse_swap_amount", + argNames: ["that"], ); @override - Future crateBindingLnurlPay({required LnUrlPayRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesNodeCredentials( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ln_url_pay_request(req); - return wire.wire__crate__binding__lnurl_pay(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_node_credentials(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_ln_url_pay_result, + decodeSuccessData: dco_decode_opt_box_autoadd_node_credentials, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingLnurlPayConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesNodeCredentialsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingLnurlPayConstMeta => const TaskConstMeta( - debugName: "lnurl_pay", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesNodeCredentialsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_node_credentials", + argNames: ["that"], ); @override - Future crateBindingLnurlWithdraw({required LnUrlWithdrawRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesNodeInfo( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_ln_url_withdraw_request(req); - return wire.wire__crate__binding__lnurl_withdraw(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_node_info(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_ln_url_withdraw_result, + decodeSuccessData: dco_decode_node_state, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingLnurlWithdrawConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesNodeInfoConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingLnurlWithdrawConstMeta => const TaskConstMeta( - debugName: "lnurl_withdraw", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesNodeInfoConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_node_info", + argNames: ["that"], ); @override - Future crateBindingLspId({dynamic hint}) { + Future crateBindingBindingBreezServicesOnchainPaymentLimits( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__lsp_id(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_onchain_payment_limits(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_String, + decodeSuccessData: dco_decode_onchain_payment_limits_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingLspIdConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesOnchainPaymentLimitsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingLspIdConstMeta => const TaskConstMeta( - debugName: "lsp_id", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesOnchainPaymentLimitsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_onchain_payment_limits", + argNames: ["that"], ); @override - Future crateBindingLspInfo({dynamic hint}) { + Future crateBindingBindingBreezServicesOpenChannelFee( + {required BindingBreezServices that, required OpenChannelFeeRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__lsp_info(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_open_channel_fee_request(req); + return wire.wire__crate__binding__BindingBreezServices_open_channel_fee(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_lsp_information, + decodeSuccessData: dco_decode_open_channel_fee_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingLspInfoConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesOpenChannelFeeConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingLspInfoConstMeta => const TaskConstMeta( - debugName: "lsp_info", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesOpenChannelFeeConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_open_channel_fee", + argNames: ["that", "req"], ); @override - Future crateBindingMaxReverseSwapAmount({dynamic hint}) { + Future crateBindingBindingBreezServicesPayOnchain( + {required BindingBreezServices that, required PayOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__max_reverse_swap_amount(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_pay_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_pay_onchain(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_max_reverse_swap_amount_response, + decodeSuccessData: dco_decode_pay_onchain_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingMaxReverseSwapAmountConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesPayOnchainConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingMaxReverseSwapAmountConstMeta => const TaskConstMeta( - debugName: "max_reverse_swap_amount", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesPayOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_pay_onchain", + argNames: ["that", "req"], ); @override - Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}) { + Future crateBindingBindingBreezServicesPaymentByHash( + {required BindingBreezServices that, required String hash, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(phrase); - return wire.wire__crate__binding__mnemonic_to_seed(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(hash); + return wire.wire__crate__binding__BindingBreezServices_payment_by_hash(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_list_prim_u_8_strict, + decodeSuccessData: dco_decode_opt_box_autoadd_payment, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingMnemonicToSeedConstMeta, - argValues: [phrase], + constMeta: kCrateBindingBindingBreezServicesPaymentByHashConstMeta, + argValues: [that, hash], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingMnemonicToSeedConstMeta => const TaskConstMeta( - debugName: "mnemonic_to_seed", - argNames: ["phrase"], + TaskConstMeta get kCrateBindingBindingBreezServicesPaymentByHashConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_payment_by_hash", + argNames: ["that", "hash"], ); @override - Future crateBindingNodeCredentials({dynamic hint}) { + Future crateBindingBindingBreezServicesPrepareOnchainPayment( + {required BindingBreezServices that, required PrepareOnchainPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__node_credentials(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_onchain_payment(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_node_credentials, + decodeSuccessData: dco_decode_prepare_onchain_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingNodeCredentialsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesPrepareOnchainPaymentConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingNodeCredentialsConstMeta => const TaskConstMeta( - debugName: "node_credentials", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareOnchainPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_prepare_onchain_payment", + argNames: ["that", "req"], ); @override - Future crateBindingNodeInfo({dynamic hint}) { + Future crateBindingBindingBreezServicesPrepareRedeemOnchainFunds( + {required BindingBreezServices that, required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__node_info(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( + port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_node_state, + decodeSuccessData: dco_decode_prepare_redeem_onchain_funds_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingNodeInfoConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesPrepareRedeemOnchainFundsConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingNodeInfoConstMeta => const TaskConstMeta( - debugName: "node_info", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareRedeemOnchainFundsConstMeta => + const TaskConstMeta( + debugName: "BindingBreezServices_prepare_redeem_onchain_funds", + argNames: ["that", "req"], ); @override - Future crateBindingOnchainPaymentLimits({dynamic hint}) { + Future crateBindingBindingBreezServicesPrepareRefund( + {required BindingBreezServices that, required PrepareRefundRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__onchain_payment_limits(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_prepare_refund_request(req); + return wire.wire__crate__binding__BindingBreezServices_prepare_refund(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_onchain_payment_limits_response, + decodeSuccessData: dco_decode_prepare_refund_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingOnchainPaymentLimitsConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesPrepareRefundConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingOnchainPaymentLimitsConstMeta => const TaskConstMeta( - debugName: "onchain_payment_limits", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesPrepareRefundConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_prepare_refund", + argNames: ["that", "req"], ); @override - Future crateBindingOpenChannelFee( - {required OpenChannelFeeRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesReceiveOnchain( + {required BindingBreezServices that, required ReceiveOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_open_channel_fee_request(req); - return wire.wire__crate__binding__open_channel_fee(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_receive_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_receive_onchain(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_open_channel_fee_response, + decodeSuccessData: dco_decode_swap_info, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingOpenChannelFeeConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesReceiveOnchainConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingOpenChannelFeeConstMeta => const TaskConstMeta( - debugName: "open_channel_fee", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesReceiveOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_receive_onchain", + argNames: ["that", "req"], ); @override - Future crateBindingParseInput({required String input, dynamic hint}) { + Future crateBindingBindingBreezServicesReceivePayment( + {required BindingBreezServices that, required ReceivePaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(input); - return wire.wire__crate__binding__parse_input(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_receive_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_receive_payment(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_input_type, + decodeSuccessData: dco_decode_receive_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingParseInputConstMeta, - argValues: [input], + constMeta: kCrateBindingBindingBreezServicesReceivePaymentConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingParseInputConstMeta => const TaskConstMeta( - debugName: "parse_input", - argNames: ["input"], + TaskConstMeta get kCrateBindingBindingBreezServicesReceivePaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_receive_payment", + argNames: ["that", "req"], ); @override - Future crateBindingParseInvoice({required String invoice, dynamic hint}) { + Future crateBindingBindingBreezServicesRecommendedFees( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(invoice); - return wire.wire__crate__binding__parse_invoice(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_recommended_fees(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_ln_invoice, + decodeSuccessData: dco_decode_recommended_fees, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingParseInvoiceConstMeta, - argValues: [invoice], + constMeta: kCrateBindingBindingBreezServicesRecommendedFeesConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingParseInvoiceConstMeta => const TaskConstMeta( - debugName: "parse_invoice", - argNames: ["invoice"], + TaskConstMeta get kCrateBindingBindingBreezServicesRecommendedFeesConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_recommended_fees", + argNames: ["that"], ); @override - Future crateBindingPayOnchain({required PayOnchainRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesRedeemOnchainFunds( + {required BindingBreezServices that, required RedeemOnchainFundsRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_pay_onchain_request(req); - return wire.wire__crate__binding__pay_onchain(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); + return wire.wire__crate__binding__BindingBreezServices_redeem_onchain_funds(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_pay_onchain_response, + decodeSuccessData: dco_decode_redeem_onchain_funds_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingPayOnchainConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesRedeemOnchainFundsConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingPayOnchainConstMeta => const TaskConstMeta( - debugName: "pay_onchain", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesRedeemOnchainFundsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_redeem_onchain_funds", + argNames: ["that", "req"], ); @override - Future crateBindingPaymentByHash({required String hash, dynamic hint}) { + Future crateBindingBindingBreezServicesRedeemSwap( + {required BindingBreezServices that, required String swapAddress, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(hash); - return wire.wire__crate__binding__payment_by_hash(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(swapAddress); + return wire.wire__crate__binding__BindingBreezServices_redeem_swap(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_opt_box_autoadd_payment, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingPaymentByHashConstMeta, - argValues: [hash], + constMeta: kCrateBindingBindingBreezServicesRedeemSwapConstMeta, + argValues: [that, swapAddress], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingPaymentByHashConstMeta => const TaskConstMeta( - debugName: "payment_by_hash", - argNames: ["hash"], + TaskConstMeta get kCrateBindingBindingBreezServicesRedeemSwapConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_redeem_swap", + argNames: ["that", "swapAddress"], ); @override - Future crateBindingPrepareOnchainPayment( - {required PrepareOnchainPaymentRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesRefund( + {required BindingBreezServices that, required RefundRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_prepare_onchain_payment_request(req); - return wire.wire__crate__binding__prepare_onchain_payment(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_refund_request(req); + return wire.wire__crate__binding__BindingBreezServices_refund(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_prepare_onchain_payment_response, + decodeSuccessData: dco_decode_refund_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingPrepareOnchainPaymentConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesRefundConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingPrepareOnchainPaymentConstMeta => const TaskConstMeta( - debugName: "prepare_onchain_payment", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesRefundConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_refund", + argNames: ["that", "req"], ); @override - Future crateBindingPrepareRedeemOnchainFunds( - {required PrepareRedeemOnchainFundsRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesRegisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_prepare_redeem_onchain_funds_request(req); - return wire.wire__crate__binding__prepare_redeem_onchain_funds(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(webhookUrl); + return wire.wire__crate__binding__BindingBreezServices_register_webhook(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_prepare_redeem_onchain_funds_response, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingPrepareRedeemOnchainFundsConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesRegisterWebhookConstMeta, + argValues: [that, webhookUrl], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingPrepareRedeemOnchainFundsConstMeta => const TaskConstMeta( - debugName: "prepare_redeem_onchain_funds", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesRegisterWebhookConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_register_webhook", + argNames: ["that", "webhookUrl"], ); @override - Future crateBindingPrepareRefund({required PrepareRefundRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesReportIssue( + {required BindingBreezServices that, required ReportIssueRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_prepare_refund_request(req); - return wire.wire__crate__binding__prepare_refund(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_report_issue_request(req); + return wire.wire__crate__binding__BindingBreezServices_report_issue(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_prepare_refund_response, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingPrepareRefundConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesReportIssueConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingPrepareRefundConstMeta => const TaskConstMeta( - debugName: "prepare_refund", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesReportIssueConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_report_issue", + argNames: ["that", "req"], ); @override - Future crateBindingReceiveOnchain({required ReceiveOnchainRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesRescanSwaps( + {required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_receive_onchain_request(req); - return wire.wire__crate__binding__receive_onchain(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_rescan_swaps(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_swap_info, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingReceiveOnchainConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesRescanSwapsConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingReceiveOnchainConstMeta => const TaskConstMeta( - debugName: "receive_onchain", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesRescanSwapsConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_rescan_swaps", + argNames: ["that"], ); @override - Future crateBindingReceivePayment( - {required ReceivePaymentRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesSendOnchain( + {required BindingBreezServices that, required SendOnchainRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_receive_payment_request(req); - return wire.wire__crate__binding__receive_payment(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_onchain_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_onchain(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_receive_payment_response, + decodeSuccessData: dco_decode_send_onchain_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingReceivePaymentConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesSendOnchainConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingReceivePaymentConstMeta => const TaskConstMeta( - debugName: "receive_payment", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesSendOnchainConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_onchain", + argNames: ["that", "req"], ); @override - Future crateBindingRecommendedFees({dynamic hint}) { + Future crateBindingBindingBreezServicesSendPayment( + {required BindingBreezServices that, required SendPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__recommended_fees(port_); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_payment(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_recommended_fees, + decodeSuccessData: dco_decode_send_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRecommendedFeesConstMeta, - argValues: [], + constMeta: kCrateBindingBindingBreezServicesSendPaymentConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingRecommendedFeesConstMeta => const TaskConstMeta( - debugName: "recommended_fees", - argNames: [], + TaskConstMeta get kCrateBindingBindingBreezServicesSendPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_payment", + argNames: ["that", "req"], ); @override - Future crateBindingRedeemOnchainFunds( - {required RedeemOnchainFundsRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesSendSpontaneousPayment( + {required BindingBreezServices that, required SendSpontaneousPaymentRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_redeem_onchain_funds_request(req); - return wire.wire__crate__binding__redeem_onchain_funds(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); + return wire.wire__crate__binding__BindingBreezServices_send_spontaneous_payment(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_redeem_onchain_funds_response, + decodeSuccessData: dco_decode_send_payment_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRedeemOnchainFundsConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesSendSpontaneousPaymentConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingRedeemOnchainFundsConstMeta => const TaskConstMeta( - debugName: "redeem_onchain_funds", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesSendSpontaneousPaymentConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_send_spontaneous_payment", + argNames: ["that", "req"], ); @override - Future crateBindingRedeemSwap({required String swapAddress, dynamic hint}) { + Future crateBindingBindingBreezServicesSetPaymentMetadata( + {required BindingBreezServices that, required String hash, required String metadata, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(swapAddress); - return wire.wire__crate__binding__redeem_swap(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(hash); + var arg2 = cst_encode_String(metadata); + return wire.wire__crate__binding__BindingBreezServices_set_payment_metadata(port_, arg0, arg1, arg2); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRedeemSwapConstMeta, - argValues: [swapAddress], + constMeta: kCrateBindingBindingBreezServicesSetPaymentMetadataConstMeta, + argValues: [that, hash, metadata], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingRedeemSwapConstMeta => const TaskConstMeta( - debugName: "redeem_swap", - argNames: ["swapAddress"], + TaskConstMeta get kCrateBindingBindingBreezServicesSetPaymentMetadataConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_set_payment_metadata", + argNames: ["that", "hash", "metadata"], ); @override - Future crateBindingRefund({required RefundRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesSignMessage( + {required BindingBreezServices that, required SignMessageRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_refund_request(req); - return wire.wire__crate__binding__refund(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_box_autoadd_sign_message_request(req); + return wire.wire__crate__binding__BindingBreezServices_sign_message(port_, arg0, arg1); }, codec: DcoCodec( - decodeSuccessData: dco_decode_refund_response, + decodeSuccessData: dco_decode_sign_message_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRefundConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesSignMessageConstMeta, + argValues: [that, req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingRefundConstMeta => const TaskConstMeta( - debugName: "refund", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesSignMessageConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_sign_message", + argNames: ["that", "req"], ); @override - Future crateBindingRegisterWebhook({required String webhookUrl, dynamic hint}) { + Future crateBindingBindingBreezServicesSync({required BindingBreezServices that, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(webhookUrl); - return wire.wire__crate__binding__register_webhook(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + return wire.wire__crate__binding__BindingBreezServices_sync(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRegisterWebhookConstMeta, - argValues: [webhookUrl], + constMeta: kCrateBindingBindingBreezServicesSyncConstMeta, + argValues: [that], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingRegisterWebhookConstMeta => const TaskConstMeta( - debugName: "register_webhook", - argNames: ["webhookUrl"], + TaskConstMeta get kCrateBindingBindingBreezServicesSyncConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_sync", + argNames: ["that"], ); @override - Future crateBindingReportIssue({required ReportIssueRequest req, dynamic hint}) { + Future crateBindingBindingBreezServicesUnregisterWebhook( + {required BindingBreezServices that, required String webhookUrl, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_report_issue_request(req); - return wire.wire__crate__binding__report_issue(port_, arg0); + var arg0 = + cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + that); + var arg1 = cst_encode_String(webhookUrl); + return wire.wire__crate__binding__BindingBreezServices_unregister_webhook(port_, arg0, arg1); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingReportIssueConstMeta, - argValues: [req], + constMeta: kCrateBindingBindingBreezServicesUnregisterWebhookConstMeta, + argValues: [that, webhookUrl], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingReportIssueConstMeta => const TaskConstMeta( - debugName: "report_issue", - argNames: ["req"], + TaskConstMeta get kCrateBindingBindingBreezServicesUnregisterWebhookConstMeta => const TaskConstMeta( + debugName: "BindingBreezServices_unregister_webhook", + argNames: ["that", "webhookUrl"], ); @override - Future crateBindingRescanSwaps({dynamic hint}) { - return handler.executeNormal(NormalTask( + Stream crateBindingBreezEventsStream({dynamic hint}) { + final s = RustStreamSink(); + unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__rescan_swaps(port_); + var arg0 = cst_encode_StreamSink_breez_event_Dco(s); + return wire.wire__crate__binding__breez_events_stream(port_, arg0); }, codec: DcoCodec( decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingRescanSwapsConstMeta, - argValues: [], + constMeta: kCrateBindingBreezEventsStreamConstMeta, + argValues: [s], apiImpl: this, hint: hint, - )); + ))); + return s.stream; } - TaskConstMeta get kCrateBindingRescanSwapsConstMeta => const TaskConstMeta( - debugName: "rescan_swaps", - argNames: [], + TaskConstMeta get kCrateBindingBreezEventsStreamConstMeta => const TaskConstMeta( + debugName: "breez_events_stream", + argNames: ["s"], ); @override - Future crateBindingSendOnchain({required SendOnchainRequest req, dynamic hint}) { - return handler.executeNormal(NormalTask( + Stream crateBindingBreezLogStream({dynamic hint}) { + final s = RustStreamSink(); + unawaited(handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_send_onchain_request(req); - return wire.wire__crate__binding__send_onchain(port_, arg0); + var arg0 = cst_encode_StreamSink_log_entry_Dco(s); + return wire.wire__crate__binding__breez_log_stream(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_send_onchain_response, + decodeSuccessData: dco_decode_unit, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingSendOnchainConstMeta, - argValues: [req], + constMeta: kCrateBindingBreezLogStreamConstMeta, + argValues: [s], apiImpl: this, hint: hint, - )); + ))); + return s.stream; } - TaskConstMeta get kCrateBindingSendOnchainConstMeta => const TaskConstMeta( - debugName: "send_onchain", - argNames: ["req"], + TaskConstMeta get kCrateBindingBreezLogStreamConstMeta => const TaskConstMeta( + debugName: "breez_log_stream", + argNames: ["s"], ); @override - Future crateBindingSendPayment({required SendPaymentRequest req, dynamic hint}) { + Future crateBindingConnect({required ConnectRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_send_payment_request(req); - return wire.wire__crate__binding__send_payment(port_, arg0); + var arg0 = cst_encode_box_autoadd_connect_request(req); + return wire.wire__crate__binding__connect(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_send_payment_response, - decodeErrorData: dco_decode_AnyhowException, + decodeSuccessData: + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices, + decodeErrorData: dco_decode_connect_error, ), - constMeta: kCrateBindingSendPaymentConstMeta, + constMeta: kCrateBindingConnectConstMeta, argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingSendPaymentConstMeta => const TaskConstMeta( - debugName: "send_payment", + TaskConstMeta get kCrateBindingConnectConstMeta => const TaskConstMeta( + debugName: "connect", argNames: ["req"], ); @override - Future crateBindingSendSpontaneousPayment( - {required SendSpontaneousPaymentRequest req, dynamic hint}) { + Future crateBindingDefaultConfig( + {required EnvironmentType envType, + required String apiKey, + required NodeConfig nodeConfig, + dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_send_spontaneous_payment_request(req); - return wire.wire__crate__binding__send_spontaneous_payment(port_, arg0); + var arg0 = cst_encode_environment_type(envType); + var arg1 = cst_encode_String(apiKey); + var arg2 = cst_encode_box_autoadd_node_config(nodeConfig); + return wire.wire__crate__binding__default_config(port_, arg0, arg1, arg2); }, codec: DcoCodec( - decodeSuccessData: dco_decode_send_payment_response, - decodeErrorData: dco_decode_AnyhowException, + decodeSuccessData: dco_decode_config, + decodeErrorData: null, ), - constMeta: kCrateBindingSendSpontaneousPaymentConstMeta, - argValues: [req], + constMeta: kCrateBindingDefaultConfigConstMeta, + argValues: [envType, apiKey, nodeConfig], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingSendSpontaneousPaymentConstMeta => const TaskConstMeta( - debugName: "send_spontaneous_payment", - argNames: ["req"], + TaskConstMeta get kCrateBindingDefaultConfigConstMeta => const TaskConstMeta( + debugName: "default_config", + argNames: ["envType", "apiKey", "nodeConfig"], ); @override - Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}) { + Future crateBindingMnemonicToSeed({required String phrase, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(apiKey); - return wire.wire__crate__binding__service_health_check(port_, arg0); + var arg0 = cst_encode_String(phrase); + return wire.wire__crate__binding__mnemonic_to_seed(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_service_health_check_response, + decodeSuccessData: dco_decode_list_prim_u_8_strict, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingServiceHealthCheckConstMeta, - argValues: [apiKey], + constMeta: kCrateBindingMnemonicToSeedConstMeta, + argValues: [phrase], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingServiceHealthCheckConstMeta => const TaskConstMeta( - debugName: "service_health_check", - argNames: ["apiKey"], + TaskConstMeta get kCrateBindingMnemonicToSeedConstMeta => const TaskConstMeta( + debugName: "mnemonic_to_seed", + argNames: ["phrase"], ); @override - Future crateBindingSetPaymentMetadata( - {required String hash, required String metadata, dynamic hint}) { + Future crateBindingParseInput({required String input, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_String(hash); - var arg1 = cst_encode_String(metadata); - return wire.wire__crate__binding__set_payment_metadata(port_, arg0, arg1); + var arg0 = cst_encode_String(input); + return wire.wire__crate__binding__parse_input(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_input_type, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingSetPaymentMetadataConstMeta, - argValues: [hash, metadata], + constMeta: kCrateBindingParseInputConstMeta, + argValues: [input], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingSetPaymentMetadataConstMeta => const TaskConstMeta( - debugName: "set_payment_metadata", - argNames: ["hash", "metadata"], + TaskConstMeta get kCrateBindingParseInputConstMeta => const TaskConstMeta( + debugName: "parse_input", + argNames: ["input"], ); @override - Future crateBindingSignMessage({required SignMessageRequest req, dynamic hint}) { + Future crateBindingParseInvoice({required String invoice, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_sign_message_request(req); - return wire.wire__crate__binding__sign_message(port_, arg0); + var arg0 = cst_encode_String(invoice); + return wire.wire__crate__binding__parse_invoice(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_sign_message_response, + decodeSuccessData: dco_decode_ln_invoice, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingSignMessageConstMeta, - argValues: [req], + constMeta: kCrateBindingParseInvoiceConstMeta, + argValues: [invoice], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingSignMessageConstMeta => const TaskConstMeta( - debugName: "sign_message", - argNames: ["req"], + TaskConstMeta get kCrateBindingParseInvoiceConstMeta => const TaskConstMeta( + debugName: "parse_invoice", + argNames: ["invoice"], ); @override - Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}) { + Future crateBindingServiceHealthCheck({required String apiKey, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - var arg0 = cst_encode_box_autoadd_static_backup_request(req); - return wire.wire__crate__binding__static_backup(port_, arg0); + var arg0 = cst_encode_String(apiKey); + return wire.wire__crate__binding__service_health_check(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_static_backup_response, + decodeSuccessData: dco_decode_service_health_check_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingStaticBackupConstMeta, - argValues: [req], + constMeta: kCrateBindingServiceHealthCheckConstMeta, + argValues: [apiKey], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingStaticBackupConstMeta => const TaskConstMeta( - debugName: "static_backup", - argNames: ["req"], + TaskConstMeta get kCrateBindingServiceHealthCheckConstMeta => const TaskConstMeta( + debugName: "service_health_check", + argNames: ["apiKey"], ); @override - Future crateBindingSync({dynamic hint}) { + Future crateBindingStaticBackup({required StaticBackupRequest req, dynamic hint}) { return handler.executeNormal(NormalTask( callFfi: (port_) { - return wire.wire__crate__binding__sync(port_); + var arg0 = cst_encode_box_autoadd_static_backup_request(req); + return wire.wire__crate__binding__static_backup(port_, arg0); }, codec: DcoCodec( - decodeSuccessData: dco_decode_unit, + decodeSuccessData: dco_decode_static_backup_response, decodeErrorData: dco_decode_AnyhowException, ), - constMeta: kCrateBindingSyncConstMeta, - argValues: [], + constMeta: kCrateBindingStaticBackupConstMeta, + argValues: [req], apiImpl: this, hint: hint, )); } - TaskConstMeta get kCrateBindingSyncConstMeta => const TaskConstMeta( - debugName: "sync", - argNames: [], + TaskConstMeta get kCrateBindingStaticBackupConstMeta => const TaskConstMeta( + debugName: "static_backup", + argNames: ["req"], ); - @override - Future crateBindingUnregisterWebhook({required String webhookUrl, dynamic hint}) { - return handler.executeNormal(NormalTask( - callFfi: (port_) { - var arg0 = cst_encode_String(webhookUrl); - return wire.wire__crate__binding__unregister_webhook(port_, arg0); - }, - codec: DcoCodec( - decodeSuccessData: dco_decode_unit, - decodeErrorData: dco_decode_AnyhowException, - ), - constMeta: kCrateBindingUnregisterWebhookConstMeta, - argValues: [webhookUrl], - apiImpl: this, - hint: hint, - )); - } + RustArcIncrementStrongCountFnType get rust_arc_increment_strong_count_BindingBreezServices => wire + .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices; - TaskConstMeta get kCrateBindingUnregisterWebhookConstMeta => const TaskConstMeta( - debugName: "unregister_webhook", - argNames: ["webhookUrl"], - ); + RustArcDecrementStrongCountFnType get rust_arc_decrement_strong_count_BindingBreezServices => wire + .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices; @protected AnyhowException dco_decode_AnyhowException(dynamic raw) { @@ -1619,6 +1845,30 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return AnyhowException(raw as String); } + @protected + BindingBreezServices + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + + @protected + BindingBreezServices + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + + @protected + BindingBreezServices + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return BindingBreezServices.dcoDecode(raw as List); + } + @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -2186,6 +2436,27 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + ConnectError dco_decode_connect_error(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + switch (raw[0]) { + case 0: + return ConnectError_Generic( + err: dco_decode_String(raw[1]), + ); + case 1: + return ConnectError_RestoreOnly( + err: dco_decode_String(raw[1]), + ); + case 2: + return ConnectError_ServiceConnectivity( + err: dco_decode_String(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + @protected ConnectRequest dco_decode_connect_request(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs @@ -3605,6 +3876,12 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements ); } + @protected + BigInt dco_decode_usize(dynamic raw) { + // Codec=Dco (DartCObject based), see doc to use other codecs + return dcoDecodeU64(raw); + } + @protected AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -3612,6 +3889,30 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return AnyhowException(inner); } + @protected + BindingBreezServices + sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BindingBreezServices + sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + + @protected + BindingBreezServices + sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return BindingBreezServices.sseDecode(sse_decode_usize(deserializer), sse_decode_i_32(deserializer)); + } + @protected RustStreamSink sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -4173,6 +4474,26 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return ConfigureNodeRequest(closeToAddress: var_closeToAddress); } + @protected + ConnectError sse_decode_connect_error(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + + var tag_ = sse_decode_i_32(deserializer); + switch (tag_) { + case 0: + var var_err = sse_decode_String(deserializer); + return ConnectError_Generic(err: var_err); + case 1: + var var_err = sse_decode_String(deserializer); + return ConnectError_RestoreOnly(err: var_err); + case 2: + var var_err = sse_decode_String(deserializer); + return ConnectError_ServiceConnectivity(err: var_err); + default: + throw UnimplementedError(''); + } + } + @protected ConnectRequest sse_decode_connect_request(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -5765,6 +6086,36 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements return UrlSuccessActionData(description: var_description, url: var_url); } + @protected + BigInt sse_decode_usize(SseDeserializer deserializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + return deserializer.buffer.getBigUint64(); + } + + @protected + int cst_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(move: true); + } + + @protected + int cst_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(move: false); + } + + @protected + int cst_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices raw) { + // Codec=Cst (C-struct based), see doc to use other codecs +// ignore: invalid_use_of_internal_member + return raw.cstEncode(); + } + @protected bool cst_encode_bool(bool raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -5879,6 +6230,28 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.message, serializer); } + @protected + void + sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: true), serializer); + } + + @protected + void sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: false), serializer); + } + + @protected + void sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + BindingBreezServices self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + sse_encode_usize(self.sseEncode(move: null), serializer); + } + @protected void sse_encode_StreamSink_breez_event_Dco(RustStreamSink self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -6410,6 +6783,22 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_opt_String(self.closeToAddress, serializer); } + @protected + void sse_encode_connect_error(ConnectError self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + switch (self) { + case ConnectError_Generic(err: final err): + sse_encode_i_32(0, serializer); + sse_encode_String(err, serializer); + case ConnectError_RestoreOnly(err: final err): + sse_encode_i_32(1, serializer); + sse_encode_String(err, serializer); + case ConnectError_ServiceConnectivity(err: final err): + sse_encode_i_32(2, serializer); + sse_encode_String(err, serializer); + } + } + @protected void sse_encode_connect_request(ConnectRequest self, SseSerializer serializer) { // Codec=Sse (Serialization based), see doc to use other codecs @@ -7650,4 +8039,10 @@ class BreezSdkBindingsApiImpl extends BreezSdkBindingsApiImplPlatform implements sse_encode_String(self.description, serializer); sse_encode_String(self.url, serializer); } + + @protected + void sse_encode_usize(BigInt self, SseSerializer serializer) { + // Codec=Sse (Serialization based), see doc to use other codecs + serializer.buffer.putBigUint64(self); + } } diff --git a/libs/sdk-flutter/lib/generated/frb_generated.io.dart b/libs/sdk-flutter/lib/generated/frb_generated.io.dart index be68d2c73..12188465c 100644 --- a/libs/sdk-flutter/lib/generated/frb_generated.io.dart +++ b/libs/sdk-flutter/lib/generated/frb_generated.io.dart @@ -9,6 +9,7 @@ import 'chain.dart'; import 'dart:async'; import 'dart:convert'; import 'dart:ffi' as ffi; +import 'error.dart'; import 'fiat.dart'; import 'frb_generated.dart'; import 'input_parser.dart'; @@ -26,9 +27,27 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl wire + ._rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr; + @protected AnyhowException dco_decode_AnyhowException(dynamic raw); + @protected + BindingBreezServices + dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw); + + @protected + BindingBreezServices + dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw); + + @protected + BindingBreezServices + dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + dynamic raw); + @protected RustStreamSink dco_decode_StreamSink_breez_event_Dco(dynamic raw); @@ -257,6 +276,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl sse_decode_StreamSink_breez_event_Dco(SseDeserializer deserializer); @@ -903,6 +943,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl cst_encode_AnyhowException(AnyhowException raw) { // Codec=Cst (C-struct based), see doc to use other codecs @@ -2147,6 +2193,12 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl self, SseSerializer serializer); @@ -3698,6 +3797,9 @@ abstract class BreezSdkBindingsApiImplPlatform extends BaseApiImpl(); - void wire__crate__binding__backup( - int port_, - ) { - return _wire__crate__binding__backup( - port_, - ); - } - - late final _wire__crate__binding__backupPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__backup'); - late final _wire__crate__binding__backup = - _wire__crate__binding__backupPtr.asFunction(); - - void wire__crate__binding__backup_status( - int port_, - ) { - return _wire__crate__binding__backup_status( - port_, - ); - } - - late final _wire__crate__binding__backup_statusPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__backup_status'); - late final _wire__crate__binding__backup_status = - _wire__crate__binding__backup_statusPtr.asFunction(); - - void wire__crate__binding__breez_events_stream( + void wire__crate__binding__BindingBreezServices_backup( int port_, - ffi.Pointer s, + int that, ) { - return _wire__crate__binding__breez_events_stream( + return _wire__crate__binding__BindingBreezServices_backup( port_, - s, + that, ); } - late final _wire__crate__binding__breez_events_streamPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__breez_events_stream'); - late final _wire__crate__binding__breez_events_stream = _wire__crate__binding__breez_events_streamPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_backupPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup'); + late final _wire__crate__binding__BindingBreezServices_backup = + _wire__crate__binding__BindingBreezServices_backupPtr.asFunction(); - void wire__crate__binding__breez_log_stream( + void wire__crate__binding__BindingBreezServices_backup_status( int port_, - ffi.Pointer s, + int that, ) { - return _wire__crate__binding__breez_log_stream( + return _wire__crate__binding__BindingBreezServices_backup_status( port_, - s, + that, ); } - late final _wire__crate__binding__breez_log_streamPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__breez_log_stream'); - late final _wire__crate__binding__breez_log_stream = _wire__crate__binding__breez_log_streamPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_backup_statusPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_backup_status'); + late final _wire__crate__binding__BindingBreezServices_backup_status = + _wire__crate__binding__BindingBreezServices_backup_statusPtr.asFunction(); - void wire__crate__binding__buy_bitcoin( + void wire__crate__binding__BindingBreezServices_buy_bitcoin( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__buy_bitcoin( + return _wire__crate__binding__BindingBreezServices_buy_bitcoin( port_, + that, req, ); } - late final _wire__crate__binding__buy_bitcoinPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__buy_bitcoin'); - late final _wire__crate__binding__buy_bitcoin = _wire__crate__binding__buy_bitcoinPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_buy_bitcoinPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_buy_bitcoin'); + late final _wire__crate__binding__BindingBreezServices_buy_bitcoin = + _wire__crate__binding__BindingBreezServices_buy_bitcoinPtr + .asFunction)>(); - void wire__crate__binding__check_message( + void wire__crate__binding__BindingBreezServices_check_message( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__check_message( + return _wire__crate__binding__BindingBreezServices_check_message( port_, + that, req, ); } - late final _wire__crate__binding__check_messagePtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__check_message'); - late final _wire__crate__binding__check_message = _wire__crate__binding__check_messagePtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_check_messagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_check_message'); + late final _wire__crate__binding__BindingBreezServices_check_message = + _wire__crate__binding__BindingBreezServices_check_messagePtr + .asFunction)>(); - void wire__crate__binding__close_lsp_channels( + void wire__crate__binding__BindingBreezServices_close_lsp_channels( int port_, + int that, ) { - return _wire__crate__binding__close_lsp_channels( + return _wire__crate__binding__BindingBreezServices_close_lsp_channels( port_, + that, ); } - late final _wire__crate__binding__close_lsp_channelsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__close_lsp_channels'); - late final _wire__crate__binding__close_lsp_channels = - _wire__crate__binding__close_lsp_channelsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_close_lsp_channelsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_close_lsp_channels'); + late final _wire__crate__binding__BindingBreezServices_close_lsp_channels = + _wire__crate__binding__BindingBreezServices_close_lsp_channelsPtr.asFunction(); - void wire__crate__binding__configure_node( + void wire__crate__binding__BindingBreezServices_configure_node( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__configure_node( - port_, - req, - ); - } - - late final _wire__crate__binding__configure_nodePtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__configure_node'); - late final _wire__crate__binding__configure_node = _wire__crate__binding__configure_nodePtr - .asFunction)>(); - - void wire__crate__binding__connect( - int port_, - ffi.Pointer req, - ) { - return _wire__crate__binding__connect( + return _wire__crate__binding__BindingBreezServices_configure_node( port_, + that, req, ); } - late final _wire__crate__binding__connectPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__connect'); - late final _wire__crate__binding__connect = _wire__crate__binding__connectPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_configure_nodePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_configure_node'); + late final _wire__crate__binding__BindingBreezServices_configure_node = + _wire__crate__binding__BindingBreezServices_configure_nodePtr + .asFunction)>(); - void wire__crate__binding__connect_lsp( + void wire__crate__binding__BindingBreezServices_connect_lsp( int port_, + int that, ffi.Pointer lsp_id, ) { - return _wire__crate__binding__connect_lsp( + return _wire__crate__binding__BindingBreezServices_connect_lsp( port_, + that, lsp_id, ); } - late final _wire__crate__binding__connect_lspPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__connect_lsp'); - late final _wire__crate__binding__connect_lsp = _wire__crate__binding__connect_lspPtr - .asFunction)>(); - - void wire__crate__binding__default_config( - int port_, - int env_type, - ffi.Pointer api_key, - ffi.Pointer node_config, - ) { - return _wire__crate__binding__default_config( - port_, - env_type, - api_key, - node_config, - ); - } - - late final _wire__crate__binding__default_configPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, - ffi.Pointer)>>('frbgen_breez_sdk_wire__crate__binding__default_config'); - late final _wire__crate__binding__default_config = _wire__crate__binding__default_configPtr.asFunction< - void Function( - int, int, ffi.Pointer, ffi.Pointer)>(); + late final _wire__crate__binding__BindingBreezServices_connect_lspPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_connect_lsp'); + late final _wire__crate__binding__BindingBreezServices_connect_lsp = + _wire__crate__binding__BindingBreezServices_connect_lspPtr + .asFunction)>(); - void wire__crate__binding__disconnect( + void wire__crate__binding__BindingBreezServices_disconnect( int port_, + int that, ) { - return _wire__crate__binding__disconnect( + return _wire__crate__binding__BindingBreezServices_disconnect( port_, + that, ); } - late final _wire__crate__binding__disconnectPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__disconnect'); - late final _wire__crate__binding__disconnect = - _wire__crate__binding__disconnectPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_disconnectPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_disconnect'); + late final _wire__crate__binding__BindingBreezServices_disconnect = + _wire__crate__binding__BindingBreezServices_disconnectPtr.asFunction(); - void wire__crate__binding__execute_command( + void wire__crate__binding__BindingBreezServices_execute_command( int port_, + int that, ffi.Pointer command, ) { - return _wire__crate__binding__execute_command( + return _wire__crate__binding__BindingBreezServices_execute_command( port_, + that, command, ); } - late final _wire__crate__binding__execute_commandPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__execute_command'); - late final _wire__crate__binding__execute_command = _wire__crate__binding__execute_commandPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_execute_commandPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_execute_command'); + late final _wire__crate__binding__BindingBreezServices_execute_command = + _wire__crate__binding__BindingBreezServices_execute_commandPtr + .asFunction)>(); - void wire__crate__binding__fetch_fiat_rates( + void wire__crate__binding__BindingBreezServices_fetch_fiat_rates( int port_, + int that, ) { - return _wire__crate__binding__fetch_fiat_rates( + return _wire__crate__binding__BindingBreezServices_fetch_fiat_rates( port_, + that, ); } - late final _wire__crate__binding__fetch_fiat_ratesPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__fetch_fiat_rates'); - late final _wire__crate__binding__fetch_fiat_rates = - _wire__crate__binding__fetch_fiat_ratesPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_fetch_fiat_ratesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_fiat_rates'); + late final _wire__crate__binding__BindingBreezServices_fetch_fiat_rates = + _wire__crate__binding__BindingBreezServices_fetch_fiat_ratesPtr.asFunction(); - void wire__crate__binding__fetch_lsp_info( + void wire__crate__binding__BindingBreezServices_fetch_lsp_info( int port_, + int that, ffi.Pointer id, ) { - return _wire__crate__binding__fetch_lsp_info( + return _wire__crate__binding__BindingBreezServices_fetch_lsp_info( port_, + that, id, ); } - late final _wire__crate__binding__fetch_lsp_infoPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__fetch_lsp_info'); - late final _wire__crate__binding__fetch_lsp_info = _wire__crate__binding__fetch_lsp_infoPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_fetch_lsp_infoPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_lsp_info'); + late final _wire__crate__binding__BindingBreezServices_fetch_lsp_info = + _wire__crate__binding__BindingBreezServices_fetch_lsp_infoPtr + .asFunction)>(); - void wire__crate__binding__fetch_reverse_swap_fees( + void wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__fetch_reverse_swap_fees( + return _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees( port_, + that, req, ); } - late final _wire__crate__binding__fetch_reverse_swap_feesPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__fetch_reverse_swap_fees'); - late final _wire__crate__binding__fetch_reverse_swap_fees = - _wire__crate__binding__fetch_reverse_swap_feesPtr - .asFunction)>(); - - void wire__crate__binding__generate_diagnostic_data( - int port_, - ) { - return _wire__crate__binding__generate_diagnostic_data( - port_, - ); - } - - late final _wire__crate__binding__generate_diagnostic_dataPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__generate_diagnostic_data'); - late final _wire__crate__binding__generate_diagnostic_data = - _wire__crate__binding__generate_diagnostic_dataPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_feesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees'); + late final _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_fees = + _wire__crate__binding__BindingBreezServices_fetch_reverse_swap_feesPtr + .asFunction)>(); - void wire__crate__binding__in_progress_onchain_payments( + void wire__crate__binding__BindingBreezServices_generate_diagnostic_data( int port_, + int that, ) { - return _wire__crate__binding__in_progress_onchain_payments( + return _wire__crate__binding__BindingBreezServices_generate_diagnostic_data( port_, + that, ); } - late final _wire__crate__binding__in_progress_onchain_paymentsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__in_progress_onchain_payments'); - late final _wire__crate__binding__in_progress_onchain_payments = - _wire__crate__binding__in_progress_onchain_paymentsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_generate_diagnostic_dataPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_generate_diagnostic_data'); + late final _wire__crate__binding__BindingBreezServices_generate_diagnostic_data = + _wire__crate__binding__BindingBreezServices_generate_diagnostic_dataPtr + .asFunction(); - void wire__crate__binding__in_progress_reverse_swaps( + void wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( int port_, + int that, ) { - return _wire__crate__binding__in_progress_reverse_swaps( + return _wire__crate__binding__BindingBreezServices_in_progress_onchain_payments( port_, + that, ); } - late final _wire__crate__binding__in_progress_reverse_swapsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__in_progress_reverse_swaps'); - late final _wire__crate__binding__in_progress_reverse_swaps = - _wire__crate__binding__in_progress_reverse_swapsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_in_progress_onchain_paymentsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_onchain_payments'); + late final _wire__crate__binding__BindingBreezServices_in_progress_onchain_payments = + _wire__crate__binding__BindingBreezServices_in_progress_onchain_paymentsPtr + .asFunction(); - void wire__crate__binding__in_progress_swap( + void wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( int port_, + int that, ) { - return _wire__crate__binding__in_progress_swap( + return _wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps( port_, + that, ); } - late final _wire__crate__binding__in_progress_swapPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__in_progress_swap'); - late final _wire__crate__binding__in_progress_swap = - _wire__crate__binding__in_progress_swapPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_in_progress_reverse_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps'); + late final _wire__crate__binding__BindingBreezServices_in_progress_reverse_swaps = + _wire__crate__binding__BindingBreezServices_in_progress_reverse_swapsPtr + .asFunction(); - void wire__crate__binding__is_initialized( + void wire__crate__binding__BindingBreezServices_in_progress_swap( int port_, + int that, ) { - return _wire__crate__binding__is_initialized( + return _wire__crate__binding__BindingBreezServices_in_progress_swap( port_, + that, ); } - late final _wire__crate__binding__is_initializedPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__is_initialized'); - late final _wire__crate__binding__is_initialized = - _wire__crate__binding__is_initializedPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_in_progress_swapPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_in_progress_swap'); + late final _wire__crate__binding__BindingBreezServices_in_progress_swap = + _wire__crate__binding__BindingBreezServices_in_progress_swapPtr.asFunction(); - void wire__crate__binding__list_fiat_currencies( + void wire__crate__binding__BindingBreezServices_list_fiat_currencies( int port_, + int that, ) { - return _wire__crate__binding__list_fiat_currencies( + return _wire__crate__binding__BindingBreezServices_list_fiat_currencies( port_, + that, ); } - late final _wire__crate__binding__list_fiat_currenciesPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__list_fiat_currencies'); - late final _wire__crate__binding__list_fiat_currencies = - _wire__crate__binding__list_fiat_currenciesPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_list_fiat_currenciesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_fiat_currencies'); + late final _wire__crate__binding__BindingBreezServices_list_fiat_currencies = + _wire__crate__binding__BindingBreezServices_list_fiat_currenciesPtr + .asFunction(); - void wire__crate__binding__list_lsps( + void wire__crate__binding__BindingBreezServices_list_lsps( int port_, + int that, ) { - return _wire__crate__binding__list_lsps( + return _wire__crate__binding__BindingBreezServices_list_lsps( port_, + that, ); } - late final _wire__crate__binding__list_lspsPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__list_lsps'); - late final _wire__crate__binding__list_lsps = - _wire__crate__binding__list_lspsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_list_lspsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_lsps'); + late final _wire__crate__binding__BindingBreezServices_list_lsps = + _wire__crate__binding__BindingBreezServices_list_lspsPtr.asFunction(); - void wire__crate__binding__list_payments( + void wire__crate__binding__BindingBreezServices_list_payments( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__list_payments( + return _wire__crate__binding__BindingBreezServices_list_payments( port_, + that, req, ); } - late final _wire__crate__binding__list_paymentsPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__list_payments'); - late final _wire__crate__binding__list_payments = _wire__crate__binding__list_paymentsPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_list_paymentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_payments'); + late final _wire__crate__binding__BindingBreezServices_list_payments = + _wire__crate__binding__BindingBreezServices_list_paymentsPtr + .asFunction)>(); - void wire__crate__binding__list_refundables( + void wire__crate__binding__BindingBreezServices_list_refundables( int port_, + int that, ) { - return _wire__crate__binding__list_refundables( + return _wire__crate__binding__BindingBreezServices_list_refundables( port_, + that, ); } - late final _wire__crate__binding__list_refundablesPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__list_refundables'); - late final _wire__crate__binding__list_refundables = - _wire__crate__binding__list_refundablesPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_list_refundablesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_list_refundables'); + late final _wire__crate__binding__BindingBreezServices_list_refundables = + _wire__crate__binding__BindingBreezServices_list_refundablesPtr.asFunction(); - void wire__crate__binding__lnurl_auth( + void wire__crate__binding__BindingBreezServices_lnurl_auth( int port_, + int that, ffi.Pointer req_data, ) { - return _wire__crate__binding__lnurl_auth( + return _wire__crate__binding__BindingBreezServices_lnurl_auth( port_, + that, req_data, ); } - late final _wire__crate__binding__lnurl_authPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__lnurl_auth'); - late final _wire__crate__binding__lnurl_auth = _wire__crate__binding__lnurl_authPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_lnurl_authPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_auth'); + late final _wire__crate__binding__BindingBreezServices_lnurl_auth = + _wire__crate__binding__BindingBreezServices_lnurl_authPtr + .asFunction)>(); - void wire__crate__binding__lnurl_pay( + void wire__crate__binding__BindingBreezServices_lnurl_pay( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__lnurl_pay( + return _wire__crate__binding__BindingBreezServices_lnurl_pay( port_, + that, req, ); } - late final _wire__crate__binding__lnurl_payPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__lnurl_pay'); - late final _wire__crate__binding__lnurl_pay = _wire__crate__binding__lnurl_payPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_lnurl_payPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_pay'); + late final _wire__crate__binding__BindingBreezServices_lnurl_pay = + _wire__crate__binding__BindingBreezServices_lnurl_payPtr + .asFunction)>(); - void wire__crate__binding__lnurl_withdraw( + void wire__crate__binding__BindingBreezServices_lnurl_withdraw( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__lnurl_withdraw( + return _wire__crate__binding__BindingBreezServices_lnurl_withdraw( port_, + that, req, ); } - late final _wire__crate__binding__lnurl_withdrawPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__lnurl_withdraw'); - late final _wire__crate__binding__lnurl_withdraw = _wire__crate__binding__lnurl_withdrawPtr - .asFunction)>(); - - void wire__crate__binding__lsp_id( - int port_, - ) { - return _wire__crate__binding__lsp_id( - port_, - ); - } - - late final _wire__crate__binding__lsp_idPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__lsp_id'); - late final _wire__crate__binding__lsp_id = - _wire__crate__binding__lsp_idPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_lnurl_withdrawPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lnurl_withdraw'); + late final _wire__crate__binding__BindingBreezServices_lnurl_withdraw = + _wire__crate__binding__BindingBreezServices_lnurl_withdrawPtr + .asFunction)>(); - void wire__crate__binding__lsp_info( + void wire__crate__binding__BindingBreezServices_lsp_id( int port_, + int that, ) { - return _wire__crate__binding__lsp_info( + return _wire__crate__binding__BindingBreezServices_lsp_id( port_, + that, ); } - late final _wire__crate__binding__lsp_infoPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__lsp_info'); - late final _wire__crate__binding__lsp_info = - _wire__crate__binding__lsp_infoPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_lsp_idPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_id'); + late final _wire__crate__binding__BindingBreezServices_lsp_id = + _wire__crate__binding__BindingBreezServices_lsp_idPtr.asFunction(); - void wire__crate__binding__max_reverse_swap_amount( + void wire__crate__binding__BindingBreezServices_lsp_info( int port_, + int that, ) { - return _wire__crate__binding__max_reverse_swap_amount( + return _wire__crate__binding__BindingBreezServices_lsp_info( port_, + that, ); } - late final _wire__crate__binding__max_reverse_swap_amountPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__max_reverse_swap_amount'); - late final _wire__crate__binding__max_reverse_swap_amount = - _wire__crate__binding__max_reverse_swap_amountPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_lsp_infoPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_lsp_info'); + late final _wire__crate__binding__BindingBreezServices_lsp_info = + _wire__crate__binding__BindingBreezServices_lsp_infoPtr.asFunction(); - void wire__crate__binding__mnemonic_to_seed( + void wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( int port_, - ffi.Pointer phrase, + int that, ) { - return _wire__crate__binding__mnemonic_to_seed( + return _wire__crate__binding__BindingBreezServices_max_reverse_swap_amount( port_, - phrase, + that, ); } - late final _wire__crate__binding__mnemonic_to_seedPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed'); - late final _wire__crate__binding__mnemonic_to_seed = _wire__crate__binding__mnemonic_to_seedPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_max_reverse_swap_amountPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_max_reverse_swap_amount'); + late final _wire__crate__binding__BindingBreezServices_max_reverse_swap_amount = + _wire__crate__binding__BindingBreezServices_max_reverse_swap_amountPtr + .asFunction(); - void wire__crate__binding__node_credentials( + void wire__crate__binding__BindingBreezServices_node_credentials( int port_, + int that, ) { - return _wire__crate__binding__node_credentials( + return _wire__crate__binding__BindingBreezServices_node_credentials( port_, + that, ); } - late final _wire__crate__binding__node_credentialsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__node_credentials'); - late final _wire__crate__binding__node_credentials = - _wire__crate__binding__node_credentialsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_node_credentialsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_credentials'); + late final _wire__crate__binding__BindingBreezServices_node_credentials = + _wire__crate__binding__BindingBreezServices_node_credentialsPtr.asFunction(); - void wire__crate__binding__node_info( + void wire__crate__binding__BindingBreezServices_node_info( int port_, + int that, ) { - return _wire__crate__binding__node_info( + return _wire__crate__binding__BindingBreezServices_node_info( port_, + that, ); } - late final _wire__crate__binding__node_infoPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__node_info'); - late final _wire__crate__binding__node_info = - _wire__crate__binding__node_infoPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_node_infoPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_node_info'); + late final _wire__crate__binding__BindingBreezServices_node_info = + _wire__crate__binding__BindingBreezServices_node_infoPtr.asFunction(); - void wire__crate__binding__onchain_payment_limits( + void wire__crate__binding__BindingBreezServices_onchain_payment_limits( int port_, + int that, ) { - return _wire__crate__binding__onchain_payment_limits( + return _wire__crate__binding__BindingBreezServices_onchain_payment_limits( port_, + that, ); } - late final _wire__crate__binding__onchain_payment_limitsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__onchain_payment_limits'); - late final _wire__crate__binding__onchain_payment_limits = - _wire__crate__binding__onchain_payment_limitsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_onchain_payment_limitsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_onchain_payment_limits'); + late final _wire__crate__binding__BindingBreezServices_onchain_payment_limits = + _wire__crate__binding__BindingBreezServices_onchain_payment_limitsPtr + .asFunction(); - void wire__crate__binding__open_channel_fee( + void wire__crate__binding__BindingBreezServices_open_channel_fee( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__open_channel_fee( + return _wire__crate__binding__BindingBreezServices_open_channel_fee( port_, + that, req, ); } - late final _wire__crate__binding__open_channel_feePtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__open_channel_fee'); - late final _wire__crate__binding__open_channel_fee = _wire__crate__binding__open_channel_feePtr - .asFunction)>(); - - void wire__crate__binding__parse_input( - int port_, - ffi.Pointer input, - ) { - return _wire__crate__binding__parse_input( - port_, - input, - ); - } - - late final _wire__crate__binding__parse_inputPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__parse_input'); - late final _wire__crate__binding__parse_input = _wire__crate__binding__parse_inputPtr - .asFunction)>(); - - void wire__crate__binding__parse_invoice( - int port_, - ffi.Pointer invoice, - ) { - return _wire__crate__binding__parse_invoice( - port_, - invoice, - ); - } - - late final _wire__crate__binding__parse_invoicePtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__parse_invoice'); - late final _wire__crate__binding__parse_invoice = _wire__crate__binding__parse_invoicePtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_open_channel_feePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_open_channel_fee'); + late final _wire__crate__binding__BindingBreezServices_open_channel_fee = + _wire__crate__binding__BindingBreezServices_open_channel_feePtr + .asFunction)>(); - void wire__crate__binding__pay_onchain( + void wire__crate__binding__BindingBreezServices_pay_onchain( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__pay_onchain( + return _wire__crate__binding__BindingBreezServices_pay_onchain( port_, + that, req, ); } - late final _wire__crate__binding__pay_onchainPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__pay_onchain'); - late final _wire__crate__binding__pay_onchain = _wire__crate__binding__pay_onchainPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_pay_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_pay_onchain'); + late final _wire__crate__binding__BindingBreezServices_pay_onchain = + _wire__crate__binding__BindingBreezServices_pay_onchainPtr + .asFunction)>(); - void wire__crate__binding__payment_by_hash( + void wire__crate__binding__BindingBreezServices_payment_by_hash( int port_, + int that, ffi.Pointer hash, ) { - return _wire__crate__binding__payment_by_hash( + return _wire__crate__binding__BindingBreezServices_payment_by_hash( port_, + that, hash, ); } - late final _wire__crate__binding__payment_by_hashPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__payment_by_hash'); - late final _wire__crate__binding__payment_by_hash = _wire__crate__binding__payment_by_hashPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_payment_by_hashPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_payment_by_hash'); + late final _wire__crate__binding__BindingBreezServices_payment_by_hash = + _wire__crate__binding__BindingBreezServices_payment_by_hashPtr + .asFunction)>(); - void wire__crate__binding__prepare_onchain_payment( + void wire__crate__binding__BindingBreezServices_prepare_onchain_payment( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__prepare_onchain_payment( + return _wire__crate__binding__BindingBreezServices_prepare_onchain_payment( port_, + that, req, ); } - late final _wire__crate__binding__prepare_onchain_paymentPtr = _lookup< + late final _wire__crate__binding__BindingBreezServices_prepare_onchain_paymentPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire__crate__binding__prepare_onchain_payment'); - late final _wire__crate__binding__prepare_onchain_payment = - _wire__crate__binding__prepare_onchain_paymentPtr - .asFunction)>(); - - void wire__crate__binding__prepare_redeem_onchain_funds( + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_onchain_payment'); + late final _wire__crate__binding__BindingBreezServices_prepare_onchain_payment = + _wire__crate__binding__BindingBreezServices_prepare_onchain_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__prepare_redeem_onchain_funds( + return _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds( port_, + that, req, ); } - late final _wire__crate__binding__prepare_redeem_onchain_fundsPtr = _lookup< + late final _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_fundsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire__crate__binding__prepare_redeem_onchain_funds'); - late final _wire__crate__binding__prepare_redeem_onchain_funds = - _wire__crate__binding__prepare_redeem_onchain_fundsPtr - .asFunction)>(); - - void wire__crate__binding__prepare_refund( + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds'); + late final _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_funds = + _wire__crate__binding__BindingBreezServices_prepare_redeem_onchain_fundsPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_prepare_refund( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__prepare_refund( + return _wire__crate__binding__BindingBreezServices_prepare_refund( port_, + that, req, ); } - late final _wire__crate__binding__prepare_refundPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__prepare_refund'); - late final _wire__crate__binding__prepare_refund = _wire__crate__binding__prepare_refundPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_prepare_refundPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_prepare_refund'); + late final _wire__crate__binding__BindingBreezServices_prepare_refund = + _wire__crate__binding__BindingBreezServices_prepare_refundPtr + .asFunction)>(); - void wire__crate__binding__receive_onchain( + void wire__crate__binding__BindingBreezServices_receive_onchain( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__receive_onchain( + return _wire__crate__binding__BindingBreezServices_receive_onchain( port_, + that, req, ); } - late final _wire__crate__binding__receive_onchainPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__receive_onchain'); - late final _wire__crate__binding__receive_onchain = _wire__crate__binding__receive_onchainPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_receive_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_onchain'); + late final _wire__crate__binding__BindingBreezServices_receive_onchain = + _wire__crate__binding__BindingBreezServices_receive_onchainPtr + .asFunction)>(); - void wire__crate__binding__receive_payment( + void wire__crate__binding__BindingBreezServices_receive_payment( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__receive_payment( + return _wire__crate__binding__BindingBreezServices_receive_payment( port_, + that, req, ); } - late final _wire__crate__binding__receive_paymentPtr = _lookup< - ffi.NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__receive_payment'); - late final _wire__crate__binding__receive_payment = _wire__crate__binding__receive_paymentPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_receive_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_receive_payment'); + late final _wire__crate__binding__BindingBreezServices_receive_payment = + _wire__crate__binding__BindingBreezServices_receive_paymentPtr + .asFunction)>(); - void wire__crate__binding__recommended_fees( + void wire__crate__binding__BindingBreezServices_recommended_fees( int port_, + int that, ) { - return _wire__crate__binding__recommended_fees( + return _wire__crate__binding__BindingBreezServices_recommended_fees( port_, + that, ); } - late final _wire__crate__binding__recommended_feesPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__recommended_fees'); - late final _wire__crate__binding__recommended_fees = - _wire__crate__binding__recommended_feesPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_recommended_feesPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_recommended_fees'); + late final _wire__crate__binding__BindingBreezServices_recommended_fees = + _wire__crate__binding__BindingBreezServices_recommended_feesPtr.asFunction(); - void wire__crate__binding__redeem_onchain_funds( + void wire__crate__binding__BindingBreezServices_redeem_onchain_funds( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__redeem_onchain_funds( + return _wire__crate__binding__BindingBreezServices_redeem_onchain_funds( port_, + that, req, ); } - late final _wire__crate__binding__redeem_onchain_fundsPtr = _lookup< - ffi - .NativeFunction)>>( - 'frbgen_breez_sdk_wire__crate__binding__redeem_onchain_funds'); - late final _wire__crate__binding__redeem_onchain_funds = _wire__crate__binding__redeem_onchain_fundsPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_redeem_onchain_fundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_onchain_funds'); + late final _wire__crate__binding__BindingBreezServices_redeem_onchain_funds = + _wire__crate__binding__BindingBreezServices_redeem_onchain_fundsPtr + .asFunction)>(); - void wire__crate__binding__redeem_swap( + void wire__crate__binding__BindingBreezServices_redeem_swap( int port_, + int that, ffi.Pointer swap_address, ) { - return _wire__crate__binding__redeem_swap( + return _wire__crate__binding__BindingBreezServices_redeem_swap( port_, + that, swap_address, ); } - late final _wire__crate__binding__redeem_swapPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__redeem_swap'); - late final _wire__crate__binding__redeem_swap = _wire__crate__binding__redeem_swapPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_redeem_swapPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_redeem_swap'); + late final _wire__crate__binding__BindingBreezServices_redeem_swap = + _wire__crate__binding__BindingBreezServices_redeem_swapPtr + .asFunction)>(); - void wire__crate__binding__refund( + void wire__crate__binding__BindingBreezServices_refund( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__refund( + return _wire__crate__binding__BindingBreezServices_refund( port_, + that, req, ); } - late final _wire__crate__binding__refundPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__refund'); - late final _wire__crate__binding__refund = - _wire__crate__binding__refundPtr.asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_refundPtr = _lookup< + ffi + .NativeFunction)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_refund'); + late final _wire__crate__binding__BindingBreezServices_refund = + _wire__crate__binding__BindingBreezServices_refundPtr + .asFunction)>(); - void wire__crate__binding__register_webhook( + void wire__crate__binding__BindingBreezServices_register_webhook( int port_, + int that, ffi.Pointer webhook_url, ) { - return _wire__crate__binding__register_webhook( + return _wire__crate__binding__BindingBreezServices_register_webhook( port_, + that, webhook_url, ); } - late final _wire__crate__binding__register_webhookPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__register_webhook'); - late final _wire__crate__binding__register_webhook = _wire__crate__binding__register_webhookPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_register_webhookPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_register_webhook'); + late final _wire__crate__binding__BindingBreezServices_register_webhook = + _wire__crate__binding__BindingBreezServices_register_webhookPtr + .asFunction)>(); - void wire__crate__binding__report_issue( + void wire__crate__binding__BindingBreezServices_report_issue( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__report_issue( + return _wire__crate__binding__BindingBreezServices_report_issue( port_, + that, req, ); } - late final _wire__crate__binding__report_issuePtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__report_issue'); - late final _wire__crate__binding__report_issue = _wire__crate__binding__report_issuePtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_report_issuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_report_issue'); + late final _wire__crate__binding__BindingBreezServices_report_issue = + _wire__crate__binding__BindingBreezServices_report_issuePtr + .asFunction)>(); - void wire__crate__binding__rescan_swaps( + void wire__crate__binding__BindingBreezServices_rescan_swaps( int port_, + int that, ) { - return _wire__crate__binding__rescan_swaps( + return _wire__crate__binding__BindingBreezServices_rescan_swaps( port_, + that, ); } - late final _wire__crate__binding__rescan_swapsPtr = - _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__rescan_swaps'); - late final _wire__crate__binding__rescan_swaps = - _wire__crate__binding__rescan_swapsPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_rescan_swapsPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_rescan_swaps'); + late final _wire__crate__binding__BindingBreezServices_rescan_swaps = + _wire__crate__binding__BindingBreezServices_rescan_swapsPtr.asFunction(); - void wire__crate__binding__send_onchain( + void wire__crate__binding__BindingBreezServices_send_onchain( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__send_onchain( + return _wire__crate__binding__BindingBreezServices_send_onchain( port_, + that, req, ); } - late final _wire__crate__binding__send_onchainPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__send_onchain'); - late final _wire__crate__binding__send_onchain = _wire__crate__binding__send_onchainPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_send_onchainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_onchain'); + late final _wire__crate__binding__BindingBreezServices_send_onchain = + _wire__crate__binding__BindingBreezServices_send_onchainPtr + .asFunction)>(); - void wire__crate__binding__send_payment( + void wire__crate__binding__BindingBreezServices_send_payment( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__send_payment( + return _wire__crate__binding__BindingBreezServices_send_payment( port_, + that, req, ); } - late final _wire__crate__binding__send_paymentPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__send_payment'); - late final _wire__crate__binding__send_payment = _wire__crate__binding__send_paymentPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_send_paymentPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_payment'); + late final _wire__crate__binding__BindingBreezServices_send_payment = + _wire__crate__binding__BindingBreezServices_send_paymentPtr + .asFunction)>(); - void wire__crate__binding__send_spontaneous_payment( + void wire__crate__binding__BindingBreezServices_send_spontaneous_payment( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__send_spontaneous_payment( + return _wire__crate__binding__BindingBreezServices_send_spontaneous_payment( port_, + that, req, ); } - late final _wire__crate__binding__send_spontaneous_paymentPtr = _lookup< + late final _wire__crate__binding__BindingBreezServices_send_spontaneous_paymentPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire__crate__binding__send_spontaneous_payment'); - late final _wire__crate__binding__send_spontaneous_payment = - _wire__crate__binding__send_spontaneous_paymentPtr - .asFunction)>(); - - void wire__crate__binding__service_health_check( - int port_, - ffi.Pointer api_key, - ) { - return _wire__crate__binding__service_health_check( - port_, - api_key, - ); - } - - late final _wire__crate__binding__service_health_checkPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__service_health_check'); - late final _wire__crate__binding__service_health_check = _wire__crate__binding__service_health_checkPtr - .asFunction)>(); - - void wire__crate__binding__set_payment_metadata( + ffi.Void Function( + ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_send_spontaneous_payment'); + late final _wire__crate__binding__BindingBreezServices_send_spontaneous_payment = + _wire__crate__binding__BindingBreezServices_send_spontaneous_paymentPtr + .asFunction)>(); + + void wire__crate__binding__BindingBreezServices_set_payment_metadata( int port_, + int that, ffi.Pointer hash, ffi.Pointer metadata, ) { - return _wire__crate__binding__set_payment_metadata( + return _wire__crate__binding__BindingBreezServices_set_payment_metadata( port_, + that, hash, metadata, ); } - late final _wire__crate__binding__set_payment_metadataPtr = _lookup< + late final _wire__crate__binding__BindingBreezServices_set_payment_metadataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer, ffi.Pointer)>>( - 'frbgen_breez_sdk_wire__crate__binding__set_payment_metadata'); - late final _wire__crate__binding__set_payment_metadata = - _wire__crate__binding__set_payment_metadataPtr.asFunction< - void Function( - int, ffi.Pointer, ffi.Pointer)>(); + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_set_payment_metadata'); + late final _wire__crate__binding__BindingBreezServices_set_payment_metadata = + _wire__crate__binding__BindingBreezServices_set_payment_metadataPtr.asFunction< + void Function(int, int, ffi.Pointer, + ffi.Pointer)>(); - void wire__crate__binding__sign_message( + void wire__crate__binding__BindingBreezServices_sign_message( int port_, + int that, ffi.Pointer req, ) { - return _wire__crate__binding__sign_message( + return _wire__crate__binding__BindingBreezServices_sign_message( port_, + that, req, ); } - late final _wire__crate__binding__sign_messagePtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__sign_message'); - late final _wire__crate__binding__sign_message = _wire__crate__binding__sign_messagePtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_sign_messagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sign_message'); + late final _wire__crate__binding__BindingBreezServices_sign_message = + _wire__crate__binding__BindingBreezServices_sign_messagePtr + .asFunction)>(); - void wire__crate__binding__static_backup( + void wire__crate__binding__BindingBreezServices_sync( int port_, - ffi.Pointer req, + int that, ) { - return _wire__crate__binding__static_backup( + return _wire__crate__binding__BindingBreezServices_sync( port_, - req, + that, ); } - late final _wire__crate__binding__static_backupPtr = - _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__static_backup'); - late final _wire__crate__binding__static_backup = _wire__crate__binding__static_backupPtr - .asFunction)>(); + late final _wire__crate__binding__BindingBreezServices_syncPtr = + _lookup>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_sync'); + late final _wire__crate__binding__BindingBreezServices_sync = + _wire__crate__binding__BindingBreezServices_syncPtr.asFunction(); - void wire__crate__binding__sync( + void wire__crate__binding__BindingBreezServices_unregister_webhook( int port_, + int that, + ffi.Pointer webhook_url, ) { - return _wire__crate__binding__sync( + return _wire__crate__binding__BindingBreezServices_unregister_webhook( port_, + that, + webhook_url, ); } - late final _wire__crate__binding__syncPtr = _lookup>( - 'frbgen_breez_sdk_wire__crate__binding__sync'); - late final _wire__crate__binding__sync = _wire__crate__binding__syncPtr.asFunction(); + late final _wire__crate__binding__BindingBreezServices_unregister_webhookPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.UintPtr, ffi.Pointer)>>( + 'frbgen_breez_sdk_wire__crate__binding__BindingBreezServices_unregister_webhook'); + late final _wire__crate__binding__BindingBreezServices_unregister_webhook = + _wire__crate__binding__BindingBreezServices_unregister_webhookPtr + .asFunction)>(); - void wire__crate__binding__unregister_webhook( + void wire__crate__binding__breez_events_stream( int port_, - ffi.Pointer webhook_url, + ffi.Pointer s, ) { - return _wire__crate__binding__unregister_webhook( + return _wire__crate__binding__breez_events_stream( port_, - webhook_url, + s, ); } - late final _wire__crate__binding__unregister_webhookPtr = + late final _wire__crate__binding__breez_events_streamPtr = _lookup)>>( - 'frbgen_breez_sdk_wire__crate__binding__unregister_webhook'); - late final _wire__crate__binding__unregister_webhook = _wire__crate__binding__unregister_webhookPtr - .asFunction)>(); + 'frbgen_breez_sdk_wire__crate__binding__breez_events_stream'); + late final _wire__crate__binding__breez_events_stream = _wire__crate__binding__breez_events_streamPtr + .asFunction)>(); + + void wire__crate__binding__breez_log_stream( + int port_, + ffi.Pointer s, + ) { + return _wire__crate__binding__breez_log_stream( + port_, + s, + ); + } + + late final _wire__crate__binding__breez_log_streamPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__breez_log_stream'); + late final _wire__crate__binding__breez_log_stream = _wire__crate__binding__breez_log_streamPtr + .asFunction)>(); + + void wire__crate__binding__connect( + int port_, + ffi.Pointer req, + ) { + return _wire__crate__binding__connect( + port_, + req, + ); + } + + late final _wire__crate__binding__connectPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__connect'); + late final _wire__crate__binding__connect = _wire__crate__binding__connectPtr + .asFunction)>(); + + void wire__crate__binding__default_config( + int port_, + int env_type, + ffi.Pointer api_key, + ffi.Pointer node_config, + ) { + return _wire__crate__binding__default_config( + port_, + env_type, + api_key, + node_config, + ); + } + + late final _wire__crate__binding__default_configPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Int32, ffi.Pointer, + ffi.Pointer)>>('frbgen_breez_sdk_wire__crate__binding__default_config'); + late final _wire__crate__binding__default_config = _wire__crate__binding__default_configPtr.asFunction< + void Function( + int, int, ffi.Pointer, ffi.Pointer)>(); + + void wire__crate__binding__mnemonic_to_seed( + int port_, + ffi.Pointer phrase, + ) { + return _wire__crate__binding__mnemonic_to_seed( + port_, + phrase, + ); + } + + late final _wire__crate__binding__mnemonic_to_seedPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__mnemonic_to_seed'); + late final _wire__crate__binding__mnemonic_to_seed = _wire__crate__binding__mnemonic_to_seedPtr + .asFunction)>(); + + void wire__crate__binding__parse_input( + int port_, + ffi.Pointer input, + ) { + return _wire__crate__binding__parse_input( + port_, + input, + ); + } + + late final _wire__crate__binding__parse_inputPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__parse_input'); + late final _wire__crate__binding__parse_input = _wire__crate__binding__parse_inputPtr + .asFunction)>(); + + void wire__crate__binding__parse_invoice( + int port_, + ffi.Pointer invoice, + ) { + return _wire__crate__binding__parse_invoice( + port_, + invoice, + ); + } + + late final _wire__crate__binding__parse_invoicePtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__parse_invoice'); + late final _wire__crate__binding__parse_invoice = _wire__crate__binding__parse_invoicePtr + .asFunction)>(); + + void wire__crate__binding__service_health_check( + int port_, + ffi.Pointer api_key, + ) { + return _wire__crate__binding__service_health_check( + port_, + api_key, + ); + } + + late final _wire__crate__binding__service_health_checkPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__service_health_check'); + late final _wire__crate__binding__service_health_check = _wire__crate__binding__service_health_checkPtr + .asFunction)>(); + + void wire__crate__binding__static_backup( + int port_, + ffi.Pointer req, + ) { + return _wire__crate__binding__static_backup( + port_, + req, + ); + } + + late final _wire__crate__binding__static_backupPtr = + _lookup)>>( + 'frbgen_breez_sdk_wire__crate__binding__static_backup'); + late final _wire__crate__binding__static_backup = _wire__crate__binding__static_backupPtr + .asFunction)>(); + + void + rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ffi.Pointer ptr, + ) { + return _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr, + ); + } + + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices'); + late final _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices = + _rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr + .asFunction)>(); + + void + rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ffi.Pointer ptr, + ) { + return _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices( + ptr, + ); + } + + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr = + _lookup)>>( + 'frbgen_breez_sdk_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices'); + late final _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServices = + _rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingBreezServicesPtr + .asFunction)>(); ffi.Pointer cst_new_box_autoadd_aes_success_action_data_decrypted() { @@ -5995,69 +6287,6 @@ final class wire_cst_configure_node_request extends ffi.Struct { external ffi.Pointer close_to_address; } -final class wire_cst_greenlight_credentials extends ffi.Struct { - external ffi.Pointer device_key; - - external ffi.Pointer device_cert; -} - -final class wire_cst_greenlight_node_config extends ffi.Struct { - external ffi.Pointer partner_credentials; - - external ffi.Pointer invite_code; -} - -final class wire_cst_NodeConfig_Greenlight extends ffi.Struct { - external ffi.Pointer config; -} - -final class NodeConfigKind extends ffi.Union { - external wire_cst_NodeConfig_Greenlight Greenlight; -} - -final class wire_cst_node_config extends ffi.Struct { - @ffi.Int32() - external int tag; - - external NodeConfigKind kind; -} - -final class wire_cst_config extends ffi.Struct { - external ffi.Pointer breezserver; - - external ffi.Pointer chainnotifier_url; - - external ffi.Pointer mempoolspace_url; - - external ffi.Pointer working_dir; - - @ffi.Int32() - external int network; - - @ffi.Uint32() - external int payment_timeout_sec; - - external ffi.Pointer default_lsp_id; - - external ffi.Pointer api_key; - - @ffi.Double() - external double maxfee_percent; - - @ffi.Uint64() - external int exemptfee_msat; - - external wire_cst_node_config node_config; -} - -final class wire_cst_connect_request extends ffi.Struct { - external wire_cst_config config; - - external ffi.Pointer seed; - - external ffi.Pointer restore_only; -} - final class wire_cst_reverse_swap_fees_request extends ffi.Struct { external ffi.Pointer send_amount_sat; @@ -6336,6 +6565,69 @@ final class wire_cst_sign_message_request extends ffi.Struct { external ffi.Pointer message; } +final class wire_cst_greenlight_credentials extends ffi.Struct { + external ffi.Pointer device_key; + + external ffi.Pointer device_cert; +} + +final class wire_cst_greenlight_node_config extends ffi.Struct { + external ffi.Pointer partner_credentials; + + external ffi.Pointer invite_code; +} + +final class wire_cst_NodeConfig_Greenlight extends ffi.Struct { + external ffi.Pointer config; +} + +final class NodeConfigKind extends ffi.Union { + external wire_cst_NodeConfig_Greenlight Greenlight; +} + +final class wire_cst_node_config extends ffi.Struct { + @ffi.Int32() + external int tag; + + external NodeConfigKind kind; +} + +final class wire_cst_config extends ffi.Struct { + external ffi.Pointer breezserver; + + external ffi.Pointer chainnotifier_url; + + external ffi.Pointer mempoolspace_url; + + external ffi.Pointer working_dir; + + @ffi.Int32() + external int network; + + @ffi.Uint32() + external int payment_timeout_sec; + + external ffi.Pointer default_lsp_id; + + external ffi.Pointer api_key; + + @ffi.Double() + external double maxfee_percent; + + @ffi.Uint64() + external int exemptfee_msat; + + external wire_cst_node_config node_config; +} + +final class wire_cst_connect_request extends ffi.Struct { + external wire_cst_config config; + + external ffi.Pointer seed; + + external ffi.Pointer restore_only; +} + final class wire_cst_static_backup_request extends ffi.Struct { external ffi.Pointer working_dir; } @@ -6954,6 +7246,33 @@ final class wire_cst_check_message_response extends ffi.Struct { external bool is_valid; } +final class wire_cst_ConnectError_Generic extends ffi.Struct { + external ffi.Pointer err; +} + +final class wire_cst_ConnectError_RestoreOnly extends ffi.Struct { + external ffi.Pointer err; +} + +final class wire_cst_ConnectError_ServiceConnectivity extends ffi.Struct { + external ffi.Pointer err; +} + +final class ConnectErrorKind extends ffi.Union { + external wire_cst_ConnectError_Generic Generic; + + external wire_cst_ConnectError_RestoreOnly RestoreOnly; + + external wire_cst_ConnectError_ServiceConnectivity ServiceConnectivity; +} + +final class wire_cst_connect_error extends ffi.Struct { + @ffi.Int32() + external int tag; + + external ConnectErrorKind kind; +} + final class wire_cst_InputType_BitcoinAddress extends ffi.Struct { external ffi.Pointer address; }