#![allow(
non_camel_case_types,
unused,
clippy::redundant_closure,
clippy::useless_conversion,
clippy::unit_arg,
clippy::double_parens,
non_snake_case,
clippy::too_many_arguments
)]
use crate::binding::*;
use core::panic::UnwindSafe;
use flutter_rust_bridge::rust2dart::IntoIntoDart;
use flutter_rust_bridge::*;
use std::ffi::c_void;
use std::sync::Arc;
use crate::breez_services::BackupFailedData;
use crate::breez_services::BreezEvent;
use crate::breez_services::CheckMessageRequest;
use crate::breez_services::CheckMessageResponse;
use crate::breez_services::InvoicePaidDetails;
use crate::breez_services::PaymentFailedData;
use crate::breez_services::SignMessageRequest;
use crate::breez_services::SignMessageResponse;
use crate::chain::RecommendedFees;
use crate::lnurl::pay::LnUrlPayResult;
use crate::lnurl::pay::LnUrlPaySuccessData;
use crate::lsp::LspInformation;
use crate::models::BackupStatus;
use crate::models::BuyBitcoinProvider;
use crate::models::BuyBitcoinRequest;
use crate::models::BuyBitcoinResponse;
use crate::models::ChannelState;
use crate::models::ClosedChannelPaymentDetails;
use crate::models::Config;
use crate::models::ConfigureNodeRequest;
use crate::models::ConnectRequest;
use crate::models::EnvironmentType;
use crate::models::GreenlightCredentials;
use crate::models::GreenlightDeviceCredentials;
use crate::models::GreenlightNodeConfig;
use crate::models::HealthCheckStatus;
use crate::models::ListPaymentsRequest;
use crate::models::ListSwapsRequest;
use crate::models::LnPaymentDetails;
use crate::models::LogEntry;
use crate::models::MetadataFilter;
use crate::models::NodeConfig;
use crate::models::NodeCredentials;
use crate::models::NodeState;
use crate::models::OnchainPaymentLimitsResponse;
use crate::models::OpenChannelFeeRequest;
use crate::models::OpenChannelFeeResponse;
use crate::models::OpeningFeeParams;
use crate::models::OpeningFeeParamsMenu;
use crate::models::PayOnchainRequest;
use crate::models::PayOnchainResponse;
use crate::models::Payment;
use crate::models::PaymentDetails;
use crate::models::PaymentStatus;
use crate::models::PaymentType;
use crate::models::PaymentTypeFilter;
use crate::models::PrepareOnchainPaymentRequest;
use crate::models::PrepareOnchainPaymentResponse;
use crate::models::PrepareRedeemOnchainFundsRequest;
use crate::models::PrepareRedeemOnchainFundsResponse;
use crate::models::PrepareRefundRequest;
use crate::models::PrepareRefundResponse;
use crate::models::ReceiveOnchainRequest;
use crate::models::ReceivePaymentRequest;
use crate::models::ReceivePaymentResponse;
use crate::models::RedeemOnchainFundsRequest;
use crate::models::RedeemOnchainFundsResponse;
use crate::models::RefundRequest;
use crate::models::RefundResponse;
use crate::models::ReportIssueRequest;
use crate::models::ReportPaymentFailureDetails;
use crate::models::ReverseSwapFeesRequest;
use crate::models::ReverseSwapInfo;
use crate::models::ReverseSwapPairInfo;
use crate::models::ReverseSwapStatus;
use crate::models::SendPaymentRequest;
use crate::models::SendPaymentResponse;
use crate::models::SendSpontaneousPaymentRequest;
use crate::models::ServiceHealthCheckResponse;
use crate::models::StaticBackupRequest;
use crate::models::StaticBackupResponse;
use crate::models::SwapAmountType;
use crate::models::SwapInfo;
use crate::models::SwapStatus;
use crate::models::TlvEntry;
use crate::models::UnspentTransactionOutput;
fn wire_connect_impl(port_: MessagePort, req: impl Wire2Api<ConnectRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "connect",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| connect(api_req)
},
)
}
fn wire_is_initialized_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, bool, _>(
WrapInfo {
debug_name: "is_initialized",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| Result::<_, ()>::Ok(is_initialized()),
)
}
fn wire_sync_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "sync",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| sync(),
)
}
fn wire_node_credentials_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option<NodeCredentials>, _>(
WrapInfo {
debug_name: "node_credentials",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| node_credentials(),
)
}
fn wire_node_info_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, NodeState, _>(
WrapInfo {
debug_name: "node_info",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| node_info(),
)
}
fn wire_configure_node_impl(
port_: MessagePort,
req: impl Wire2Api<ConfigureNodeRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "configure_node",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| configure_node(api_req)
},
)
}
fn wire_disconnect_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "disconnect",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| disconnect(),
)
}
fn wire_sign_message_impl(port_: MessagePort, req: impl Wire2Api<SignMessageRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SignMessageResponse, _>(
WrapInfo {
debug_name: "sign_message",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| sign_message(api_req)
},
)
}
fn wire_check_message_impl(
port_: MessagePort,
req: impl Wire2Api<CheckMessageRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, CheckMessageResponse, _>(
WrapInfo {
debug_name: "check_message",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| check_message(api_req)
},
)
}
fn wire_mnemonic_to_seed_impl(port_: MessagePort, phrase: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<u8>, _>(
WrapInfo {
debug_name: "mnemonic_to_seed",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_phrase = phrase.wire2api();
move |task_callback| mnemonic_to_seed(api_phrase)
},
)
}
fn wire_default_config_impl(
port_: MessagePort,
env_type: impl Wire2Api<EnvironmentType> + UnwindSafe,
api_key: impl Wire2Api<String> + UnwindSafe,
node_config: impl Wire2Api<NodeConfig> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Config, _>(
WrapInfo {
debug_name: "default_config",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_env_type = env_type.wire2api();
let api_api_key = api_key.wire2api();
let api_node_config = node_config.wire2api();
move |task_callback| {
Result::<_, ()>::Ok(default_config(api_env_type, api_api_key, api_node_config))
}
},
)
}
fn wire_static_backup_impl(
port_: MessagePort,
req: impl Wire2Api<StaticBackupRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, StaticBackupResponse, _>(
WrapInfo {
debug_name: "static_backup",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| static_backup(api_req)
},
)
}
fn wire_service_health_check_impl(port_: MessagePort, api_key: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ServiceHealthCheckResponse, _>(
WrapInfo {
debug_name: "service_health_check",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_api_key = api_key.wire2api();
move |task_callback| service_health_check(api_api_key)
},
)
}
fn wire_breez_events_stream_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "breez_events_stream",
port: Some(port_),
mode: FfiCallMode::Stream,
},
move || {
move |task_callback| breez_events_stream(task_callback.stream_sink::<_, BreezEvent>())
},
)
}
fn wire_breez_log_stream_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "breez_log_stream",
port: Some(port_),
mode: FfiCallMode::Stream,
},
move || move |task_callback| breez_log_stream(task_callback.stream_sink::<_, LogEntry>()),
)
}
fn wire_list_lsps_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<LspInformation>, _>(
WrapInfo {
debug_name: "list_lsps",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| list_lsps(),
)
}
fn wire_connect_lsp_impl(port_: MessagePort, lsp_id: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "connect_lsp",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_lsp_id = lsp_id.wire2api();
move |task_callback| connect_lsp(api_lsp_id)
},
)
}
fn wire_lsp_id_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option<String>, _>(
WrapInfo {
debug_name: "lsp_id",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| lsp_id(),
)
}
fn wire_fetch_lsp_info_impl(port_: MessagePort, id: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option<LspInformation>, _>(
WrapInfo {
debug_name: "fetch_lsp_info",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_id = id.wire2api();
move |task_callback| fetch_lsp_info(api_id)
},
)
}
fn wire_lsp_info_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LspInformation, _>(
WrapInfo {
debug_name: "lsp_info",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| lsp_info(),
)
}
fn wire_close_lsp_channels_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "close_lsp_channels",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| close_lsp_channels(),
)
}
fn wire_register_webhook_impl(port_: MessagePort, webhook_url: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "register_webhook",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_webhook_url = webhook_url.wire2api();
move |task_callback| register_webhook(api_webhook_url)
},
)
}
fn wire_unregister_webhook_impl(
port_: MessagePort,
webhook_url: impl Wire2Api<String> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "unregister_webhook",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_webhook_url = webhook_url.wire2api();
move |task_callback| unregister_webhook(api_webhook_url)
},
)
}
fn wire_backup_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "backup",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| backup(),
)
}
fn wire_backup_status_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BackupStatus, _>(
WrapInfo {
debug_name: "backup_status",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| backup_status(),
)
}
fn wire_parse_invoice_impl(port_: MessagePort, invoice: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LNInvoice, _>(
WrapInfo {
debug_name: "parse_invoice",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_invoice = invoice.wire2api();
move |task_callback| parse_invoice(api_invoice)
},
)
}
fn wire_parse_input_impl(port_: MessagePort, input: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_InputType, _>(
WrapInfo {
debug_name: "parse_input",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_input = input.wire2api();
move |task_callback| parse_input(api_input)
},
)
}
fn wire_list_payments_impl(
port_: MessagePort,
req: impl Wire2Api<ListPaymentsRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<Payment>, _>(
WrapInfo {
debug_name: "list_payments",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| list_payments(api_req)
},
)
}
fn wire_payment_by_hash_impl(port_: MessagePort, hash: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option<Payment>, _>(
WrapInfo {
debug_name: "payment_by_hash",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_hash = hash.wire2api();
move |task_callback| payment_by_hash(api_hash)
},
)
}
fn wire_set_payment_metadata_impl(
port_: MessagePort,
hash: impl Wire2Api<String> + UnwindSafe,
metadata: impl Wire2Api<String> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "set_payment_metadata",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_hash = hash.wire2api();
let api_metadata = metadata.wire2api();
move |task_callback| set_payment_metadata(api_hash, api_metadata)
},
)
}
fn wire_send_payment_impl(port_: MessagePort, req: impl Wire2Api<SendPaymentRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>(
WrapInfo {
debug_name: "send_payment",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| send_payment(api_req)
},
)
}
fn wire_send_spontaneous_payment_impl(
port_: MessagePort,
req: impl Wire2Api<SendSpontaneousPaymentRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SendPaymentResponse, _>(
WrapInfo {
debug_name: "send_spontaneous_payment",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| send_spontaneous_payment(api_req)
},
)
}
fn wire_receive_payment_impl(
port_: MessagePort,
req: impl Wire2Api<ReceivePaymentRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReceivePaymentResponse, _>(
WrapInfo {
debug_name: "receive_payment",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| receive_payment(api_req)
},
)
}
fn wire_lnurl_pay_impl(port_: MessagePort, req: impl Wire2Api<LnUrlPayRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, LnUrlPayResult, _>(
WrapInfo {
debug_name: "lnurl_pay",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| lnurl_pay(api_req)
},
)
}
fn wire_lnurl_withdraw_impl(
port_: MessagePort,
req: impl Wire2Api<LnUrlWithdrawRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlWithdrawResult, _>(
WrapInfo {
debug_name: "lnurl_withdraw",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| lnurl_withdraw(api_req)
},
)
}
fn wire_lnurl_auth_impl(
port_: MessagePort,
req_data: impl Wire2Api<LnUrlAuthRequestData> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, mirror_LnUrlCallbackStatus, _>(
WrapInfo {
debug_name: "lnurl_auth",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req_data = req_data.wire2api();
move |task_callback| lnurl_auth(api_req_data)
},
)
}
fn wire_report_issue_impl(port_: MessagePort, req: impl Wire2Api<ReportIssueRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "report_issue",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| report_issue(api_req)
},
)
}
fn wire_fetch_fiat_rates_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<mirror_Rate>, _>(
WrapInfo {
debug_name: "fetch_fiat_rates",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| fetch_fiat_rates(),
)
}
fn wire_list_fiat_currencies_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<mirror_FiatCurrency>, _>(
WrapInfo {
debug_name: "list_fiat_currencies",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| list_fiat_currencies(),
)
}
fn wire_pay_onchain_impl(port_: MessagePort, req: impl Wire2Api<PayOnchainRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PayOnchainResponse, _>(
WrapInfo {
debug_name: "pay_onchain",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| pay_onchain(api_req)
},
)
}
fn wire_receive_onchain_impl(
port_: MessagePort,
req: impl Wire2Api<ReceiveOnchainRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, SwapInfo, _>(
WrapInfo {
debug_name: "receive_onchain",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| receive_onchain(api_req)
},
)
}
fn wire_buy_bitcoin_impl(port_: MessagePort, req: impl Wire2Api<BuyBitcoinRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, BuyBitcoinResponse, _>(
WrapInfo {
debug_name: "buy_bitcoin",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| buy_bitcoin(api_req)
},
)
}
fn wire_redeem_onchain_funds_impl(
port_: MessagePort,
req: impl Wire2Api<RedeemOnchainFundsRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RedeemOnchainFundsResponse, _>(
WrapInfo {
debug_name: "redeem_onchain_funds",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| redeem_onchain_funds(api_req)
},
)
}
fn wire_prepare_redeem_onchain_funds_impl(
port_: MessagePort,
req: impl Wire2Api<PrepareRedeemOnchainFundsRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRedeemOnchainFundsResponse, _>(
WrapInfo {
debug_name: "prepare_redeem_onchain_funds",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| prepare_redeem_onchain_funds(api_req)
},
)
}
fn wire_list_refundables_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<SwapInfo>, _>(
WrapInfo {
debug_name: "list_refundables",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| list_refundables(),
)
}
fn wire_prepare_refund_impl(
port_: MessagePort,
req: impl Wire2Api<PrepareRefundRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareRefundResponse, _>(
WrapInfo {
debug_name: "prepare_refund",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| prepare_refund(api_req)
},
)
}
fn wire_refund_impl(port_: MessagePort, req: impl Wire2Api<RefundRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RefundResponse, _>(
WrapInfo {
debug_name: "refund",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| refund(api_req)
},
)
}
fn wire_rescan_swaps_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "rescan_swaps",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| rescan_swaps(),
)
}
fn wire_redeem_swap_impl(port_: MessagePort, swap_address: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "redeem_swap",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_swap_address = swap_address.wire2api();
move |task_callback| redeem_swap(api_swap_address)
},
)
}
fn wire_in_progress_swap_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option<SwapInfo>, _>(
WrapInfo {
debug_name: "in_progress_swap",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| in_progress_swap(),
)
}
fn wire_list_swaps_impl(port_: MessagePort, req: impl Wire2Api<ListSwapsRequest> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<SwapInfo>, _>(
WrapInfo {
debug_name: "list_swaps",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| list_swaps(api_req)
},
)
}
fn wire_claim_reverse_swap_impl(
port_: MessagePort,
lockup_address: impl Wire2Api<String> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, (), _>(
WrapInfo {
debug_name: "claim_reverse_swap",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_lockup_address = lockup_address.wire2api();
move |task_callback| claim_reverse_swap(api_lockup_address)
},
)
}
fn wire_open_channel_fee_impl(
port_: MessagePort,
req: impl Wire2Api<OpenChannelFeeRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OpenChannelFeeResponse, _>(
WrapInfo {
debug_name: "open_channel_fee",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| open_channel_fee(api_req)
},
)
}
fn wire_fetch_reverse_swap_fees_impl(
port_: MessagePort,
req: impl Wire2Api<ReverseSwapFeesRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ReverseSwapPairInfo, _>(
WrapInfo {
debug_name: "fetch_reverse_swap_fees",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| fetch_reverse_swap_fees(api_req)
},
)
}
fn wire_onchain_payment_limits_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, OnchainPaymentLimitsResponse, _>(
WrapInfo {
debug_name: "onchain_payment_limits",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| onchain_payment_limits(),
)
}
fn wire_prepare_onchain_payment_impl(
port_: MessagePort,
req: impl Wire2Api<PrepareOnchainPaymentRequest> + UnwindSafe,
) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, PrepareOnchainPaymentResponse, _>(
WrapInfo {
debug_name: "prepare_onchain_payment",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_req = req.wire2api();
move |task_callback| prepare_onchain_payment(api_req)
},
)
}
fn wire_in_progress_onchain_payments_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Vec<ReverseSwapInfo>, _>(
WrapInfo {
debug_name: "in_progress_onchain_payments",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| in_progress_onchain_payments(),
)
}
fn wire_recommended_fees_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, RecommendedFees, _>(
WrapInfo {
debug_name: "recommended_fees",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| recommended_fees(),
)
}
fn wire_execute_command_impl(port_: MessagePort, command: impl Wire2Api<String> + UnwindSafe) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>(
WrapInfo {
debug_name: "execute_command",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || {
let api_command = command.wire2api();
move |task_callback| execute_command(api_command)
},
)
}
fn wire_generate_diagnostic_data_impl(port_: MessagePort) {
FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, String, _>(
WrapInfo {
debug_name: "generate_diagnostic_data",
port: Some(port_),
mode: FfiCallMode::Normal,
},
move || move |task_callback| generate_diagnostic_data(),
)
}
#[derive(Clone)]
pub struct mirror_AesSuccessActionDataDecrypted(AesSuccessActionDataDecrypted);
#[derive(Clone)]
pub struct mirror_AesSuccessActionDataResult(AesSuccessActionDataResult);
#[derive(Clone)]
pub struct mirror_BitcoinAddressData(BitcoinAddressData);
#[derive(Clone)]
pub struct mirror_CurrencyInfo(CurrencyInfo);
#[derive(Clone)]
pub struct mirror_FiatCurrency(FiatCurrency);
#[derive(Clone)]
pub struct mirror_InputType(InputType);
#[derive(Clone)]
pub struct mirror_LNInvoice(LNInvoice);
#[derive(Clone)]
pub struct mirror_LnUrlAuthRequestData(LnUrlAuthRequestData);
#[derive(Clone)]
pub struct mirror_LnUrlCallbackStatus(LnUrlCallbackStatus);
#[derive(Clone)]
pub struct mirror_LnUrlErrorData(LnUrlErrorData);
#[derive(Clone)]
pub struct mirror_LnUrlPayErrorData(LnUrlPayErrorData);
#[derive(Clone)]
pub struct mirror_LnUrlPayRequestData(LnUrlPayRequestData);
#[derive(Clone)]
pub struct mirror_LnUrlWithdrawRequestData(LnUrlWithdrawRequestData);
#[derive(Clone)]
pub struct mirror_LnUrlWithdrawResult(LnUrlWithdrawResult);
#[derive(Clone)]
pub struct mirror_LnUrlWithdrawSuccessData(LnUrlWithdrawSuccessData);
#[derive(Clone)]
pub struct mirror_LocaleOverrides(LocaleOverrides);
#[derive(Clone)]
pub struct mirror_LocalizedName(LocalizedName);
#[derive(Clone)]
pub struct mirror_MessageSuccessActionData(MessageSuccessActionData);
#[derive(Clone)]
pub struct mirror_Network(Network);
#[derive(Clone)]
pub struct mirror_Rate(Rate);
#[derive(Clone)]
pub struct mirror_RouteHint(RouteHint);
#[derive(Clone)]
pub struct mirror_RouteHintHop(RouteHintHop);
#[derive(Clone)]
pub struct mirror_SuccessActionProcessed(SuccessActionProcessed);
#[derive(Clone)]
pub struct mirror_Symbol(Symbol);
#[derive(Clone)]
pub struct mirror_UrlSuccessActionData(UrlSuccessActionData);
const _: fn() = || {
{
let AesSuccessActionDataDecrypted = None::<AesSuccessActionDataDecrypted>.unwrap();
let _: String = AesSuccessActionDataDecrypted.description;
let _: String = AesSuccessActionDataDecrypted.plaintext;
}
match None::<AesSuccessActionDataResult>.unwrap() {
AesSuccessActionDataResult::Decrypted { data } => {
let _: AesSuccessActionDataDecrypted = data;
}
AesSuccessActionDataResult::ErrorStatus { reason } => {
let _: String = reason;
}
}
{
let BitcoinAddressData = None::<BitcoinAddressData>.unwrap();
let _: String = BitcoinAddressData.address;
let _: Network = BitcoinAddressData.network;
let _: Option<u64> = BitcoinAddressData.amount_sat;
let _: Option<String> = BitcoinAddressData.label;
let _: Option<String> = BitcoinAddressData.message;
}
{
let CurrencyInfo = None::<CurrencyInfo>.unwrap();
let _: String = CurrencyInfo.name;
let _: u32 = CurrencyInfo.fraction_size;
let _: Option<u32> = CurrencyInfo.spacing;
let _: Option<Symbol> = CurrencyInfo.symbol;
let _: Option<Symbol> = CurrencyInfo.uniq_symbol;
let _: Vec<LocalizedName> = CurrencyInfo.localized_name;
let _: Vec<LocaleOverrides> = CurrencyInfo.locale_overrides;
}
{
let FiatCurrency = None::<FiatCurrency>.unwrap();
let _: String = FiatCurrency.id;
let _: CurrencyInfo = FiatCurrency.info;
}
match None::<InputType>.unwrap() {
InputType::BitcoinAddress { address } => {
let _: BitcoinAddressData = address;
}
InputType::Bolt11 { invoice } => {
let _: LNInvoice = invoice;
}
InputType::NodeId { node_id } => {
let _: String = node_id;
}
InputType::Url { url } => {
let _: String = url;
}
InputType::LnUrlPay { data } => {
let _: LnUrlPayRequestData = data;
}
InputType::LnUrlWithdraw { data } => {
let _: LnUrlWithdrawRequestData = data;
}
InputType::LnUrlAuth { data } => {
let _: LnUrlAuthRequestData = data;
}
InputType::LnUrlError { data } => {
let _: LnUrlErrorData = data;
}
}
{
let LNInvoice = None::<LNInvoice>.unwrap();
let _: String = LNInvoice.bolt11;
let _: Network = LNInvoice.network;
let _: String = LNInvoice.payee_pubkey;
let _: String = LNInvoice.payment_hash;
let _: Option<String> = LNInvoice.description;
let _: Option<String> = LNInvoice.description_hash;
let _: Option<u64> = LNInvoice.amount_msat;
let _: u64 = LNInvoice.timestamp;
let _: u64 = LNInvoice.expiry;
let _: Vec<RouteHint> = LNInvoice.routing_hints;
let _: Vec<u8> = LNInvoice.payment_secret;
let _: u64 = LNInvoice.min_final_cltv_expiry_delta;
}
{
let LnUrlAuthRequestData = None::<LnUrlAuthRequestData>.unwrap();
let _: String = LnUrlAuthRequestData.k1;
let _: Option<String> = LnUrlAuthRequestData.action;
let _: String = LnUrlAuthRequestData.domain;
let _: String = LnUrlAuthRequestData.url;
}
match None::<LnUrlCallbackStatus>.unwrap() {
LnUrlCallbackStatus::Ok => {}
LnUrlCallbackStatus::ErrorStatus { data } => {
let _: LnUrlErrorData = data;
}
}
{
let LnUrlErrorData = None::<LnUrlErrorData>.unwrap();
let _: String = LnUrlErrorData.reason;
}
{
let LnUrlPayErrorData = None::<LnUrlPayErrorData>.unwrap();
let _: String = LnUrlPayErrorData.payment_hash;
let _: String = LnUrlPayErrorData.reason;
}
{
let LnUrlPayRequestData = None::<LnUrlPayRequestData>.unwrap();
let _: String = LnUrlPayRequestData.callback;
let _: u64 = LnUrlPayRequestData.min_sendable;
let _: u64 = LnUrlPayRequestData.max_sendable;
let _: String = LnUrlPayRequestData.metadata_str;
let _: u16 = LnUrlPayRequestData.comment_allowed;
let _: String = LnUrlPayRequestData.domain;
let _: bool = LnUrlPayRequestData.allows_nostr;
let _: Option<String> = LnUrlPayRequestData.nostr_pubkey;
let _: Option<String> = LnUrlPayRequestData.ln_address;
}
{
let LnUrlWithdrawRequestData = None::<LnUrlWithdrawRequestData>.unwrap();
let _: String = LnUrlWithdrawRequestData.callback;
let _: String = LnUrlWithdrawRequestData.k1;
let _: String = LnUrlWithdrawRequestData.default_description;
let _: u64 = LnUrlWithdrawRequestData.min_withdrawable;
let _: u64 = LnUrlWithdrawRequestData.max_withdrawable;
}
match None::<LnUrlWithdrawResult>.unwrap() {
LnUrlWithdrawResult::Ok { data } => {
let _: LnUrlWithdrawSuccessData = data;
}
LnUrlWithdrawResult::Timeout { data } => {
let _: LnUrlWithdrawSuccessData = data;
}
LnUrlWithdrawResult::ErrorStatus { data } => {
let _: LnUrlErrorData = data;
}
}
{
let LnUrlWithdrawSuccessData = None::<LnUrlWithdrawSuccessData>.unwrap();
let _: LNInvoice = LnUrlWithdrawSuccessData.invoice;
}
{
let LocaleOverrides = None::<LocaleOverrides>.unwrap();
let _: String = LocaleOverrides.locale;
let _: Option<u32> = LocaleOverrides.spacing;
let _: Symbol = LocaleOverrides.symbol;
}
{
let LocalizedName = None::<LocalizedName>.unwrap();
let _: String = LocalizedName.locale;
let _: String = LocalizedName.name;
}
{
let MessageSuccessActionData = None::<MessageSuccessActionData>.unwrap();
let _: String = MessageSuccessActionData.message;
}
match None::<Network>.unwrap() {
Network::Bitcoin => {}
Network::Testnet => {}
Network::Signet => {}
Network::Regtest => {}
}
{
let Rate = None::<Rate>.unwrap();
let _: String = Rate.coin;
let _: f64 = Rate.value;
}
{
let RouteHint = None::<RouteHint>.unwrap();
let _: Vec<RouteHintHop> = RouteHint.hops;
}
{
let RouteHintHop = None::<RouteHintHop>.unwrap();
let _: String = RouteHintHop.src_node_id;
let _: String = RouteHintHop.short_channel_id;
let _: u32 = RouteHintHop.fees_base_msat;
let _: u32 = RouteHintHop.fees_proportional_millionths;
let _: u64 = RouteHintHop.cltv_expiry_delta;
let _: Option<u64> = RouteHintHop.htlc_minimum_msat;
let _: Option<u64> = RouteHintHop.htlc_maximum_msat;
}
match None::<SuccessActionProcessed>.unwrap() {
SuccessActionProcessed::Aes { result } => {
let _: AesSuccessActionDataResult = result;
}
SuccessActionProcessed::Message { data } => {
let _: MessageSuccessActionData = data;
}
SuccessActionProcessed::Url { data } => {
let _: UrlSuccessActionData = data;
}
}
{
let Symbol = None::<Symbol>.unwrap();
let _: Option<String> = Symbol.grapheme;
let _: Option<String> = Symbol.template;
let _: Option<bool> = Symbol.rtl;
let _: Option<u32> = Symbol.position;
}
{
let UrlSuccessActionData = None::<UrlSuccessActionData>.unwrap();
let _: String = UrlSuccessActionData.description;
let _: String = UrlSuccessActionData.url;
}
};
pub trait Wire2Api<T> {
fn wire2api(self) -> T;
}
impl<T, S> Wire2Api<Option<T>> for *mut S
where
*mut S: Wire2Api<T>,
{
fn wire2api(self) -> Option<T> {
(!self.is_null()).then(|| self.wire2api())
}
}
impl Wire2Api<bool> for bool {
fn wire2api(self) -> bool {
self
}
}
impl Wire2Api<BuyBitcoinProvider> for i32 {
fn wire2api(self) -> BuyBitcoinProvider {
match self {
0 => BuyBitcoinProvider::Moonpay,
_ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", self),
}
}
}
impl Wire2Api<EnvironmentType> for i32 {
fn wire2api(self) -> EnvironmentType {
match self {
0 => EnvironmentType::Production,
1 => EnvironmentType::Staging,
_ => unreachable!("Invalid variant for EnvironmentType: {}", self),
}
}
}
impl Wire2Api<f64> for f64 {
fn wire2api(self) -> f64 {
self
}
}
impl Wire2Api<i32> for i32 {
fn wire2api(self) -> i32 {
self
}
}
impl Wire2Api<i64> for i64 {
fn wire2api(self) -> i64 {
self
}
}
impl Wire2Api<Network> for i32 {
fn wire2api(self) -> Network {
match self {
0 => Network::Bitcoin,
1 => Network::Testnet,
2 => Network::Signet,
3 => Network::Regtest,
_ => unreachable!("Invalid variant for Network: {}", self),
}
}
}
impl Wire2Api<PaymentTypeFilter> for i32 {
fn wire2api(self) -> PaymentTypeFilter {
match self {
0 => PaymentTypeFilter::Sent,
1 => PaymentTypeFilter::Received,
2 => PaymentTypeFilter::ClosedChannel,
_ => unreachable!("Invalid variant for PaymentTypeFilter: {}", self),
}
}
}
impl Wire2Api<SwapAmountType> for i32 {
fn wire2api(self) -> SwapAmountType {
match self {
0 => SwapAmountType::Send,
1 => SwapAmountType::Receive,
_ => unreachable!("Invalid variant for SwapAmountType: {}", self),
}
}
}
impl Wire2Api<SwapStatus> for i32 {
fn wire2api(self) -> SwapStatus {
match self {
0 => SwapStatus::Initial,
1 => SwapStatus::WaitingConfirmation,
2 => SwapStatus::Redeemable,
3 => SwapStatus::Redeemed,
4 => SwapStatus::Refundable,
5 => SwapStatus::Completed,
_ => unreachable!("Invalid variant for SwapStatus: {}", self),
}
}
}
impl Wire2Api<u16> for u16 {
fn wire2api(self) -> u16 {
self
}
}
impl Wire2Api<u32> for u32 {
fn wire2api(self) -> u32 {
self
}
}
impl Wire2Api<u64> for u64 {
fn wire2api(self) -> u64 {
self
}
}
impl Wire2Api<u8> for u8 {
fn wire2api(self) -> u8 {
self
}
}
impl support::IntoDart for mirror_AesSuccessActionDataDecrypted {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.description.into_into_dart().into_dart(),
self.0.plaintext.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataDecrypted {}
impl rust2dart::IntoIntoDart<mirror_AesSuccessActionDataDecrypted>
for AesSuccessActionDataDecrypted
{
fn into_into_dart(self) -> mirror_AesSuccessActionDataDecrypted {
mirror_AesSuccessActionDataDecrypted(self)
}
}
impl support::IntoDart for mirror_AesSuccessActionDataResult {
fn into_dart(self) -> support::DartAbi {
match self.0 {
AesSuccessActionDataResult::Decrypted { data } => {
vec![0.into_dart(), data.into_into_dart().into_dart()]
}
AesSuccessActionDataResult::ErrorStatus { reason } => {
vec![1.into_dart(), reason.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_AesSuccessActionDataResult {}
impl rust2dart::IntoIntoDart<mirror_AesSuccessActionDataResult> for AesSuccessActionDataResult {
fn into_into_dart(self) -> mirror_AesSuccessActionDataResult {
mirror_AesSuccessActionDataResult(self)
}
}
impl support::IntoDart for BackupFailedData {
fn into_dart(self) -> support::DartAbi {
vec![self.error.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for BackupFailedData {}
impl rust2dart::IntoIntoDart<BackupFailedData> for BackupFailedData {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for BackupStatus {
fn into_dart(self) -> support::DartAbi {
vec![
self.backed_up.into_into_dart().into_dart(),
self.last_backup_time.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for BackupStatus {}
impl rust2dart::IntoIntoDart<BackupStatus> for BackupStatus {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_BitcoinAddressData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.address.into_into_dart().into_dart(),
self.0.network.into_into_dart().into_dart(),
self.0.amount_sat.into_dart(),
self.0.label.into_dart(),
self.0.message.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_BitcoinAddressData {}
impl rust2dart::IntoIntoDart<mirror_BitcoinAddressData> for BitcoinAddressData {
fn into_into_dart(self) -> mirror_BitcoinAddressData {
mirror_BitcoinAddressData(self)
}
}
impl support::IntoDart for BreezEvent {
fn into_dart(self) -> support::DartAbi {
match self {
Self::NewBlock { block } => vec![0.into_dart(), block.into_into_dart().into_dart()],
Self::InvoicePaid { details } => {
vec![1.into_dart(), details.into_into_dart().into_dart()]
}
Self::Synced => vec![2.into_dart()],
Self::PaymentSucceed { details } => {
vec![3.into_dart(), details.into_into_dart().into_dart()]
}
Self::PaymentFailed { details } => {
vec![4.into_dart(), details.into_into_dart().into_dart()]
}
Self::BackupStarted => vec![5.into_dart()],
Self::BackupSucceeded => vec![6.into_dart()],
Self::BackupFailed { details } => {
vec![7.into_dart(), details.into_into_dart().into_dart()]
}
Self::ReverseSwapUpdated { details } => {
vec![8.into_dart(), details.into_into_dart().into_dart()]
}
Self::SwapUpdated { details } => {
vec![9.into_dart(), details.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for BreezEvent {}
impl rust2dart::IntoIntoDart<BreezEvent> for BreezEvent {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for BuyBitcoinResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.url.into_into_dart().into_dart(),
self.opening_fee_params.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for BuyBitcoinResponse {}
impl rust2dart::IntoIntoDart<BuyBitcoinResponse> for BuyBitcoinResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ChannelState {
fn into_dart(self) -> support::DartAbi {
match self {
Self::PendingOpen => 0,
Self::Opened => 1,
Self::PendingClose => 2,
Self::Closed => 3,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ChannelState {}
impl rust2dart::IntoIntoDart<ChannelState> for ChannelState {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for CheckMessageResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.is_valid.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for CheckMessageResponse {}
impl rust2dart::IntoIntoDart<CheckMessageResponse> for CheckMessageResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ClosedChannelPaymentDetails {
fn into_dart(self) -> support::DartAbi {
vec![
self.state.into_into_dart().into_dart(),
self.funding_txid.into_into_dart().into_dart(),
self.short_channel_id.into_dart(),
self.closing_txid.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ClosedChannelPaymentDetails {}
impl rust2dart::IntoIntoDart<ClosedChannelPaymentDetails> for ClosedChannelPaymentDetails {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for Config {
fn into_dart(self) -> support::DartAbi {
vec![
self.breezserver.into_into_dart().into_dart(),
self.chainnotifier_url.into_into_dart().into_dart(),
self.mempoolspace_url.into_dart(),
self.working_dir.into_into_dart().into_dart(),
self.network.into_into_dart().into_dart(),
self.payment_timeout_sec.into_into_dart().into_dart(),
self.default_lsp_id.into_dart(),
self.api_key.into_dart(),
self.maxfee_percent.into_into_dart().into_dart(),
self.exemptfee_msat.into_into_dart().into_dart(),
self.node_config.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for Config {}
impl rust2dart::IntoIntoDart<Config> for Config {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_CurrencyInfo {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.name.into_into_dart().into_dart(),
self.0.fraction_size.into_into_dart().into_dart(),
self.0.spacing.into_dart(),
self.0.symbol.map(|v| mirror_Symbol(v)).into_dart(),
self.0.uniq_symbol.map(|v| mirror_Symbol(v)).into_dart(),
self.0.localized_name.into_into_dart().into_dart(),
self.0.locale_overrides.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_CurrencyInfo {}
impl rust2dart::IntoIntoDart<mirror_CurrencyInfo> for CurrencyInfo {
fn into_into_dart(self) -> mirror_CurrencyInfo {
mirror_CurrencyInfo(self)
}
}
impl support::IntoDart for mirror_FiatCurrency {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.id.into_into_dart().into_dart(),
self.0.info.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_FiatCurrency {}
impl rust2dart::IntoIntoDart<mirror_FiatCurrency> for FiatCurrency {
fn into_into_dart(self) -> mirror_FiatCurrency {
mirror_FiatCurrency(self)
}
}
impl support::IntoDart for GreenlightCredentials {
fn into_dart(self) -> support::DartAbi {
vec![
self.developer_key.into_into_dart().into_dart(),
self.developer_cert.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for GreenlightCredentials {}
impl rust2dart::IntoIntoDart<GreenlightCredentials> for GreenlightCredentials {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for GreenlightDeviceCredentials {
fn into_dart(self) -> support::DartAbi {
vec![self.device.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for GreenlightDeviceCredentials {}
impl rust2dart::IntoIntoDart<GreenlightDeviceCredentials> for GreenlightDeviceCredentials {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for GreenlightNodeConfig {
fn into_dart(self) -> support::DartAbi {
vec![
self.partner_credentials.into_dart(),
self.invite_code.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for GreenlightNodeConfig {}
impl rust2dart::IntoIntoDart<GreenlightNodeConfig> for GreenlightNodeConfig {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for HealthCheckStatus {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Operational => 0,
Self::Maintenance => 1,
Self::ServiceDisruption => 2,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for HealthCheckStatus {}
impl rust2dart::IntoIntoDart<HealthCheckStatus> for HealthCheckStatus {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_InputType {
fn into_dart(self) -> support::DartAbi {
match self.0 {
InputType::BitcoinAddress { address } => {
vec![0.into_dart(), address.into_into_dart().into_dart()]
}
InputType::Bolt11 { invoice } => {
vec![1.into_dart(), invoice.into_into_dart().into_dart()]
}
InputType::NodeId { node_id } => {
vec![2.into_dart(), node_id.into_into_dart().into_dart()]
}
InputType::Url { url } => vec![3.into_dart(), url.into_into_dart().into_dart()],
InputType::LnUrlPay { data } => vec![4.into_dart(), data.into_into_dart().into_dart()],
InputType::LnUrlWithdraw { data } => {
vec![5.into_dart(), data.into_into_dart().into_dart()]
}
InputType::LnUrlAuth { data } => vec![6.into_dart(), data.into_into_dart().into_dart()],
InputType::LnUrlError { data } => {
vec![7.into_dart(), data.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_InputType {}
impl rust2dart::IntoIntoDart<mirror_InputType> for InputType {
fn into_into_dart(self) -> mirror_InputType {
mirror_InputType(self)
}
}
impl support::IntoDart for InvoicePaidDetails {
fn into_dart(self) -> support::DartAbi {
vec![
self.payment_hash.into_into_dart().into_dart(),
self.bolt11.into_into_dart().into_dart(),
self.payment.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for InvoicePaidDetails {}
impl rust2dart::IntoIntoDart<InvoicePaidDetails> for InvoicePaidDetails {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_LNInvoice {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.bolt11.into_into_dart().into_dart(),
self.0.network.into_into_dart().into_dart(),
self.0.payee_pubkey.into_into_dart().into_dart(),
self.0.payment_hash.into_into_dart().into_dart(),
self.0.description.into_dart(),
self.0.description_hash.into_dart(),
self.0.amount_msat.into_dart(),
self.0.timestamp.into_into_dart().into_dart(),
self.0.expiry.into_into_dart().into_dart(),
self.0.routing_hints.into_into_dart().into_dart(),
self.0.payment_secret.into_into_dart().into_dart(),
self.0
.min_final_cltv_expiry_delta
.into_into_dart()
.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LNInvoice {}
impl rust2dart::IntoIntoDart<mirror_LNInvoice> for LNInvoice {
fn into_into_dart(self) -> mirror_LNInvoice {
mirror_LNInvoice(self)
}
}
impl support::IntoDart for LnPaymentDetails {
fn into_dart(self) -> support::DartAbi {
vec![
self.payment_hash.into_into_dart().into_dart(),
self.label.into_into_dart().into_dart(),
self.destination_pubkey.into_into_dart().into_dart(),
self.payment_preimage.into_into_dart().into_dart(),
self.keysend.into_into_dart().into_dart(),
self.bolt11.into_into_dart().into_dart(),
self.open_channel_bolt11.into_dart(),
self.lnurl_success_action
.map(|v| mirror_SuccessActionProcessed(v))
.into_dart(),
self.lnurl_pay_domain.into_dart(),
self.lnurl_pay_comment.into_dart(),
self.ln_address.into_dart(),
self.lnurl_metadata.into_dart(),
self.lnurl_withdraw_endpoint.into_dart(),
self.swap_info.into_dart(),
self.reverse_swap_info.into_dart(),
self.pending_expiration_block.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for LnPaymentDetails {}
impl rust2dart::IntoIntoDart<LnPaymentDetails> for LnPaymentDetails {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_LnUrlAuthRequestData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.k1.into_into_dart().into_dart(),
self.0.action.into_dart(),
self.0.domain.into_into_dart().into_dart(),
self.0.url.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlAuthRequestData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlAuthRequestData> for LnUrlAuthRequestData {
fn into_into_dart(self) -> mirror_LnUrlAuthRequestData {
mirror_LnUrlAuthRequestData(self)
}
}
impl support::IntoDart for mirror_LnUrlCallbackStatus {
fn into_dart(self) -> support::DartAbi {
match self.0 {
LnUrlCallbackStatus::Ok => vec![0.into_dart()],
LnUrlCallbackStatus::ErrorStatus { data } => {
vec![1.into_dart(), data.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlCallbackStatus {}
impl rust2dart::IntoIntoDart<mirror_LnUrlCallbackStatus> for LnUrlCallbackStatus {
fn into_into_dart(self) -> mirror_LnUrlCallbackStatus {
mirror_LnUrlCallbackStatus(self)
}
}
impl support::IntoDart for mirror_LnUrlErrorData {
fn into_dart(self) -> support::DartAbi {
vec![self.0.reason.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlErrorData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlErrorData> for LnUrlErrorData {
fn into_into_dart(self) -> mirror_LnUrlErrorData {
mirror_LnUrlErrorData(self)
}
}
impl support::IntoDart for mirror_LnUrlPayErrorData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.payment_hash.into_into_dart().into_dart(),
self.0.reason.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlPayErrorData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlPayErrorData> for LnUrlPayErrorData {
fn into_into_dart(self) -> mirror_LnUrlPayErrorData {
mirror_LnUrlPayErrorData(self)
}
}
impl support::IntoDart for mirror_LnUrlPayRequestData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.callback.into_into_dart().into_dart(),
self.0.min_sendable.into_into_dart().into_dart(),
self.0.max_sendable.into_into_dart().into_dart(),
self.0.metadata_str.into_into_dart().into_dart(),
self.0.comment_allowed.into_into_dart().into_dart(),
self.0.domain.into_into_dart().into_dart(),
self.0.allows_nostr.into_into_dart().into_dart(),
self.0.nostr_pubkey.into_dart(),
self.0.ln_address.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlPayRequestData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlPayRequestData> for LnUrlPayRequestData {
fn into_into_dart(self) -> mirror_LnUrlPayRequestData {
mirror_LnUrlPayRequestData(self)
}
}
impl support::IntoDart for LnUrlPayResult {
fn into_dart(self) -> support::DartAbi {
match self {
Self::EndpointSuccess { data } => {
vec![0.into_dart(), data.into_into_dart().into_dart()]
}
Self::EndpointError { data } => vec![1.into_dart(), data.into_into_dart().into_dart()],
Self::PayError { data } => vec![2.into_dart(), data.into_into_dart().into_dart()],
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for LnUrlPayResult {}
impl rust2dart::IntoIntoDart<LnUrlPayResult> for LnUrlPayResult {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for LnUrlPaySuccessData {
fn into_dart(self) -> support::DartAbi {
vec![
self.payment.into_into_dart().into_dart(),
self.success_action
.map(|v| mirror_SuccessActionProcessed(v))
.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for LnUrlPaySuccessData {}
impl rust2dart::IntoIntoDart<LnUrlPaySuccessData> for LnUrlPaySuccessData {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_LnUrlWithdrawRequestData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.callback.into_into_dart().into_dart(),
self.0.k1.into_into_dart().into_dart(),
self.0.default_description.into_into_dart().into_dart(),
self.0.min_withdrawable.into_into_dart().into_dart(),
self.0.max_withdrawable.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawRequestData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlWithdrawRequestData> for LnUrlWithdrawRequestData {
fn into_into_dart(self) -> mirror_LnUrlWithdrawRequestData {
mirror_LnUrlWithdrawRequestData(self)
}
}
impl support::IntoDart for mirror_LnUrlWithdrawResult {
fn into_dart(self) -> support::DartAbi {
match self.0 {
LnUrlWithdrawResult::Ok { data } => {
vec![0.into_dart(), data.into_into_dart().into_dart()]
}
LnUrlWithdrawResult::Timeout { data } => {
vec![1.into_dart(), data.into_into_dart().into_dart()]
}
LnUrlWithdrawResult::ErrorStatus { data } => {
vec![2.into_dart(), data.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawResult {}
impl rust2dart::IntoIntoDart<mirror_LnUrlWithdrawResult> for LnUrlWithdrawResult {
fn into_into_dart(self) -> mirror_LnUrlWithdrawResult {
mirror_LnUrlWithdrawResult(self)
}
}
impl support::IntoDart for mirror_LnUrlWithdrawSuccessData {
fn into_dart(self) -> support::DartAbi {
vec![self.0.invoice.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LnUrlWithdrawSuccessData {}
impl rust2dart::IntoIntoDart<mirror_LnUrlWithdrawSuccessData> for LnUrlWithdrawSuccessData {
fn into_into_dart(self) -> mirror_LnUrlWithdrawSuccessData {
mirror_LnUrlWithdrawSuccessData(self)
}
}
impl support::IntoDart for mirror_LocaleOverrides {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.locale.into_into_dart().into_dart(),
self.0.spacing.into_dart(),
self.0.symbol.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LocaleOverrides {}
impl rust2dart::IntoIntoDart<mirror_LocaleOverrides> for LocaleOverrides {
fn into_into_dart(self) -> mirror_LocaleOverrides {
mirror_LocaleOverrides(self)
}
}
impl support::IntoDart for mirror_LocalizedName {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.locale.into_into_dart().into_dart(),
self.0.name.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_LocalizedName {}
impl rust2dart::IntoIntoDart<mirror_LocalizedName> for LocalizedName {
fn into_into_dart(self) -> mirror_LocalizedName {
mirror_LocalizedName(self)
}
}
impl support::IntoDart for LogEntry {
fn into_dart(self) -> support::DartAbi {
vec![
self.line.into_into_dart().into_dart(),
self.level.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for LogEntry {}
impl rust2dart::IntoIntoDart<LogEntry> for LogEntry {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for LspInformation {
fn into_dart(self) -> support::DartAbi {
vec![
self.id.into_into_dart().into_dart(),
self.name.into_into_dart().into_dart(),
self.widget_url.into_into_dart().into_dart(),
self.pubkey.into_into_dart().into_dart(),
self.host.into_into_dart().into_dart(),
self.base_fee_msat.into_into_dart().into_dart(),
self.fee_rate.into_into_dart().into_dart(),
self.time_lock_delta.into_into_dart().into_dart(),
self.min_htlc_msat.into_into_dart().into_dart(),
self.lsp_pubkey.into_into_dart().into_dart(),
self.opening_fee_params_list.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for LspInformation {}
impl rust2dart::IntoIntoDart<LspInformation> for LspInformation {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_MessageSuccessActionData {
fn into_dart(self) -> support::DartAbi {
vec![self.0.message.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_MessageSuccessActionData {}
impl rust2dart::IntoIntoDart<mirror_MessageSuccessActionData> for MessageSuccessActionData {
fn into_into_dart(self) -> mirror_MessageSuccessActionData {
mirror_MessageSuccessActionData(self)
}
}
impl support::IntoDart for mirror_Network {
fn into_dart(self) -> support::DartAbi {
match self.0 {
Network::Bitcoin => 0,
Network::Testnet => 1,
Network::Signet => 2,
Network::Regtest => 3,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_Network {}
impl rust2dart::IntoIntoDart<mirror_Network> for Network {
fn into_into_dart(self) -> mirror_Network {
mirror_Network(self)
}
}
impl support::IntoDart for NodeConfig {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Greenlight { config } => vec![0.into_dart(), config.into_into_dart().into_dart()],
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for NodeConfig {}
impl rust2dart::IntoIntoDart<NodeConfig> for NodeConfig {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for NodeCredentials {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Greenlight { credentials } => {
vec![0.into_dart(), credentials.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for NodeCredentials {}
impl rust2dart::IntoIntoDart<NodeCredentials> for NodeCredentials {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for NodeState {
fn into_dart(self) -> support::DartAbi {
vec![
self.id.into_into_dart().into_dart(),
self.block_height.into_into_dart().into_dart(),
self.channels_balance_msat.into_into_dart().into_dart(),
self.onchain_balance_msat.into_into_dart().into_dart(),
self.pending_onchain_balance_msat
.into_into_dart()
.into_dart(),
self.utxos.into_into_dart().into_dart(),
self.max_payable_msat.into_into_dart().into_dart(),
self.max_receivable_msat.into_into_dart().into_dart(),
self.max_single_payment_amount_msat
.into_into_dart()
.into_dart(),
self.max_chan_reserve_msats.into_into_dart().into_dart(),
self.connected_peers.into_into_dart().into_dart(),
self.max_receivable_single_payment_amount_msat
.into_into_dart()
.into_dart(),
self.total_inbound_liquidity_msats
.into_into_dart()
.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for NodeState {}
impl rust2dart::IntoIntoDart<NodeState> for NodeState {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for OnchainPaymentLimitsResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.min_sat.into_into_dart().into_dart(),
self.max_sat.into_into_dart().into_dart(),
self.max_payable_sat.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for OnchainPaymentLimitsResponse {}
impl rust2dart::IntoIntoDart<OnchainPaymentLimitsResponse> for OnchainPaymentLimitsResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for OpenChannelFeeResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.fee_msat.into_dart(),
self.fee_params.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for OpenChannelFeeResponse {}
impl rust2dart::IntoIntoDart<OpenChannelFeeResponse> for OpenChannelFeeResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for OpeningFeeParams {
fn into_dart(self) -> support::DartAbi {
vec![
self.min_msat.into_into_dart().into_dart(),
self.proportional.into_into_dart().into_dart(),
self.valid_until.into_into_dart().into_dart(),
self.max_idle_time.into_into_dart().into_dart(),
self.max_client_to_self_delay.into_into_dart().into_dart(),
self.promise.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for OpeningFeeParams {}
impl rust2dart::IntoIntoDart<OpeningFeeParams> for OpeningFeeParams {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for OpeningFeeParamsMenu {
fn into_dart(self) -> support::DartAbi {
vec![self.values.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for OpeningFeeParamsMenu {}
impl rust2dart::IntoIntoDart<OpeningFeeParamsMenu> for OpeningFeeParamsMenu {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PayOnchainResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.reverse_swap_info.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for PayOnchainResponse {}
impl rust2dart::IntoIntoDart<PayOnchainResponse> for PayOnchainResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for Payment {
fn into_dart(self) -> support::DartAbi {
vec![
self.id.into_into_dart().into_dart(),
self.payment_type.into_into_dart().into_dart(),
self.payment_time.into_into_dart().into_dart(),
self.amount_msat.into_into_dart().into_dart(),
self.fee_msat.into_into_dart().into_dart(),
self.status.into_into_dart().into_dart(),
self.error.into_dart(),
self.description.into_dart(),
self.details.into_into_dart().into_dart(),
self.metadata.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for Payment {}
impl rust2dart::IntoIntoDart<Payment> for Payment {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PaymentDetails {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Ln { data } => vec![0.into_dart(), data.into_into_dart().into_dart()],
Self::ClosedChannel { data } => vec![1.into_dart(), data.into_into_dart().into_dart()],
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PaymentDetails {}
impl rust2dart::IntoIntoDart<PaymentDetails> for PaymentDetails {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PaymentFailedData {
fn into_dart(self) -> support::DartAbi {
vec![
self.error.into_into_dart().into_dart(),
self.node_id.into_into_dart().into_dart(),
self.invoice.map(|v| mirror_LNInvoice(v)).into_dart(),
self.label.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PaymentFailedData {}
impl rust2dart::IntoIntoDart<PaymentFailedData> for PaymentFailedData {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PaymentStatus {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Pending => 0,
Self::Complete => 1,
Self::Failed => 2,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PaymentStatus {}
impl rust2dart::IntoIntoDart<PaymentStatus> for PaymentStatus {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PaymentType {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Sent => 0,
Self::Received => 1,
Self::ClosedChannel => 2,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PaymentType {}
impl rust2dart::IntoIntoDart<PaymentType> for PaymentType {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PrepareOnchainPaymentResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.fees_hash.into_into_dart().into_dart(),
self.fees_percentage.into_into_dart().into_dart(),
self.fees_lockup.into_into_dart().into_dart(),
self.fees_claim.into_into_dart().into_dart(),
self.sender_amount_sat.into_into_dart().into_dart(),
self.recipient_amount_sat.into_into_dart().into_dart(),
self.total_fees.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PrepareOnchainPaymentResponse {}
impl rust2dart::IntoIntoDart<PrepareOnchainPaymentResponse> for PrepareOnchainPaymentResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PrepareRedeemOnchainFundsResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.tx_weight.into_into_dart().into_dart(),
self.tx_fee_sat.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PrepareRedeemOnchainFundsResponse {}
impl rust2dart::IntoIntoDart<PrepareRedeemOnchainFundsResponse>
for PrepareRedeemOnchainFundsResponse
{
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for PrepareRefundResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.refund_tx_weight.into_into_dart().into_dart(),
self.refund_tx_fee_sat.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for PrepareRefundResponse {}
impl rust2dart::IntoIntoDart<PrepareRefundResponse> for PrepareRefundResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_Rate {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.coin.into_into_dart().into_dart(),
self.0.value.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_Rate {}
impl rust2dart::IntoIntoDart<mirror_Rate> for Rate {
fn into_into_dart(self) -> mirror_Rate {
mirror_Rate(self)
}
}
impl support::IntoDart for ReceivePaymentResponse {
fn into_dart(self) -> support::DartAbi {
vec![
self.ln_invoice.into_into_dart().into_dart(),
self.opening_fee_params.into_dart(),
self.opening_fee_msat.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ReceivePaymentResponse {}
impl rust2dart::IntoIntoDart<ReceivePaymentResponse> for ReceivePaymentResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for RecommendedFees {
fn into_dart(self) -> support::DartAbi {
vec![
self.fastest_fee.into_into_dart().into_dart(),
self.half_hour_fee.into_into_dart().into_dart(),
self.hour_fee.into_into_dart().into_dart(),
self.economy_fee.into_into_dart().into_dart(),
self.minimum_fee.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for RecommendedFees {}
impl rust2dart::IntoIntoDart<RecommendedFees> for RecommendedFees {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for RedeemOnchainFundsResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.txid.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for RedeemOnchainFundsResponse {}
impl rust2dart::IntoIntoDart<RedeemOnchainFundsResponse> for RedeemOnchainFundsResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for RefundResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.refund_tx_id.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for RefundResponse {}
impl rust2dart::IntoIntoDart<RefundResponse> for RefundResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ReverseSwapInfo {
fn into_dart(self) -> support::DartAbi {
vec![
self.id.into_into_dart().into_dart(),
self.claim_pubkey.into_into_dart().into_dart(),
self.lockup_txid.into_dart(),
self.claim_txid.into_dart(),
self.onchain_amount_sat.into_into_dart().into_dart(),
self.status.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ReverseSwapInfo {}
impl rust2dart::IntoIntoDart<ReverseSwapInfo> for ReverseSwapInfo {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ReverseSwapPairInfo {
fn into_dart(self) -> support::DartAbi {
vec![
self.min.into_into_dart().into_dart(),
self.max.into_into_dart().into_dart(),
self.fees_hash.into_into_dart().into_dart(),
self.fees_percentage.into_into_dart().into_dart(),
self.fees_lockup.into_into_dart().into_dart(),
self.fees_claim.into_into_dart().into_dart(),
self.total_fees.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ReverseSwapPairInfo {}
impl rust2dart::IntoIntoDart<ReverseSwapPairInfo> for ReverseSwapPairInfo {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ReverseSwapStatus {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Initial => 0,
Self::InProgress => 1,
Self::Cancelled => 2,
Self::CompletedSeen => 3,
Self::CompletedConfirmed => 4,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for ReverseSwapStatus {}
impl rust2dart::IntoIntoDart<ReverseSwapStatus> for ReverseSwapStatus {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_RouteHint {
fn into_dart(self) -> support::DartAbi {
vec![self.0.hops.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_RouteHint {}
impl rust2dart::IntoIntoDart<mirror_RouteHint> for RouteHint {
fn into_into_dart(self) -> mirror_RouteHint {
mirror_RouteHint(self)
}
}
impl support::IntoDart for mirror_RouteHintHop {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.src_node_id.into_into_dart().into_dart(),
self.0.short_channel_id.into_into_dart().into_dart(),
self.0.fees_base_msat.into_into_dart().into_dart(),
self.0
.fees_proportional_millionths
.into_into_dart()
.into_dart(),
self.0.cltv_expiry_delta.into_into_dart().into_dart(),
self.0.htlc_minimum_msat.into_dart(),
self.0.htlc_maximum_msat.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_RouteHintHop {}
impl rust2dart::IntoIntoDart<mirror_RouteHintHop> for RouteHintHop {
fn into_into_dart(self) -> mirror_RouteHintHop {
mirror_RouteHintHop(self)
}
}
impl support::IntoDart for SendPaymentResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.payment.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for SendPaymentResponse {}
impl rust2dart::IntoIntoDart<SendPaymentResponse> for SendPaymentResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for ServiceHealthCheckResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.status.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for ServiceHealthCheckResponse {}
impl rust2dart::IntoIntoDart<ServiceHealthCheckResponse> for ServiceHealthCheckResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for SignMessageResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.signature.into_into_dart().into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for SignMessageResponse {}
impl rust2dart::IntoIntoDart<SignMessageResponse> for SignMessageResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for StaticBackupResponse {
fn into_dart(self) -> support::DartAbi {
vec![self.backup.into_dart()].into_dart()
}
}
impl support::IntoDartExceptPrimitive for StaticBackupResponse {}
impl rust2dart::IntoIntoDart<StaticBackupResponse> for StaticBackupResponse {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_SuccessActionProcessed {
fn into_dart(self) -> support::DartAbi {
match self.0 {
SuccessActionProcessed::Aes { result } => {
vec![0.into_dart(), result.into_into_dart().into_dart()]
}
SuccessActionProcessed::Message { data } => {
vec![1.into_dart(), data.into_into_dart().into_dart()]
}
SuccessActionProcessed::Url { data } => {
vec![2.into_dart(), data.into_into_dart().into_dart()]
}
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_SuccessActionProcessed {}
impl rust2dart::IntoIntoDart<mirror_SuccessActionProcessed> for SuccessActionProcessed {
fn into_into_dart(self) -> mirror_SuccessActionProcessed {
mirror_SuccessActionProcessed(self)
}
}
impl support::IntoDart for SwapInfo {
fn into_dart(self) -> support::DartAbi {
vec![
self.bitcoin_address.into_into_dart().into_dart(),
self.created_at.into_into_dart().into_dart(),
self.lock_height.into_into_dart().into_dart(),
self.payment_hash.into_into_dart().into_dart(),
self.preimage.into_into_dart().into_dart(),
self.private_key.into_into_dart().into_dart(),
self.public_key.into_into_dart().into_dart(),
self.swapper_public_key.into_into_dart().into_dart(),
self.script.into_into_dart().into_dart(),
self.bolt11.into_dart(),
self.paid_msat.into_into_dart().into_dart(),
self.total_incoming_txs.into_into_dart().into_dart(),
self.confirmed_sats.into_into_dart().into_dart(),
self.unconfirmed_sats.into_into_dart().into_dart(),
self.status.into_into_dart().into_dart(),
self.refund_tx_ids.into_into_dart().into_dart(),
self.unconfirmed_tx_ids.into_into_dart().into_dart(),
self.confirmed_tx_ids.into_into_dart().into_dart(),
self.min_allowed_deposit.into_into_dart().into_dart(),
self.max_allowed_deposit.into_into_dart().into_dart(),
self.max_swapper_payable.into_into_dart().into_dart(),
self.last_redeem_error.into_dart(),
self.channel_opening_fees.into_dart(),
self.confirmed_at.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for SwapInfo {}
impl rust2dart::IntoIntoDart<SwapInfo> for SwapInfo {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for SwapStatus {
fn into_dart(self) -> support::DartAbi {
match self {
Self::Initial => 0,
Self::WaitingConfirmation => 1,
Self::Redeemable => 2,
Self::Redeemed => 3,
Self::Refundable => 4,
Self::Completed => 5,
}
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for SwapStatus {}
impl rust2dart::IntoIntoDart<SwapStatus> for SwapStatus {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_Symbol {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.grapheme.into_dart(),
self.0.template.into_dart(),
self.0.rtl.into_dart(),
self.0.position.into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_Symbol {}
impl rust2dart::IntoIntoDart<mirror_Symbol> for Symbol {
fn into_into_dart(self) -> mirror_Symbol {
mirror_Symbol(self)
}
}
impl support::IntoDart for UnspentTransactionOutput {
fn into_dart(self) -> support::DartAbi {
vec![
self.txid.into_into_dart().into_dart(),
self.outnum.into_into_dart().into_dart(),
self.amount_millisatoshi.into_into_dart().into_dart(),
self.address.into_into_dart().into_dart(),
self.reserved.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for UnspentTransactionOutput {}
impl rust2dart::IntoIntoDart<UnspentTransactionOutput> for UnspentTransactionOutput {
fn into_into_dart(self) -> Self {
self
}
}
impl support::IntoDart for mirror_UrlSuccessActionData {
fn into_dart(self) -> support::DartAbi {
vec![
self.0.description.into_into_dart().into_dart(),
self.0.url.into_into_dart().into_dart(),
]
.into_dart()
}
}
impl support::IntoDartExceptPrimitive for mirror_UrlSuccessActionData {}
impl rust2dart::IntoIntoDart<mirror_UrlSuccessActionData> for UrlSuccessActionData {
fn into_into_dart(self) -> mirror_UrlSuccessActionData {
mirror_UrlSuccessActionData(self)
}
}
support::lazy_static! {
pub static ref FLUTTER_RUST_BRIDGE_HANDLER: support::DefaultHandler = Default::default();
}
#[cfg(not(target_family = "wasm"))]
#[path = "bridge_generated.io.rs"]
mod io;
#[cfg(not(target_family = "wasm"))]
pub use self::io::*;