mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2026-01-07 16:14:29 +01:00
11660 lines
458 KiB
Rust
11660 lines
458 KiB
Rust
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.4.0.
|
|
|
|
#![allow(
|
|
non_camel_case_types,
|
|
unused,
|
|
non_snake_case,
|
|
clippy::needless_return,
|
|
clippy::redundant_closure_call,
|
|
clippy::redundant_closure,
|
|
clippy::useless_conversion,
|
|
clippy::unit_arg,
|
|
clippy::unused_unit,
|
|
clippy::double_parens,
|
|
clippy::let_and_return,
|
|
clippy::too_many_arguments,
|
|
clippy::match_single_binding,
|
|
clippy::clone_on_copy,
|
|
clippy::let_unit_value,
|
|
clippy::deref_addrof,
|
|
clippy::explicit_auto_deref,
|
|
clippy::borrow_deref_ref,
|
|
clippy::needless_borrow
|
|
)]
|
|
|
|
// Section: imports
|
|
|
|
use crate::bindings::*;
|
|
use crate::model::EventListener;
|
|
use flutter_rust_bridge::for_generated::byteorder::{NativeEndian, ReadBytesExt, WriteBytesExt};
|
|
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
|
|
use flutter_rust_bridge::{Handler, IntoIntoDart};
|
|
|
|
// Section: boilerplate
|
|
|
|
flutter_rust_bridge::frb_generated_boilerplate!(
|
|
default_stream_sink_codec = DcoCodec,
|
|
default_rust_opaque = RustOpaqueNom,
|
|
default_rust_auto_opaque = RustAutoOpaqueNom,
|
|
);
|
|
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_VERSION: &str = "2.4.0";
|
|
pub(crate) const FLUTTER_RUST_BRIDGE_CODEGEN_CONTENT_HASH: i32 = 1532646653;
|
|
|
|
// Section: executor
|
|
|
|
flutter_rust_bridge::frb_generated_default_handler!();
|
|
|
|
// Section: wire_funcs
|
|
|
|
fn wire__crate__bindings__BindingLiquidSdk_add_event_listener_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
listener: impl CstDecode<
|
|
StreamSink<crate::model::SdkEvent, flutter_rust_bridge::for_generated::DcoCodec>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_add_event_listener",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_listener = listener.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::add_event_listener(
|
|
&*api_that_guard,
|
|
api_listener,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_backup_impl(
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::BackupRequest>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_backup",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_req = req.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::SdkError>((move || {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![
|
|
flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
),
|
|
]);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::backup(&*api_that_guard, api_req)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_buy_bitcoin_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::BuyBitcoinRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::buy_bitcoin(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_check_message_impl(
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::CheckMessageRequest>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_check_message",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_req = req.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::SdkError>((move || {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![
|
|
flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
),
|
|
]);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::check_message(&*api_that_guard, api_req)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_disconnect_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::disconnect(&*api_that_guard).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_empty_wallet_cache_impl(
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_empty_wallet_cache",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::SdkError>((move || {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![
|
|
flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
),
|
|
]);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::empty_wallet_cache(&*api_that_guard)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::fetch_fiat_rates(&*api_that_guard)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_fetch_lightning_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::fetch_lightning_limits(
|
|
&*api_that_guard,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_fetch_onchain_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::fetch_onchain_limits(
|
|
&*api_that_guard,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_get_info_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_get_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::get_info(&*api_that_guard).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::list_fiat_currencies(
|
|
&*api_that_guard,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_list_payments_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::ListPaymentsRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::list_payments(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_list_refundables_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::list_refundables(&*api_that_guard)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_lnurl_auth_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req_data: impl CstDecode<crate::bindings::LnUrlAuthRequestData>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::bindings::duplicates::LnUrlAuthError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::lnurl_auth(
|
|
&*api_that_guard,
|
|
api_req_data,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_lnurl_pay_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::bindings::LnUrlPayRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::bindings::duplicates::LnUrlPayError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::lnurl_pay(&*api_that_guard, api_req)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_lnurl_withdraw_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::bindings::LnUrlWithdrawRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::bindings::duplicates::LnUrlWithdrawError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::lnurl_withdraw(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_pay_onchain_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PayOnchainRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::pay_onchain(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_prepare_buy_bitcoin_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PrepareBuyBitcoinRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_prepare_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::prepare_buy_bitcoin(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_prepare_pay_onchain_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PreparePayOnchainRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_prepare_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::prepare_pay_onchain(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_prepare_receive_payment_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PrepareReceiveRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_prepare_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::prepare_receive_payment(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_prepare_refund_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PrepareRefundRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::prepare_refund(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_prepare_send_payment_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::PrepareSendRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_prepare_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::prepare_send_payment(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_receive_payment_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::ReceivePaymentRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::receive_payment(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_recommended_fees_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::recommended_fees(&*api_that_guard)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_refund_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::RefundRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::refund(&*api_that_guard, api_req)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_register_webhook_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
webhook_url: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::register_webhook(
|
|
&*api_that_guard,
|
|
api_webhook_url,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_rescan_onchain_swaps_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_rescan_onchain_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::rescan_onchain_swaps(
|
|
&*api_that_guard,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_restore_impl(
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::RestoreRequest>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_restore",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_req = req.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::SdkError>((move || {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![
|
|
flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
),
|
|
]);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::restore(&*api_that_guard, api_req)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_send_payment_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::SendPaymentRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok = crate::bindings::BindingLiquidSdk::send_payment(
|
|
&*api_that_guard,
|
|
api_req,
|
|
)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_sign_message_impl(
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
req: impl CstDecode<crate::model::SignMessageRequest>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_sign_message",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_req = req.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::SdkError>((move || {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(vec![
|
|
flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
),
|
|
]);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => api_that_guard = Some(api_that.lockable_decode_sync_ref()),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::sign_message(&*api_that_guard, api_req)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_sync_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::sync(&*api_that_guard).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__BindingLiquidSdk_unregister_webhook_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<
|
|
RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>,
|
|
>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "BindingLiquidSdk_unregister_webhook",
|
|
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::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let mut api_that_guard = None;
|
|
let decode_indices_ =
|
|
flutter_rust_bridge::for_generated::lockable_compute_decode_order(
|
|
vec![flutter_rust_bridge::for_generated::LockableOrderInfo::new(
|
|
&api_that, 0, false,
|
|
)],
|
|
);
|
|
for i in decode_indices_ {
|
|
match i {
|
|
0 => {
|
|
api_that_guard =
|
|
Some(api_that.lockable_decode_async_ref().await)
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
let api_that_guard = api_that_guard.unwrap();
|
|
let output_ok =
|
|
crate::bindings::BindingLiquidSdk::unregister_webhook(&*api_that_guard)
|
|
.await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__binding_event_listener_on_event_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
that: impl CstDecode<crate::bindings::BindingEventListener>,
|
|
e: impl CstDecode<crate::model::SdkEvent>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "binding_event_listener_on_event",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_that = that.cst_decode();
|
|
let api_e = e.cst_decode();
|
|
move |context| {
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok({
|
|
crate::bindings::BindingEventListener::on_event(&api_that, api_e);
|
|
})?;
|
|
Ok(output_ok)
|
|
})())
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__breez_log_stream_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
s: impl CstDecode<StreamSink<crate::model::LogEntry, flutter_rust_bridge::for_generated::DcoCodec>>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_normal::<flutter_rust_bridge::for_generated::DcoCodec, _, _>(
|
|
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::<_, _, flutter_rust_bridge::for_generated::anyhow::Error>(
|
|
(move || {
|
|
let output_ok = crate::bindings::breez_log_stream(api_s)?;
|
|
Ok(output_ok)
|
|
})(),
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__connect_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
req: impl CstDecode<crate::model::ConnectRequest>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "connect",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_req = req.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, crate::error::SdkError>(
|
|
(move || async move {
|
|
let output_ok = crate::bindings::connect(api_req).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__default_config_impl(
|
|
network: impl CstDecode<crate::model::LiquidNetwork>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "default_config",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_network = network.cst_decode();
|
|
transform_result_dco::<_, _, ()>((move || {
|
|
let output_ok = Result::<_, ()>::Ok(crate::bindings::default_config(api_network))?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__parse_impl(
|
|
port_: flutter_rust_bridge::for_generated::MessagePort,
|
|
input: impl CstDecode<String>,
|
|
) {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_async::<flutter_rust_bridge::for_generated::DcoCodec, _, _, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "parse",
|
|
port: Some(port_),
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Normal,
|
|
},
|
|
move || {
|
|
let api_input = input.cst_decode();
|
|
move |context| async move {
|
|
transform_result_dco::<_, _, crate::error::PaymentError>(
|
|
(move || async move {
|
|
let output_ok = crate::bindings::parse(api_input).await?;
|
|
Ok(output_ok)
|
|
})()
|
|
.await,
|
|
)
|
|
}
|
|
},
|
|
)
|
|
}
|
|
fn wire__crate__bindings__parse_invoice_impl(
|
|
input: impl CstDecode<String>,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
FLUTTER_RUST_BRIDGE_HANDLER.wrap_sync::<flutter_rust_bridge::for_generated::DcoCodec, _>(
|
|
flutter_rust_bridge::for_generated::TaskInfo {
|
|
debug_name: "parse_invoice",
|
|
port: None,
|
|
mode: flutter_rust_bridge::for_generated::FfiCallMode::Sync,
|
|
},
|
|
move || {
|
|
let api_input = input.cst_decode();
|
|
transform_result_dco::<_, _, crate::error::PaymentError>((move || {
|
|
let output_ok = crate::bindings::parse_invoice(api_input)?;
|
|
Ok(output_ok)
|
|
})())
|
|
},
|
|
)
|
|
}
|
|
|
|
// Section: static_checks
|
|
|
|
#[allow(clippy::unnecessary_literal_unwrap)]
|
|
const _: fn() = || {
|
|
{
|
|
let AesSuccessActionDataDecrypted =
|
|
None::<crate::bindings::AesSuccessActionDataDecrypted>.unwrap();
|
|
let _: String = AesSuccessActionDataDecrypted.description;
|
|
let _: String = AesSuccessActionDataDecrypted.plaintext;
|
|
}
|
|
match None::<crate::bindings::AesSuccessActionDataResult>.unwrap() {
|
|
crate::bindings::AesSuccessActionDataResult::Decrypted { data } => {
|
|
let _: crate::bindings::AesSuccessActionDataDecrypted = data;
|
|
}
|
|
crate::bindings::AesSuccessActionDataResult::ErrorStatus { reason } => {
|
|
let _: String = reason;
|
|
}
|
|
}
|
|
{
|
|
let BitcoinAddressData = None::<crate::bindings::BitcoinAddressData>.unwrap();
|
|
let _: String = BitcoinAddressData.address;
|
|
let _: crate::bindings::Network = BitcoinAddressData.network;
|
|
let _: Option<u64> = BitcoinAddressData.amount_sat;
|
|
let _: Option<String> = BitcoinAddressData.label;
|
|
let _: Option<String> = BitcoinAddressData.message;
|
|
}
|
|
{
|
|
let CurrencyInfo = None::<crate::bindings::CurrencyInfo>.unwrap();
|
|
let _: String = CurrencyInfo.name;
|
|
let _: u32 = CurrencyInfo.fraction_size;
|
|
let _: Option<u32> = CurrencyInfo.spacing;
|
|
let _: Option<crate::bindings::Symbol> = CurrencyInfo.symbol;
|
|
let _: Option<crate::bindings::Symbol> = CurrencyInfo.uniq_symbol;
|
|
let _: Vec<crate::bindings::LocalizedName> = CurrencyInfo.localized_name;
|
|
let _: Vec<crate::bindings::LocaleOverrides> = CurrencyInfo.locale_overrides;
|
|
}
|
|
{
|
|
let FiatCurrency = None::<crate::bindings::FiatCurrency>.unwrap();
|
|
let _: String = FiatCurrency.id;
|
|
let _: crate::bindings::CurrencyInfo = FiatCurrency.info;
|
|
}
|
|
match None::<crate::bindings::InputType>.unwrap() {
|
|
crate::bindings::InputType::BitcoinAddress { address } => {
|
|
let _: crate::bindings::BitcoinAddressData = address;
|
|
}
|
|
crate::bindings::InputType::LiquidAddress { address } => {
|
|
let _: crate::bindings::LiquidAddressData = address;
|
|
}
|
|
crate::bindings::InputType::Bolt11 { invoice } => {
|
|
let _: crate::bindings::LNInvoice = invoice;
|
|
}
|
|
crate::bindings::InputType::NodeId { node_id } => {
|
|
let _: String = node_id;
|
|
}
|
|
crate::bindings::InputType::Url { url } => {
|
|
let _: String = url;
|
|
}
|
|
crate::bindings::InputType::LnUrlPay { data } => {
|
|
let _: crate::bindings::LnUrlPayRequestData = data;
|
|
}
|
|
crate::bindings::InputType::LnUrlWithdraw { data } => {
|
|
let _: crate::bindings::LnUrlWithdrawRequestData = data;
|
|
}
|
|
crate::bindings::InputType::LnUrlAuth { data } => {
|
|
let _: crate::bindings::LnUrlAuthRequestData = data;
|
|
}
|
|
crate::bindings::InputType::LnUrlError { data } => {
|
|
let _: crate::bindings::LnUrlErrorData = data;
|
|
}
|
|
}
|
|
{
|
|
let LiquidAddressData = None::<crate::bindings::LiquidAddressData>.unwrap();
|
|
let _: String = LiquidAddressData.address;
|
|
let _: crate::bindings::Network = LiquidAddressData.network;
|
|
let _: Option<String> = LiquidAddressData.asset_id;
|
|
let _: Option<u64> = LiquidAddressData.amount_sat;
|
|
let _: Option<String> = LiquidAddressData.label;
|
|
let _: Option<String> = LiquidAddressData.message;
|
|
}
|
|
{
|
|
let LNInvoice = None::<crate::bindings::LNInvoice>.unwrap();
|
|
let _: String = LNInvoice.bolt11;
|
|
let _: crate::bindings::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<crate::bindings::RouteHint> = LNInvoice.routing_hints;
|
|
let _: Vec<u8> = LNInvoice.payment_secret;
|
|
let _: u64 = LNInvoice.min_final_cltv_expiry_delta;
|
|
}
|
|
{
|
|
let LnUrlAuthRequestData = None::<crate::bindings::LnUrlAuthRequestData>.unwrap();
|
|
let _: String = LnUrlAuthRequestData.k1;
|
|
let _: Option<String> = LnUrlAuthRequestData.action;
|
|
let _: String = LnUrlAuthRequestData.domain;
|
|
let _: String = LnUrlAuthRequestData.url;
|
|
}
|
|
{
|
|
let LnUrlErrorData = None::<crate::bindings::LnUrlErrorData>.unwrap();
|
|
let _: String = LnUrlErrorData.reason;
|
|
}
|
|
{
|
|
let LnUrlPayErrorData = None::<crate::bindings::LnUrlPayErrorData>.unwrap();
|
|
let _: String = LnUrlPayErrorData.payment_hash;
|
|
let _: String = LnUrlPayErrorData.reason;
|
|
}
|
|
{
|
|
let LnUrlPayRequest = None::<crate::bindings::LnUrlPayRequest>.unwrap();
|
|
let _: crate::bindings::LnUrlPayRequestData = LnUrlPayRequest.data;
|
|
let _: u64 = LnUrlPayRequest.amount_msat;
|
|
let _: Option<String> = LnUrlPayRequest.comment;
|
|
let _: Option<String> = LnUrlPayRequest.payment_label;
|
|
let _: Option<bool> = LnUrlPayRequest.validate_success_action_url;
|
|
}
|
|
{
|
|
let LnUrlPayRequestData = None::<crate::bindings::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 LnUrlWithdrawRequest = None::<crate::bindings::LnUrlWithdrawRequest>.unwrap();
|
|
let _: crate::bindings::LnUrlWithdrawRequestData = LnUrlWithdrawRequest.data;
|
|
let _: u64 = LnUrlWithdrawRequest.amount_msat;
|
|
let _: Option<String> = LnUrlWithdrawRequest.description;
|
|
}
|
|
{
|
|
let LnUrlWithdrawRequestData = None::<crate::bindings::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;
|
|
}
|
|
{
|
|
let LocaleOverrides = None::<crate::bindings::LocaleOverrides>.unwrap();
|
|
let _: String = LocaleOverrides.locale;
|
|
let _: Option<u32> = LocaleOverrides.spacing;
|
|
let _: crate::bindings::Symbol = LocaleOverrides.symbol;
|
|
}
|
|
{
|
|
let LocalizedName = None::<crate::bindings::LocalizedName>.unwrap();
|
|
let _: String = LocalizedName.locale;
|
|
let _: String = LocalizedName.name;
|
|
}
|
|
{
|
|
let MessageSuccessActionData = None::<crate::bindings::MessageSuccessActionData>.unwrap();
|
|
let _: String = MessageSuccessActionData.message;
|
|
}
|
|
{
|
|
let Rate = None::<crate::bindings::Rate>.unwrap();
|
|
let _: String = Rate.coin;
|
|
let _: f64 = Rate.value;
|
|
}
|
|
{
|
|
let RouteHint = None::<crate::bindings::RouteHint>.unwrap();
|
|
let _: Vec<crate::bindings::RouteHintHop> = RouteHint.hops;
|
|
}
|
|
{
|
|
let RouteHintHop = None::<crate::bindings::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::<crate::bindings::SuccessActionProcessed>.unwrap() {
|
|
crate::bindings::SuccessActionProcessed::Aes { result } => {
|
|
let _: crate::bindings::AesSuccessActionDataResult = result;
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Message { data } => {
|
|
let _: crate::bindings::MessageSuccessActionData = data;
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Url { data } => {
|
|
let _: crate::bindings::UrlSuccessActionData = data;
|
|
}
|
|
}
|
|
{
|
|
let Symbol = None::<crate::bindings::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::<crate::bindings::UrlSuccessActionData>.unwrap();
|
|
let _: String = UrlSuccessActionData.description;
|
|
let _: String = UrlSuccessActionData.url;
|
|
let _: bool = UrlSuccessActionData.matches_callback_domain;
|
|
}
|
|
};
|
|
|
|
// Section: dart2rust
|
|
|
|
impl CstDecode<bool> for bool {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> bool {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::BuyBitcoinProvider> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::BuyBitcoinProvider {
|
|
match self {
|
|
0 => crate::model::BuyBitcoinProvider::Moonpay,
|
|
_ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<f64> for f64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> f64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<i32> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> i32 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<i64> for i64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> i64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LiquidNetwork> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LiquidNetwork {
|
|
match self {
|
|
0 => crate::model::LiquidNetwork::Mainnet,
|
|
1 => crate::model::LiquidNetwork::Testnet,
|
|
_ => unreachable!("Invalid variant for LiquidNetwork: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::Network> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::Network {
|
|
match self {
|
|
0 => crate::bindings::Network::Bitcoin,
|
|
1 => crate::bindings::Network::Testnet,
|
|
2 => crate::bindings::Network::Signet,
|
|
3 => crate::bindings::Network::Regtest,
|
|
_ => unreachable!("Invalid variant for Network: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PaymentMethod> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PaymentMethod {
|
|
match self {
|
|
0 => crate::model::PaymentMethod::Lightning,
|
|
1 => crate::model::PaymentMethod::BitcoinAddress,
|
|
2 => crate::model::PaymentMethod::LiquidAddress,
|
|
_ => unreachable!("Invalid variant for PaymentMethod: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PaymentState> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PaymentState {
|
|
match self {
|
|
0 => crate::model::PaymentState::Created,
|
|
1 => crate::model::PaymentState::Pending,
|
|
2 => crate::model::PaymentState::Complete,
|
|
3 => crate::model::PaymentState::Failed,
|
|
4 => crate::model::PaymentState::TimedOut,
|
|
5 => crate::model::PaymentState::Refundable,
|
|
6 => crate::model::PaymentState::RefundPending,
|
|
_ => unreachable!("Invalid variant for PaymentState: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PaymentType> for i32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PaymentType {
|
|
match self {
|
|
0 => crate::model::PaymentType::Receive,
|
|
1 => crate::model::PaymentType::Send,
|
|
_ => unreachable!("Invalid variant for PaymentType: {}", self),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<u16> for u16 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u16 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u32> for u32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u32 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u64> for u64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u64 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<u8> for u8 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u8 {
|
|
self
|
|
}
|
|
}
|
|
impl CstDecode<usize> for usize {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> usize {
|
|
self
|
|
}
|
|
}
|
|
impl SseDecode for flutter_rust_bridge::for_generated::anyhow::Error {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <String>::sse_decode(deserializer);
|
|
return flutter_rust_bridge::for_generated::anyhow::anyhow!("{}", inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode for BindingLiquidSdk {
|
|
// 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 = <RustOpaqueNom<
|
|
flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>,
|
|
>>::sse_decode(deserializer);
|
|
return flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode
|
|
for RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>
|
|
{
|
|
// 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 = <usize>::sse_decode(deserializer);
|
|
return unsafe { decode_rust_opaque_nom(inner) };
|
|
}
|
|
}
|
|
|
|
impl SseDecode
|
|
for StreamSink<crate::model::LogEntry, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
// 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 = <String>::sse_decode(deserializer);
|
|
return StreamSink::deserialize(inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode
|
|
for StreamSink<crate::model::SdkEvent, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
// 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 = <String>::sse_decode(deserializer);
|
|
return StreamSink::deserialize(inner);
|
|
}
|
|
}
|
|
|
|
impl SseDecode for String {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <Vec<u8>>::sse_decode(deserializer);
|
|
return String::from_utf8(inner).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::AesSuccessActionDataDecrypted {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_description = <String>::sse_decode(deserializer);
|
|
let mut var_plaintext = <String>::sse_decode(deserializer);
|
|
return crate::bindings::AesSuccessActionDataDecrypted {
|
|
description: var_description,
|
|
plaintext: var_plaintext,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::AesSuccessActionDataResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_data =
|
|
<crate::bindings::AesSuccessActionDataDecrypted>::sse_decode(deserializer);
|
|
return crate::bindings::AesSuccessActionDataResult::Decrypted { data: var_data };
|
|
}
|
|
1 => {
|
|
let mut var_reason = <String>::sse_decode(deserializer);
|
|
return crate::bindings::AesSuccessActionDataResult::ErrorStatus {
|
|
reason: var_reason,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::BackupRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_backupPath = <Option<String>>::sse_decode(deserializer);
|
|
return crate::model::BackupRequest {
|
|
backup_path: var_backupPath,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::BindingEventListener {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_stream = <StreamSink<
|
|
crate::model::SdkEvent,
|
|
flutter_rust_bridge::for_generated::DcoCodec,
|
|
>>::sse_decode(deserializer);
|
|
return crate::bindings::BindingEventListener { stream: var_stream };
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::BitcoinAddressData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_address = <String>::sse_decode(deserializer);
|
|
let mut var_network = <crate::bindings::Network>::sse_decode(deserializer);
|
|
let mut var_amountSat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_label = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_message = <Option<String>>::sse_decode(deserializer);
|
|
return crate::bindings::BitcoinAddressData {
|
|
address: var_address,
|
|
network: var_network,
|
|
amount_sat: var_amountSat,
|
|
label: var_label,
|
|
message: var_message,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for bool {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u8().unwrap() != 0
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::BuyBitcoinProvider {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::model::BuyBitcoinProvider::Moonpay,
|
|
_ => unreachable!("Invalid variant for BuyBitcoinProvider: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::BuyBitcoinRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_prepareResponse =
|
|
<crate::model::PrepareBuyBitcoinResponse>::sse_decode(deserializer);
|
|
let mut var_redirectUrl = <Option<String>>::sse_decode(deserializer);
|
|
return crate::model::BuyBitcoinRequest {
|
|
prepare_response: var_prepareResponse,
|
|
redirect_url: var_redirectUrl,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::CheckMessageRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_message = <String>::sse_decode(deserializer);
|
|
let mut var_pubkey = <String>::sse_decode(deserializer);
|
|
let mut var_signature = <String>::sse_decode(deserializer);
|
|
return crate::model::CheckMessageRequest {
|
|
message: var_message,
|
|
pubkey: var_pubkey,
|
|
signature: var_signature,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::CheckMessageResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_isValid = <bool>::sse_decode(deserializer);
|
|
return crate::model::CheckMessageResponse {
|
|
is_valid: var_isValid,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::Config {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_liquidElectrumUrl = <String>::sse_decode(deserializer);
|
|
let mut var_bitcoinElectrumUrl = <String>::sse_decode(deserializer);
|
|
let mut var_mempoolspaceUrl = <String>::sse_decode(deserializer);
|
|
let mut var_workingDir = <String>::sse_decode(deserializer);
|
|
let mut var_network = <crate::model::LiquidNetwork>::sse_decode(deserializer);
|
|
let mut var_paymentTimeoutSec = <u64>::sse_decode(deserializer);
|
|
let mut var_zeroConfMinFeeRateMsat = <u32>::sse_decode(deserializer);
|
|
let mut var_zeroConfMaxAmountSat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_breezApiKey = <Option<String>>::sse_decode(deserializer);
|
|
return crate::model::Config {
|
|
liquid_electrum_url: var_liquidElectrumUrl,
|
|
bitcoin_electrum_url: var_bitcoinElectrumUrl,
|
|
mempoolspace_url: var_mempoolspaceUrl,
|
|
working_dir: var_workingDir,
|
|
network: var_network,
|
|
payment_timeout_sec: var_paymentTimeoutSec,
|
|
zero_conf_min_fee_rate_msat: var_zeroConfMinFeeRateMsat,
|
|
zero_conf_max_amount_sat: var_zeroConfMaxAmountSat,
|
|
breez_api_key: var_breezApiKey,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::ConnectRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_mnemonic = <String>::sse_decode(deserializer);
|
|
let mut var_config = <crate::model::Config>::sse_decode(deserializer);
|
|
return crate::model::ConnectRequest {
|
|
mnemonic: var_mnemonic,
|
|
config: var_config,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::CurrencyInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_name = <String>::sse_decode(deserializer);
|
|
let mut var_fractionSize = <u32>::sse_decode(deserializer);
|
|
let mut var_spacing = <Option<u32>>::sse_decode(deserializer);
|
|
let mut var_symbol = <Option<crate::bindings::Symbol>>::sse_decode(deserializer);
|
|
let mut var_uniqSymbol = <Option<crate::bindings::Symbol>>::sse_decode(deserializer);
|
|
let mut var_localizedName = <Vec<crate::bindings::LocalizedName>>::sse_decode(deserializer);
|
|
let mut var_localeOverrides =
|
|
<Vec<crate::bindings::LocaleOverrides>>::sse_decode(deserializer);
|
|
return crate::bindings::CurrencyInfo {
|
|
name: var_name,
|
|
fraction_size: var_fractionSize,
|
|
spacing: var_spacing,
|
|
symbol: var_symbol,
|
|
uniq_symbol: var_uniqSymbol,
|
|
localized_name: var_localizedName,
|
|
locale_overrides: var_localeOverrides,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for f64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_f64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::FiatCurrency {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_id = <String>::sse_decode(deserializer);
|
|
let mut var_info = <crate::bindings::CurrencyInfo>::sse_decode(deserializer);
|
|
return crate::bindings::FiatCurrency {
|
|
id: var_id,
|
|
info: var_info,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::GetInfoResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_balanceSat = <u64>::sse_decode(deserializer);
|
|
let mut var_pendingSendSat = <u64>::sse_decode(deserializer);
|
|
let mut var_pendingReceiveSat = <u64>::sse_decode(deserializer);
|
|
let mut var_pubkey = <String>::sse_decode(deserializer);
|
|
return crate::model::GetInfoResponse {
|
|
balance_sat: var_balanceSat,
|
|
pending_send_sat: var_pendingSendSat,
|
|
pending_receive_sat: var_pendingReceiveSat,
|
|
pubkey: var_pubkey,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for i32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_i32::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for i64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_i64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::InputType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_address =
|
|
<crate::bindings::BitcoinAddressData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::BitcoinAddress {
|
|
address: var_address,
|
|
};
|
|
}
|
|
1 => {
|
|
let mut var_address =
|
|
<crate::bindings::LiquidAddressData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::LiquidAddress {
|
|
address: var_address,
|
|
};
|
|
}
|
|
2 => {
|
|
let mut var_invoice = <crate::bindings::LNInvoice>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::Bolt11 {
|
|
invoice: var_invoice,
|
|
};
|
|
}
|
|
3 => {
|
|
let mut var_nodeId = <String>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::NodeId {
|
|
node_id: var_nodeId,
|
|
};
|
|
}
|
|
4 => {
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::Url { url: var_url };
|
|
}
|
|
5 => {
|
|
let mut var_data = <crate::bindings::LnUrlPayRequestData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::LnUrlPay { data: var_data };
|
|
}
|
|
6 => {
|
|
let mut var_data =
|
|
<crate::bindings::LnUrlWithdrawRequestData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::LnUrlWithdraw { data: var_data };
|
|
}
|
|
7 => {
|
|
let mut var_data =
|
|
<crate::bindings::LnUrlAuthRequestData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::LnUrlAuth { data: var_data };
|
|
}
|
|
8 => {
|
|
let mut var_data = <crate::bindings::LnUrlErrorData>::sse_decode(deserializer);
|
|
return crate::bindings::InputType::LnUrlError { data: var_data };
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::LightningPaymentLimitsResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_send = <crate::model::Limits>::sse_decode(deserializer);
|
|
let mut var_receive = <crate::model::Limits>::sse_decode(deserializer);
|
|
return crate::model::LightningPaymentLimitsResponse {
|
|
send: var_send,
|
|
receive: var_receive,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::Limits {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_minSat = <u64>::sse_decode(deserializer);
|
|
let mut var_maxSat = <u64>::sse_decode(deserializer);
|
|
let mut var_maxZeroConfSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::Limits {
|
|
min_sat: var_minSat,
|
|
max_sat: var_maxSat,
|
|
max_zero_conf_sat: var_maxZeroConfSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LiquidAddressData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_address = <String>::sse_decode(deserializer);
|
|
let mut var_network = <crate::bindings::Network>::sse_decode(deserializer);
|
|
let mut var_assetId = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_amountSat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_label = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_message = <Option<String>>::sse_decode(deserializer);
|
|
return crate::bindings::LiquidAddressData {
|
|
address: var_address,
|
|
network: var_network,
|
|
asset_id: var_assetId,
|
|
amount_sat: var_amountSat,
|
|
label: var_label,
|
|
message: var_message,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::LiquidNetwork {
|
|
// 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 = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::model::LiquidNetwork::Mainnet,
|
|
1 => crate::model::LiquidNetwork::Testnet,
|
|
_ => unreachable!("Invalid variant for LiquidNetwork: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::FiatCurrency> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::FiatCurrency>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::LocaleOverrides> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::LocaleOverrides>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::LocalizedName> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::LocalizedName>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::model::Payment> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::model::Payment>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::model::PaymentType> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::model::PaymentType>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::ListPaymentsRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_filters = <Option<Vec<crate::model::PaymentType>>>::sse_decode(deserializer);
|
|
let mut var_fromTimestamp = <Option<i64>>::sse_decode(deserializer);
|
|
let mut var_toTimestamp = <Option<i64>>::sse_decode(deserializer);
|
|
let mut var_offset = <Option<u32>>::sse_decode(deserializer);
|
|
let mut var_limit = <Option<u32>>::sse_decode(deserializer);
|
|
return crate::model::ListPaymentsRequest {
|
|
filters: var_filters,
|
|
from_timestamp: var_fromTimestamp,
|
|
to_timestamp: var_toTimestamp,
|
|
offset: var_offset,
|
|
limit: var_limit,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<u8> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<u8>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::Rate> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::Rate>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::model::RefundableSwap> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::model::RefundableSwap>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::RouteHint> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::RouteHint>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Vec<crate::bindings::RouteHintHop> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut len_ = <i32>::sse_decode(deserializer);
|
|
let mut ans_ = vec![];
|
|
for idx_ in 0..len_ {
|
|
ans_.push(<crate::bindings::RouteHintHop>::sse_decode(deserializer));
|
|
}
|
|
return ans_;
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LNInvoice {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_bolt11 = <String>::sse_decode(deserializer);
|
|
let mut var_network = <crate::bindings::Network>::sse_decode(deserializer);
|
|
let mut var_payeePubkey = <String>::sse_decode(deserializer);
|
|
let mut var_paymentHash = <String>::sse_decode(deserializer);
|
|
let mut var_description = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_descriptionHash = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_amountMsat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_timestamp = <u64>::sse_decode(deserializer);
|
|
let mut var_expiry = <u64>::sse_decode(deserializer);
|
|
let mut var_routingHints = <Vec<crate::bindings::RouteHint>>::sse_decode(deserializer);
|
|
let mut var_paymentSecret = <Vec<u8>>::sse_decode(deserializer);
|
|
let mut var_minFinalCltvExpiryDelta = <u64>::sse_decode(deserializer);
|
|
return crate::bindings::LNInvoice {
|
|
bolt11: var_bolt11,
|
|
network: var_network,
|
|
payee_pubkey: var_payeePubkey,
|
|
payment_hash: var_paymentHash,
|
|
description: var_description,
|
|
description_hash: var_descriptionHash,
|
|
amount_msat: var_amountMsat,
|
|
timestamp: var_timestamp,
|
|
expiry: var_expiry,
|
|
routing_hints: var_routingHints,
|
|
payment_secret: var_paymentSecret,
|
|
min_final_cltv_expiry_delta: var_minFinalCltvExpiryDelta,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlAuthError {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlAuthError::Generic { err: var_err };
|
|
}
|
|
1 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlAuthError::InvalidUri { err: var_err };
|
|
}
|
|
2 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlAuthError::ServiceConnectivity {
|
|
err: var_err,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlAuthRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_k1 = <String>::sse_decode(deserializer);
|
|
let mut var_action = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_domain = <String>::sse_decode(deserializer);
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlAuthRequestData {
|
|
k1: var_k1,
|
|
action: var_action,
|
|
domain: var_domain,
|
|
url: var_url,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlCallbackStatus {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
return crate::bindings::duplicates::LnUrlCallbackStatus::Ok;
|
|
}
|
|
1 => {
|
|
let mut var_data = <crate::bindings::LnUrlErrorData>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlCallbackStatus::ErrorStatus {
|
|
data: var_data,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlErrorData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_reason = <String>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlErrorData { reason: var_reason };
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlPayError {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
return crate::bindings::duplicates::LnUrlPayError::AlreadyPaid;
|
|
}
|
|
1 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::Generic { err: var_err };
|
|
}
|
|
2 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::InvalidAmount { err: var_err };
|
|
}
|
|
3 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::InvalidInvoice { err: var_err };
|
|
}
|
|
4 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::InvalidNetwork { err: var_err };
|
|
}
|
|
5 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::InvalidUri { err: var_err };
|
|
}
|
|
6 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::InvoiceExpired { err: var_err };
|
|
}
|
|
7 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::PaymentFailed { err: var_err };
|
|
}
|
|
8 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::PaymentTimeout { err: var_err };
|
|
}
|
|
9 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::RouteNotFound { err: var_err };
|
|
}
|
|
10 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::RouteTooExpensive {
|
|
err: var_err,
|
|
};
|
|
}
|
|
11 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlPayError::ServiceConnectivity {
|
|
err: var_err,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlPayErrorData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_paymentHash = <String>::sse_decode(deserializer);
|
|
let mut var_reason = <String>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlPayErrorData {
|
|
payment_hash: var_paymentHash,
|
|
reason: var_reason,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlPayRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_data = <crate::bindings::LnUrlPayRequestData>::sse_decode(deserializer);
|
|
let mut var_amountMsat = <u64>::sse_decode(deserializer);
|
|
let mut var_comment = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_paymentLabel = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_validateSuccessActionUrl = <Option<bool>>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlPayRequest {
|
|
data: var_data,
|
|
amount_msat: var_amountMsat,
|
|
comment: var_comment,
|
|
payment_label: var_paymentLabel,
|
|
validate_success_action_url: var_validateSuccessActionUrl,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlPayRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_callback = <String>::sse_decode(deserializer);
|
|
let mut var_minSendable = <u64>::sse_decode(deserializer);
|
|
let mut var_maxSendable = <u64>::sse_decode(deserializer);
|
|
let mut var_metadataStr = <String>::sse_decode(deserializer);
|
|
let mut var_commentAllowed = <u16>::sse_decode(deserializer);
|
|
let mut var_domain = <String>::sse_decode(deserializer);
|
|
let mut var_allowsNostr = <bool>::sse_decode(deserializer);
|
|
let mut var_nostrPubkey = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_lnAddress = <Option<String>>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlPayRequestData {
|
|
callback: var_callback,
|
|
min_sendable: var_minSendable,
|
|
max_sendable: var_maxSendable,
|
|
metadata_str: var_metadataStr,
|
|
comment_allowed: var_commentAllowed,
|
|
domain: var_domain,
|
|
allows_nostr: var_allowsNostr,
|
|
nostr_pubkey: var_nostrPubkey,
|
|
ln_address: var_lnAddress,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::LnUrlPayResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_data = <crate::model::LnUrlPaySuccessData>::sse_decode(deserializer);
|
|
return crate::model::LnUrlPayResult::EndpointSuccess { data: var_data };
|
|
}
|
|
1 => {
|
|
let mut var_data = <crate::bindings::LnUrlErrorData>::sse_decode(deserializer);
|
|
return crate::model::LnUrlPayResult::EndpointError { data: var_data };
|
|
}
|
|
2 => {
|
|
let mut var_data = <crate::bindings::LnUrlPayErrorData>::sse_decode(deserializer);
|
|
return crate::model::LnUrlPayResult::PayError { data: var_data };
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::LnUrlPaySuccessData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_payment = <crate::model::Payment>::sse_decode(deserializer);
|
|
let mut var_successAction =
|
|
<Option<crate::bindings::SuccessActionProcessed>>::sse_decode(deserializer);
|
|
return crate::model::LnUrlPaySuccessData {
|
|
payment: var_payment,
|
|
success_action: var_successAction,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlWithdrawError {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::Generic { err: var_err };
|
|
}
|
|
1 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::InvalidAmount {
|
|
err: var_err,
|
|
};
|
|
}
|
|
2 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::InvalidInvoice {
|
|
err: var_err,
|
|
};
|
|
}
|
|
3 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::InvalidUri {
|
|
err: var_err,
|
|
};
|
|
}
|
|
4 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::InvoiceNoRoutingHints {
|
|
err: var_err,
|
|
};
|
|
}
|
|
5 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawError::ServiceConnectivity {
|
|
err: var_err,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlWithdrawRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_data = <crate::bindings::LnUrlWithdrawRequestData>::sse_decode(deserializer);
|
|
let mut var_amountMsat = <u64>::sse_decode(deserializer);
|
|
let mut var_description = <Option<String>>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlWithdrawRequest {
|
|
data: var_data,
|
|
amount_msat: var_amountMsat,
|
|
description: var_description,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LnUrlWithdrawRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_callback = <String>::sse_decode(deserializer);
|
|
let mut var_k1 = <String>::sse_decode(deserializer);
|
|
let mut var_defaultDescription = <String>::sse_decode(deserializer);
|
|
let mut var_minWithdrawable = <u64>::sse_decode(deserializer);
|
|
let mut var_maxWithdrawable = <u64>::sse_decode(deserializer);
|
|
return crate::bindings::LnUrlWithdrawRequestData {
|
|
callback: var_callback,
|
|
k1: var_k1,
|
|
default_description: var_defaultDescription,
|
|
min_withdrawable: var_minWithdrawable,
|
|
max_withdrawable: var_maxWithdrawable,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlWithdrawResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_data =
|
|
<crate::bindings::duplicates::LnUrlWithdrawSuccessData>::sse_decode(
|
|
deserializer,
|
|
);
|
|
return crate::bindings::duplicates::LnUrlWithdrawResult::Ok { data: var_data };
|
|
}
|
|
1 => {
|
|
let mut var_data =
|
|
<crate::bindings::duplicates::LnUrlWithdrawSuccessData>::sse_decode(
|
|
deserializer,
|
|
);
|
|
return crate::bindings::duplicates::LnUrlWithdrawResult::Timeout {
|
|
data: var_data,
|
|
};
|
|
}
|
|
2 => {
|
|
let mut var_data = <crate::bindings::LnUrlErrorData>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawResult::ErrorStatus {
|
|
data: var_data,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_invoice = <crate::bindings::LNInvoice>::sse_decode(deserializer);
|
|
return crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
invoice: var_invoice,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LocaleOverrides {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_locale = <String>::sse_decode(deserializer);
|
|
let mut var_spacing = <Option<u32>>::sse_decode(deserializer);
|
|
let mut var_symbol = <crate::bindings::Symbol>::sse_decode(deserializer);
|
|
return crate::bindings::LocaleOverrides {
|
|
locale: var_locale,
|
|
spacing: var_spacing,
|
|
symbol: var_symbol,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::LocalizedName {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_locale = <String>::sse_decode(deserializer);
|
|
let mut var_name = <String>::sse_decode(deserializer);
|
|
return crate::bindings::LocalizedName {
|
|
locale: var_locale,
|
|
name: var_name,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::LogEntry {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_line = <String>::sse_decode(deserializer);
|
|
let mut var_level = <String>::sse_decode(deserializer);
|
|
return crate::model::LogEntry {
|
|
line: var_line,
|
|
level: var_level,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::MessageSuccessActionData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_message = <String>::sse_decode(deserializer);
|
|
return crate::bindings::MessageSuccessActionData {
|
|
message: var_message,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::Network {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::bindings::Network::Bitcoin,
|
|
1 => crate::bindings::Network::Testnet,
|
|
2 => crate::bindings::Network::Signet,
|
|
3 => crate::bindings::Network::Regtest,
|
|
_ => unreachable!("Invalid variant for Network: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::OnchainPaymentLimitsResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_send = <crate::model::Limits>::sse_decode(deserializer);
|
|
let mut var_receive = <crate::model::Limits>::sse_decode(deserializer);
|
|
return crate::model::OnchainPaymentLimitsResponse {
|
|
send: var_send,
|
|
receive: var_receive,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<String>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<bool> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<bool>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<i64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<i64>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<crate::bindings::SuccessActionProcessed> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<crate::bindings::SuccessActionProcessed>::sse_decode(
|
|
deserializer,
|
|
));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<crate::bindings::Symbol> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<crate::bindings::Symbol>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<u32> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<u32>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<u64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<u64>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for Option<Vec<crate::model::PaymentType>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
if (<bool>::sse_decode(deserializer)) {
|
|
return Some(<Vec<crate::model::PaymentType>>::sse_decode(deserializer));
|
|
} else {
|
|
return None;
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PayOnchainAmount {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_amountSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PayOnchainAmount::Receiver {
|
|
amount_sat: var_amountSat,
|
|
};
|
|
}
|
|
1 => {
|
|
return crate::model::PayOnchainAmount::Drain;
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PayOnchainRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_address = <String>::sse_decode(deserializer);
|
|
let mut var_prepareResponse =
|
|
<crate::model::PreparePayOnchainResponse>::sse_decode(deserializer);
|
|
return crate::model::PayOnchainRequest {
|
|
address: var_address,
|
|
prepare_response: var_prepareResponse,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::Payment {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_destination = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_txId = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_timestamp = <u32>::sse_decode(deserializer);
|
|
let mut var_amountSat = <u64>::sse_decode(deserializer);
|
|
let mut var_feesSat = <u64>::sse_decode(deserializer);
|
|
let mut var_paymentType = <crate::model::PaymentType>::sse_decode(deserializer);
|
|
let mut var_status = <crate::model::PaymentState>::sse_decode(deserializer);
|
|
let mut var_details = <crate::model::PaymentDetails>::sse_decode(deserializer);
|
|
return crate::model::Payment {
|
|
destination: var_destination,
|
|
tx_id: var_txId,
|
|
timestamp: var_timestamp,
|
|
amount_sat: var_amountSat,
|
|
fees_sat: var_feesSat,
|
|
payment_type: var_paymentType,
|
|
status: var_status,
|
|
details: var_details,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PaymentDetails {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_swapId = <String>::sse_decode(deserializer);
|
|
let mut var_description = <String>::sse_decode(deserializer);
|
|
let mut var_preimage = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_bolt11 = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_refundTxId = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_refundTxAmountSat = <Option<u64>>::sse_decode(deserializer);
|
|
return crate::model::PaymentDetails::Lightning {
|
|
swap_id: var_swapId,
|
|
description: var_description,
|
|
preimage: var_preimage,
|
|
bolt11: var_bolt11,
|
|
refund_tx_id: var_refundTxId,
|
|
refund_tx_amount_sat: var_refundTxAmountSat,
|
|
};
|
|
}
|
|
1 => {
|
|
let mut var_destination = <String>::sse_decode(deserializer);
|
|
let mut var_description = <String>::sse_decode(deserializer);
|
|
return crate::model::PaymentDetails::Liquid {
|
|
destination: var_destination,
|
|
description: var_description,
|
|
};
|
|
}
|
|
2 => {
|
|
let mut var_swapId = <String>::sse_decode(deserializer);
|
|
let mut var_description = <String>::sse_decode(deserializer);
|
|
let mut var_refundTxId = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_refundTxAmountSat = <Option<u64>>::sse_decode(deserializer);
|
|
return crate::model::PaymentDetails::Bitcoin {
|
|
swap_id: var_swapId,
|
|
description: var_description,
|
|
refund_tx_id: var_refundTxId,
|
|
refund_tx_amount_sat: var_refundTxAmountSat,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::error::PaymentError {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
return crate::error::PaymentError::AlreadyClaimed;
|
|
}
|
|
1 => {
|
|
return crate::error::PaymentError::AlreadyPaid;
|
|
}
|
|
2 => {
|
|
return crate::error::PaymentError::PaymentInProgress;
|
|
}
|
|
3 => {
|
|
return crate::error::PaymentError::AmountOutOfRange;
|
|
}
|
|
4 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::AmountMissing { err: var_err };
|
|
}
|
|
5 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::InvalidNetwork { err: var_err };
|
|
}
|
|
6 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::Generic { err: var_err };
|
|
}
|
|
7 => {
|
|
return crate::error::PaymentError::InvalidOrExpiredFees;
|
|
}
|
|
8 => {
|
|
return crate::error::PaymentError::InsufficientFunds;
|
|
}
|
|
9 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::InvalidDescription { err: var_err };
|
|
}
|
|
10 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::InvalidInvoice { err: var_err };
|
|
}
|
|
11 => {
|
|
return crate::error::PaymentError::InvalidPreimage;
|
|
}
|
|
12 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::LwkError { err: var_err };
|
|
}
|
|
13 => {
|
|
return crate::error::PaymentError::PairsNotFound;
|
|
}
|
|
14 => {
|
|
return crate::error::PaymentError::PaymentTimeout;
|
|
}
|
|
15 => {
|
|
return crate::error::PaymentError::PersistError;
|
|
}
|
|
16 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::ReceiveError { err: var_err };
|
|
}
|
|
17 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
let mut var_refundTxId = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::Refunded {
|
|
err: var_err,
|
|
refund_tx_id: var_refundTxId,
|
|
};
|
|
}
|
|
18 => {
|
|
return crate::error::PaymentError::SelfTransferNotSupported;
|
|
}
|
|
19 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::SendError { err: var_err };
|
|
}
|
|
20 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::PaymentError::SignerError { err: var_err };
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PaymentMethod {
|
|
// 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 = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::model::PaymentMethod::Lightning,
|
|
1 => crate::model::PaymentMethod::BitcoinAddress,
|
|
2 => crate::model::PaymentMethod::LiquidAddress,
|
|
_ => unreachable!("Invalid variant for PaymentMethod: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PaymentState {
|
|
// 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 = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::model::PaymentState::Created,
|
|
1 => crate::model::PaymentState::Pending,
|
|
2 => crate::model::PaymentState::Complete,
|
|
3 => crate::model::PaymentState::Failed,
|
|
4 => crate::model::PaymentState::TimedOut,
|
|
5 => crate::model::PaymentState::Refundable,
|
|
6 => crate::model::PaymentState::RefundPending,
|
|
_ => unreachable!("Invalid variant for PaymentState: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PaymentType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut inner = <i32>::sse_decode(deserializer);
|
|
return match inner {
|
|
0 => crate::model::PaymentType::Receive,
|
|
1 => crate::model::PaymentType::Send,
|
|
_ => unreachable!("Invalid variant for PaymentType: {}", inner),
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareBuyBitcoinRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_provider = <crate::model::BuyBitcoinProvider>::sse_decode(deserializer);
|
|
let mut var_amountSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PrepareBuyBitcoinRequest {
|
|
provider: var_provider,
|
|
amount_sat: var_amountSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareBuyBitcoinResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_provider = <crate::model::BuyBitcoinProvider>::sse_decode(deserializer);
|
|
let mut var_amountSat = <u64>::sse_decode(deserializer);
|
|
let mut var_feesSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PrepareBuyBitcoinResponse {
|
|
provider: var_provider,
|
|
amount_sat: var_amountSat,
|
|
fees_sat: var_feesSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PreparePayOnchainRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_amount = <crate::model::PayOnchainAmount>::sse_decode(deserializer);
|
|
let mut var_feeRateSatPerVbyte = <Option<u32>>::sse_decode(deserializer);
|
|
return crate::model::PreparePayOnchainRequest {
|
|
amount: var_amount,
|
|
fee_rate_sat_per_vbyte: var_feeRateSatPerVbyte,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PreparePayOnchainResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_receiverAmountSat = <u64>::sse_decode(deserializer);
|
|
let mut var_claimFeesSat = <u64>::sse_decode(deserializer);
|
|
let mut var_totalFeesSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PreparePayOnchainResponse {
|
|
receiver_amount_sat: var_receiverAmountSat,
|
|
claim_fees_sat: var_claimFeesSat,
|
|
total_fees_sat: var_totalFeesSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareReceiveRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_payerAmountSat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_paymentMethod = <crate::model::PaymentMethod>::sse_decode(deserializer);
|
|
return crate::model::PrepareReceiveRequest {
|
|
payer_amount_sat: var_payerAmountSat,
|
|
payment_method: var_paymentMethod,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareReceiveResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_paymentMethod = <crate::model::PaymentMethod>::sse_decode(deserializer);
|
|
let mut var_payerAmountSat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_feesSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PrepareReceiveResponse {
|
|
payment_method: var_paymentMethod,
|
|
payer_amount_sat: var_payerAmountSat,
|
|
fees_sat: var_feesSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareRefundRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_swapAddress = <String>::sse_decode(deserializer);
|
|
let mut var_refundAddress = <String>::sse_decode(deserializer);
|
|
let mut var_feeRateSatPerVbyte = <u32>::sse_decode(deserializer);
|
|
return crate::model::PrepareRefundRequest {
|
|
swap_address: var_swapAddress,
|
|
refund_address: var_refundAddress,
|
|
fee_rate_sat_per_vbyte: var_feeRateSatPerVbyte,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareRefundResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_txVsize = <u32>::sse_decode(deserializer);
|
|
let mut var_txFeeSat = <u64>::sse_decode(deserializer);
|
|
let mut var_refundTxId = <Option<String>>::sse_decode(deserializer);
|
|
return crate::model::PrepareRefundResponse {
|
|
tx_vsize: var_txVsize,
|
|
tx_fee_sat: var_txFeeSat,
|
|
refund_tx_id: var_refundTxId,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareSendRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_destination = <String>::sse_decode(deserializer);
|
|
let mut var_amountSat = <Option<u64>>::sse_decode(deserializer);
|
|
return crate::model::PrepareSendRequest {
|
|
destination: var_destination,
|
|
amount_sat: var_amountSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::PrepareSendResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_destination = <crate::model::SendDestination>::sse_decode(deserializer);
|
|
let mut var_feesSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::PrepareSendResponse {
|
|
destination: var_destination,
|
|
fees_sat: var_feesSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::Rate {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_coin = <String>::sse_decode(deserializer);
|
|
let mut var_value = <f64>::sse_decode(deserializer);
|
|
return crate::bindings::Rate {
|
|
coin: var_coin,
|
|
value: var_value,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::ReceivePaymentRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_prepareResponse =
|
|
<crate::model::PrepareReceiveResponse>::sse_decode(deserializer);
|
|
let mut var_description = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_useDescriptionHash = <Option<bool>>::sse_decode(deserializer);
|
|
return crate::model::ReceivePaymentRequest {
|
|
prepare_response: var_prepareResponse,
|
|
description: var_description,
|
|
use_description_hash: var_useDescriptionHash,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::ReceivePaymentResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_destination = <String>::sse_decode(deserializer);
|
|
return crate::model::ReceivePaymentResponse {
|
|
destination: var_destination,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::RecommendedFees {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_fastestFee = <u64>::sse_decode(deserializer);
|
|
let mut var_halfHourFee = <u64>::sse_decode(deserializer);
|
|
let mut var_hourFee = <u64>::sse_decode(deserializer);
|
|
let mut var_economyFee = <u64>::sse_decode(deserializer);
|
|
let mut var_minimumFee = <u64>::sse_decode(deserializer);
|
|
return crate::model::RecommendedFees {
|
|
fastest_fee: var_fastestFee,
|
|
half_hour_fee: var_halfHourFee,
|
|
hour_fee: var_hourFee,
|
|
economy_fee: var_economyFee,
|
|
minimum_fee: var_minimumFee,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::RefundRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_swapAddress = <String>::sse_decode(deserializer);
|
|
let mut var_refundAddress = <String>::sse_decode(deserializer);
|
|
let mut var_feeRateSatPerVbyte = <u32>::sse_decode(deserializer);
|
|
return crate::model::RefundRequest {
|
|
swap_address: var_swapAddress,
|
|
refund_address: var_refundAddress,
|
|
fee_rate_sat_per_vbyte: var_feeRateSatPerVbyte,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::RefundResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_refundTxId = <String>::sse_decode(deserializer);
|
|
return crate::model::RefundResponse {
|
|
refund_tx_id: var_refundTxId,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::RefundableSwap {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_swapAddress = <String>::sse_decode(deserializer);
|
|
let mut var_timestamp = <u32>::sse_decode(deserializer);
|
|
let mut var_amountSat = <u64>::sse_decode(deserializer);
|
|
return crate::model::RefundableSwap {
|
|
swap_address: var_swapAddress,
|
|
timestamp: var_timestamp,
|
|
amount_sat: var_amountSat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::RestoreRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_backupPath = <Option<String>>::sse_decode(deserializer);
|
|
return crate::model::RestoreRequest {
|
|
backup_path: var_backupPath,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::RouteHint {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_hops = <Vec<crate::bindings::RouteHintHop>>::sse_decode(deserializer);
|
|
return crate::bindings::RouteHint { hops: var_hops };
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::RouteHintHop {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_srcNodeId = <String>::sse_decode(deserializer);
|
|
let mut var_shortChannelId = <String>::sse_decode(deserializer);
|
|
let mut var_feesBaseMsat = <u32>::sse_decode(deserializer);
|
|
let mut var_feesProportionalMillionths = <u32>::sse_decode(deserializer);
|
|
let mut var_cltvExpiryDelta = <u64>::sse_decode(deserializer);
|
|
let mut var_htlcMinimumMsat = <Option<u64>>::sse_decode(deserializer);
|
|
let mut var_htlcMaximumMsat = <Option<u64>>::sse_decode(deserializer);
|
|
return crate::bindings::RouteHintHop {
|
|
src_node_id: var_srcNodeId,
|
|
short_channel_id: var_shortChannelId,
|
|
fees_base_msat: var_feesBaseMsat,
|
|
fees_proportional_millionths: var_feesProportionalMillionths,
|
|
cltv_expiry_delta: var_cltvExpiryDelta,
|
|
htlc_minimum_msat: var_htlcMinimumMsat,
|
|
htlc_maximum_msat: var_htlcMaximumMsat,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::error::SdkError {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
return crate::error::SdkError::AlreadyStarted;
|
|
}
|
|
1 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::SdkError::Generic { err: var_err };
|
|
}
|
|
2 => {
|
|
return crate::error::SdkError::NotStarted;
|
|
}
|
|
3 => {
|
|
let mut var_err = <String>::sse_decode(deserializer);
|
|
return crate::error::SdkError::ServiceConnectivity { err: var_err };
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SdkEvent {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentFailed {
|
|
details: var_details,
|
|
};
|
|
}
|
|
1 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentPending {
|
|
details: var_details,
|
|
};
|
|
}
|
|
2 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentRefunded {
|
|
details: var_details,
|
|
};
|
|
}
|
|
3 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentRefundPending {
|
|
details: var_details,
|
|
};
|
|
}
|
|
4 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentSucceeded {
|
|
details: var_details,
|
|
};
|
|
}
|
|
5 => {
|
|
let mut var_details = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SdkEvent::PaymentWaitingConfirmation {
|
|
details: var_details,
|
|
};
|
|
}
|
|
6 => {
|
|
return crate::model::SdkEvent::Synced;
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SendDestination {
|
|
// 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_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_addressData =
|
|
<crate::bindings::LiquidAddressData>::sse_decode(deserializer);
|
|
return crate::model::SendDestination::LiquidAddress {
|
|
address_data: var_addressData,
|
|
};
|
|
}
|
|
1 => {
|
|
let mut var_invoice = <crate::bindings::LNInvoice>::sse_decode(deserializer);
|
|
return crate::model::SendDestination::Bolt11 {
|
|
invoice: var_invoice,
|
|
};
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SendPaymentRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_prepareResponse = <crate::model::PrepareSendResponse>::sse_decode(deserializer);
|
|
return crate::model::SendPaymentRequest {
|
|
prepare_response: var_prepareResponse,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SendPaymentResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_payment = <crate::model::Payment>::sse_decode(deserializer);
|
|
return crate::model::SendPaymentResponse {
|
|
payment: var_payment,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SignMessageRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_message = <String>::sse_decode(deserializer);
|
|
return crate::model::SignMessageRequest {
|
|
message: var_message,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::model::SignMessageResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_signature = <String>::sse_decode(deserializer);
|
|
return crate::model::SignMessageResponse {
|
|
signature: var_signature,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::SuccessActionProcessed {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut tag_ = <i32>::sse_decode(deserializer);
|
|
match tag_ {
|
|
0 => {
|
|
let mut var_result =
|
|
<crate::bindings::AesSuccessActionDataResult>::sse_decode(deserializer);
|
|
return crate::bindings::SuccessActionProcessed::Aes { result: var_result };
|
|
}
|
|
1 => {
|
|
let mut var_data =
|
|
<crate::bindings::MessageSuccessActionData>::sse_decode(deserializer);
|
|
return crate::bindings::SuccessActionProcessed::Message { data: var_data };
|
|
}
|
|
2 => {
|
|
let mut var_data =
|
|
<crate::bindings::UrlSuccessActionData>::sse_decode(deserializer);
|
|
return crate::bindings::SuccessActionProcessed::Url { data: var_data };
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::Symbol {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_grapheme = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_template = <Option<String>>::sse_decode(deserializer);
|
|
let mut var_rtl = <Option<bool>>::sse_decode(deserializer);
|
|
let mut var_position = <Option<u32>>::sse_decode(deserializer);
|
|
return crate::bindings::Symbol {
|
|
grapheme: var_grapheme,
|
|
template: var_template,
|
|
rtl: var_rtl,
|
|
position: var_position,
|
|
};
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u16 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u16::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u32::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u64::<NativeEndian>().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for u8 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
deserializer.cursor.read_u8().unwrap()
|
|
}
|
|
}
|
|
|
|
impl SseDecode for () {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {}
|
|
}
|
|
|
|
impl SseDecode for crate::bindings::UrlSuccessActionData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self {
|
|
let mut var_description = <String>::sse_decode(deserializer);
|
|
let mut var_url = <String>::sse_decode(deserializer);
|
|
let mut var_matchesCallbackDomain = <bool>::sse_decode(deserializer);
|
|
return crate::bindings::UrlSuccessActionData {
|
|
description: var_description,
|
|
url: var_url,
|
|
matches_callback_domain: var_matchesCallbackDomain,
|
|
};
|
|
}
|
|
}
|
|
|
|
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::<NativeEndian>().unwrap() as _
|
|
}
|
|
}
|
|
|
|
fn pde_ffi_dispatcher_primary_impl(
|
|
func_id: i32,
|
|
port: flutter_rust_bridge::for_generated::MessagePort,
|
|
ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
|
rust_vec_len: i32,
|
|
data_len: i32,
|
|
) {
|
|
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
|
match func_id {
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
|
|
fn pde_ffi_dispatcher_sync_impl(
|
|
func_id: i32,
|
|
ptr: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
|
|
rust_vec_len: i32,
|
|
data_len: i32,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {
|
|
// Codec=Pde (Serialization + dispatch), see doc to use other codecs
|
|
match func_id {
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
|
|
// Section: rust2dart
|
|
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<BindingLiquidSdk> {
|
|
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<BindingLiquidSdk> {}
|
|
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<BindingLiquidSdk>> for BindingLiquidSdk {
|
|
fn into_into_dart(self) -> FrbWrapper<BindingLiquidSdk> {
|
|
self.into()
|
|
}
|
|
}
|
|
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::AesSuccessActionDataDecrypted> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.description.into_into_dart().into_dart(),
|
|
self.0.plaintext.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::AesSuccessActionDataDecrypted>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::AesSuccessActionDataDecrypted>>
|
|
for crate::bindings::AesSuccessActionDataDecrypted
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::AesSuccessActionDataDecrypted> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::AesSuccessActionDataResult> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self.0 {
|
|
crate::bindings::AesSuccessActionDataResult::Decrypted { data } => {
|
|
[0.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::AesSuccessActionDataResult::ErrorStatus { reason } => {
|
|
[1.into_dart(), reason.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::AesSuccessActionDataResult>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::AesSuccessActionDataResult>>
|
|
for crate::bindings::AesSuccessActionDataResult
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::AesSuccessActionDataResult> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::BackupRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.backup_path.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::BackupRequest {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::BackupRequest>
|
|
for crate::model::BackupRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::BackupRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::BindingEventListener {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.stream.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::BindingEventListener
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::BindingEventListener>
|
|
for crate::bindings::BindingEventListener
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::BindingEventListener {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::BitcoinAddressData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.address.into_into_dart().into_dart(),
|
|
self.0.network.into_into_dart().into_dart(),
|
|
self.0.amount_sat.into_into_dart().into_dart(),
|
|
self.0.label.into_into_dart().into_dart(),
|
|
self.0.message.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::BitcoinAddressData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::BitcoinAddressData>>
|
|
for crate::bindings::BitcoinAddressData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::BitcoinAddressData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::BuyBitcoinProvider {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Moonpay => 0.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::BuyBitcoinProvider
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::BuyBitcoinProvider>
|
|
for crate::model::BuyBitcoinProvider
|
|
{
|
|
fn into_into_dart(self) -> crate::model::BuyBitcoinProvider {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::BuyBitcoinRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.prepare_response.into_into_dart().into_dart(),
|
|
self.redirect_url.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::BuyBitcoinRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::BuyBitcoinRequest>
|
|
for crate::model::BuyBitcoinRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::BuyBitcoinRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::CheckMessageRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.message.into_into_dart().into_dart(),
|
|
self.pubkey.into_into_dart().into_dart(),
|
|
self.signature.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::CheckMessageRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::CheckMessageRequest>
|
|
for crate::model::CheckMessageRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::CheckMessageRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::CheckMessageResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.is_valid.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::CheckMessageResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::CheckMessageResponse>
|
|
for crate::model::CheckMessageResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::CheckMessageResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::Config {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.liquid_electrum_url.into_into_dart().into_dart(),
|
|
self.bitcoin_electrum_url.into_into_dart().into_dart(),
|
|
self.mempoolspace_url.into_into_dart().into_dart(),
|
|
self.working_dir.into_into_dart().into_dart(),
|
|
self.network.into_into_dart().into_dart(),
|
|
self.payment_timeout_sec.into_into_dart().into_dart(),
|
|
self.zero_conf_min_fee_rate_msat
|
|
.into_into_dart()
|
|
.into_dart(),
|
|
self.zero_conf_max_amount_sat.into_into_dart().into_dart(),
|
|
self.breez_api_key.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::Config {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::Config> for crate::model::Config {
|
|
fn into_into_dart(self) -> crate::model::Config {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::ConnectRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.mnemonic.into_into_dart().into_dart(),
|
|
self.config.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::ConnectRequest {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::ConnectRequest>
|
|
for crate::model::ConnectRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::ConnectRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::CurrencyInfo> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.name.into_into_dart().into_dart(),
|
|
self.0.fraction_size.into_into_dart().into_dart(),
|
|
self.0.spacing.into_into_dart().into_dart(),
|
|
self.0.symbol.into_into_dart().into_dart(),
|
|
self.0.uniq_symbol.into_into_dart().into_dart(),
|
|
self.0.localized_name.into_into_dart().into_dart(),
|
|
self.0.locale_overrides.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::CurrencyInfo>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::CurrencyInfo>>
|
|
for crate::bindings::CurrencyInfo
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::CurrencyInfo> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::FiatCurrency> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.id.into_into_dart().into_dart(),
|
|
self.0.info.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::FiatCurrency>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::FiatCurrency>>
|
|
for crate::bindings::FiatCurrency
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::FiatCurrency> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::GetInfoResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.balance_sat.into_into_dart().into_dart(),
|
|
self.pending_send_sat.into_into_dart().into_dart(),
|
|
self.pending_receive_sat.into_into_dart().into_dart(),
|
|
self.pubkey.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::GetInfoResponse {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::GetInfoResponse>
|
|
for crate::model::GetInfoResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::GetInfoResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::InputType> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self.0 {
|
|
crate::bindings::InputType::BitcoinAddress { address } => {
|
|
[0.into_dart(), address.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::LiquidAddress { address } => {
|
|
[1.into_dart(), address.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::Bolt11 { invoice } => {
|
|
[2.into_dart(), invoice.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::NodeId { node_id } => {
|
|
[3.into_dart(), node_id.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::Url { url } => {
|
|
[4.into_dart(), url.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::LnUrlPay { data } => {
|
|
[5.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::LnUrlWithdraw { data } => {
|
|
[6.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::LnUrlAuth { data } => {
|
|
[7.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::InputType::LnUrlError { data } => {
|
|
[8.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::InputType>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::InputType>>
|
|
for crate::bindings::InputType
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::InputType> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::LightningPaymentLimitsResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.send.into_into_dart().into_dart(),
|
|
self.receive.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::LightningPaymentLimitsResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::LightningPaymentLimitsResponse>
|
|
for crate::model::LightningPaymentLimitsResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::LightningPaymentLimitsResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::Limits {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.min_sat.into_into_dart().into_dart(),
|
|
self.max_sat.into_into_dart().into_dart(),
|
|
self.max_zero_conf_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::Limits {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::Limits> for crate::model::Limits {
|
|
fn into_into_dart(self) -> crate::model::Limits {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LiquidAddressData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.address.into_into_dart().into_dart(),
|
|
self.0.network.into_into_dart().into_dart(),
|
|
self.0.asset_id.into_into_dart().into_dart(),
|
|
self.0.amount_sat.into_into_dart().into_dart(),
|
|
self.0.label.into_into_dart().into_dart(),
|
|
self.0.message.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LiquidAddressData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LiquidAddressData>>
|
|
for crate::bindings::LiquidAddressData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LiquidAddressData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::LiquidNetwork {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Mainnet => 0.into_dart(),
|
|
Self::Testnet => 1.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::LiquidNetwork {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::LiquidNetwork>
|
|
for crate::model::LiquidNetwork
|
|
{
|
|
fn into_into_dart(self) -> crate::model::LiquidNetwork {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::ListPaymentsRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.filters.into_into_dart().into_dart(),
|
|
self.from_timestamp.into_into_dart().into_dart(),
|
|
self.to_timestamp.into_into_dart().into_dart(),
|
|
self.offset.into_into_dart().into_dart(),
|
|
self.limit.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::ListPaymentsRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::ListPaymentsRequest>
|
|
for crate::model::ListPaymentsRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::ListPaymentsRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LNInvoice> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
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_into_dart().into_dart(),
|
|
self.0.description_hash.into_into_dart().into_dart(),
|
|
self.0.amount_msat.into_into_dart().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 flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LNInvoice>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LNInvoice>>
|
|
for crate::bindings::LNInvoice
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LNInvoice> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlAuthError {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlAuthError::Generic { err } => {
|
|
[0.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlAuthError::InvalidUri { err } => {
|
|
[1.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlAuthError::ServiceConnectivity { err } => {
|
|
[2.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlAuthError
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlAuthError>
|
|
for crate::bindings::duplicates::LnUrlAuthError
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlAuthError {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlAuthRequestData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.k1.into_into_dart().into_dart(),
|
|
self.0.action.into_into_dart().into_dart(),
|
|
self.0.domain.into_into_dart().into_dart(),
|
|
self.0.url.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlAuthRequestData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlAuthRequestData>>
|
|
for crate::bindings::LnUrlAuthRequestData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlAuthRequestData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlCallbackStatus {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlCallbackStatus::Ok => [0.into_dart()].into_dart(),
|
|
crate::bindings::duplicates::LnUrlCallbackStatus::ErrorStatus { data } => {
|
|
[1.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlCallbackStatus
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlCallbackStatus>
|
|
for crate::bindings::duplicates::LnUrlCallbackStatus
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlCallbackStatus {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlErrorData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.0.reason.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlErrorData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlErrorData>>
|
|
for crate::bindings::LnUrlErrorData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlErrorData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlPayError {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlPayError::AlreadyPaid => [0.into_dart()].into_dart(),
|
|
crate::bindings::duplicates::LnUrlPayError::Generic { err } => {
|
|
[1.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidAmount { err } => {
|
|
[2.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidInvoice { err } => {
|
|
[3.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidNetwork { err } => {
|
|
[4.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidUri { err } => {
|
|
[5.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvoiceExpired { err } => {
|
|
[6.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentFailed { err } => {
|
|
[7.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentTimeout { err } => {
|
|
[8.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::RouteNotFound { err } => {
|
|
[9.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::RouteTooExpensive { err } => {
|
|
[10.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::ServiceConnectivity { err } => {
|
|
[11.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlPayError
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlPayError>
|
|
for crate::bindings::duplicates::LnUrlPayError
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlPayError {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlPayErrorData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.payment_hash.into_into_dart().into_dart(),
|
|
self.0.reason.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlPayErrorData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlPayErrorData>>
|
|
for crate::bindings::LnUrlPayErrorData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlPayErrorData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlPayRequest> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.data.into_into_dart().into_dart(),
|
|
self.0.amount_msat.into_into_dart().into_dart(),
|
|
self.0.comment.into_into_dart().into_dart(),
|
|
self.0.payment_label.into_into_dart().into_dart(),
|
|
self.0
|
|
.validate_success_action_url
|
|
.into_into_dart()
|
|
.into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlPayRequest>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlPayRequest>>
|
|
for crate::bindings::LnUrlPayRequest
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlPayRequest> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlPayRequestData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
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_into_dart().into_dart(),
|
|
self.0.ln_address.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlPayRequestData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlPayRequestData>>
|
|
for crate::bindings::LnUrlPayRequestData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlPayRequestData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::LnUrlPayResult {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::model::LnUrlPayResult::EndpointSuccess { data } => {
|
|
[0.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::LnUrlPayResult::EndpointError { data } => {
|
|
[1.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::LnUrlPayResult::PayError { data } => {
|
|
[2.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::LnUrlPayResult {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::LnUrlPayResult>
|
|
for crate::model::LnUrlPayResult
|
|
{
|
|
fn into_into_dart(self) -> crate::model::LnUrlPayResult {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::LnUrlPaySuccessData {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.payment.into_into_dart().into_dart(),
|
|
self.success_action.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::LnUrlPaySuccessData
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::LnUrlPaySuccessData>
|
|
for crate::model::LnUrlPaySuccessData
|
|
{
|
|
fn into_into_dart(self) -> crate::model::LnUrlPaySuccessData {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlWithdrawError {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlWithdrawError::Generic { err } => {
|
|
[0.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidAmount { err } => {
|
|
[1.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidInvoice { err } => {
|
|
[2.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidUri { err } => {
|
|
[3.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvoiceNoRoutingHints { err } => {
|
|
[4.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::ServiceConnectivity { err } => {
|
|
[5.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlWithdrawError
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlWithdrawError>
|
|
for crate::bindings::duplicates::LnUrlWithdrawError
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlWithdrawError {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlWithdrawRequest> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.data.into_into_dart().into_dart(),
|
|
self.0.amount_msat.into_into_dart().into_dart(),
|
|
self.0.description.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlWithdrawRequest>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlWithdrawRequest>>
|
|
for crate::bindings::LnUrlWithdrawRequest
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlWithdrawRequest> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LnUrlWithdrawRequestData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
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 flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LnUrlWithdrawRequestData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LnUrlWithdrawRequestData>>
|
|
for crate::bindings::LnUrlWithdrawRequestData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LnUrlWithdrawRequestData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlWithdrawResult {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Ok { data } => {
|
|
[0.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Timeout { data } => {
|
|
[1.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::ErrorStatus { data } => {
|
|
[2.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlWithdrawResult
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlWithdrawResult>
|
|
for crate::bindings::duplicates::LnUrlWithdrawResult
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlWithdrawResult {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.invoice.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::bindings::duplicates::LnUrlWithdrawSuccessData
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::bindings::duplicates::LnUrlWithdrawSuccessData>
|
|
for crate::bindings::duplicates::LnUrlWithdrawSuccessData
|
|
{
|
|
fn into_into_dart(self) -> crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LocaleOverrides> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.locale.into_into_dart().into_dart(),
|
|
self.0.spacing.into_into_dart().into_dart(),
|
|
self.0.symbol.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LocaleOverrides>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LocaleOverrides>>
|
|
for crate::bindings::LocaleOverrides
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LocaleOverrides> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::LocalizedName> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.locale.into_into_dart().into_dart(),
|
|
self.0.name.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::LocalizedName>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::LocalizedName>>
|
|
for crate::bindings::LocalizedName
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::LocalizedName> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::LogEntry {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.line.into_into_dart().into_dart(),
|
|
self.level.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::LogEntry {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::LogEntry> for crate::model::LogEntry {
|
|
fn into_into_dart(self) -> crate::model::LogEntry {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::MessageSuccessActionData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.0.message.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::MessageSuccessActionData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::MessageSuccessActionData>>
|
|
for crate::bindings::MessageSuccessActionData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::MessageSuccessActionData> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::Network> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self.0 {
|
|
crate::bindings::Network::Bitcoin => 0.into_dart(),
|
|
crate::bindings::Network::Testnet => 1.into_dart(),
|
|
crate::bindings::Network::Signet => 2.into_dart(),
|
|
crate::bindings::Network::Regtest => 3.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::Network>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::Network>>
|
|
for crate::bindings::Network
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::Network> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::OnchainPaymentLimitsResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.send.into_into_dart().into_dart(),
|
|
self.receive.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::OnchainPaymentLimitsResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::OnchainPaymentLimitsResponse>
|
|
for crate::model::OnchainPaymentLimitsResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::OnchainPaymentLimitsResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PayOnchainAmount {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::model::PayOnchainAmount::Receiver { amount_sat } => {
|
|
[0.into_dart(), amount_sat.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::PayOnchainAmount::Drain => [1.into_dart()].into_dart(),
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PayOnchainAmount
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PayOnchainAmount>
|
|
for crate::model::PayOnchainAmount
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PayOnchainAmount {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PayOnchainRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.address.into_into_dart().into_dart(),
|
|
self.prepare_response.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PayOnchainRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PayOnchainRequest>
|
|
for crate::model::PayOnchainRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PayOnchainRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::Payment {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.destination.into_into_dart().into_dart(),
|
|
self.tx_id.into_into_dart().into_dart(),
|
|
self.timestamp.into_into_dart().into_dart(),
|
|
self.amount_sat.into_into_dart().into_dart(),
|
|
self.fees_sat.into_into_dart().into_dart(),
|
|
self.payment_type.into_into_dart().into_dart(),
|
|
self.status.into_into_dart().into_dart(),
|
|
self.details.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::Payment {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::Payment> for crate::model::Payment {
|
|
fn into_into_dart(self) -> crate::model::Payment {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PaymentDetails {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::model::PaymentDetails::Lightning {
|
|
swap_id,
|
|
description,
|
|
preimage,
|
|
bolt11,
|
|
refund_tx_id,
|
|
refund_tx_amount_sat,
|
|
} => [
|
|
0.into_dart(),
|
|
swap_id.into_into_dart().into_dart(),
|
|
description.into_into_dart().into_dart(),
|
|
preimage.into_into_dart().into_dart(),
|
|
bolt11.into_into_dart().into_dart(),
|
|
refund_tx_id.into_into_dart().into_dart(),
|
|
refund_tx_amount_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart(),
|
|
crate::model::PaymentDetails::Liquid {
|
|
destination,
|
|
description,
|
|
} => [
|
|
1.into_dart(),
|
|
destination.into_into_dart().into_dart(),
|
|
description.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart(),
|
|
crate::model::PaymentDetails::Bitcoin {
|
|
swap_id,
|
|
description,
|
|
refund_tx_id,
|
|
refund_tx_amount_sat,
|
|
} => [
|
|
2.into_dart(),
|
|
swap_id.into_into_dart().into_dart(),
|
|
description.into_into_dart().into_dart(),
|
|
refund_tx_id.into_into_dart().into_dart(),
|
|
refund_tx_amount_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart(),
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::PaymentDetails {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PaymentDetails>
|
|
for crate::model::PaymentDetails
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PaymentDetails {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::error::PaymentError {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::error::PaymentError::AlreadyClaimed => [0.into_dart()].into_dart(),
|
|
crate::error::PaymentError::AlreadyPaid => [1.into_dart()].into_dart(),
|
|
crate::error::PaymentError::PaymentInProgress => [2.into_dart()].into_dart(),
|
|
crate::error::PaymentError::AmountOutOfRange => [3.into_dart()].into_dart(),
|
|
crate::error::PaymentError::AmountMissing { err } => {
|
|
[4.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::InvalidNetwork { err } => {
|
|
[5.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::Generic { err } => {
|
|
[6.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::InvalidOrExpiredFees => [7.into_dart()].into_dart(),
|
|
crate::error::PaymentError::InsufficientFunds => [8.into_dart()].into_dart(),
|
|
crate::error::PaymentError::InvalidDescription { err } => {
|
|
[9.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::InvalidInvoice { err } => {
|
|
[10.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::InvalidPreimage => [11.into_dart()].into_dart(),
|
|
crate::error::PaymentError::LwkError { err } => {
|
|
[12.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::PairsNotFound => [13.into_dart()].into_dart(),
|
|
crate::error::PaymentError::PaymentTimeout => [14.into_dart()].into_dart(),
|
|
crate::error::PaymentError::PersistError => [15.into_dart()].into_dart(),
|
|
crate::error::PaymentError::ReceiveError { err } => {
|
|
[16.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::Refunded { err, refund_tx_id } => [
|
|
17.into_dart(),
|
|
err.into_into_dart().into_dart(),
|
|
refund_tx_id.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart(),
|
|
crate::error::PaymentError::SelfTransferNotSupported => [18.into_dart()].into_dart(),
|
|
crate::error::PaymentError::SendError { err } => {
|
|
[19.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::PaymentError::SignerError { err } => {
|
|
[20.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::error::PaymentError {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::error::PaymentError> for crate::error::PaymentError {
|
|
fn into_into_dart(self) -> crate::error::PaymentError {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PaymentMethod {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Lightning => 0.into_dart(),
|
|
Self::BitcoinAddress => 1.into_dart(),
|
|
Self::LiquidAddress => 2.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::PaymentMethod {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PaymentMethod>
|
|
for crate::model::PaymentMethod
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PaymentMethod {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PaymentState {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Created => 0.into_dart(),
|
|
Self::Pending => 1.into_dart(),
|
|
Self::Complete => 2.into_dart(),
|
|
Self::Failed => 3.into_dart(),
|
|
Self::TimedOut => 4.into_dart(),
|
|
Self::Refundable => 5.into_dart(),
|
|
Self::RefundPending => 6.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::PaymentState {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PaymentState> for crate::model::PaymentState {
|
|
fn into_into_dart(self) -> crate::model::PaymentState {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PaymentType {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
Self::Receive => 0.into_dart(),
|
|
Self::Send => 1.into_dart(),
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::PaymentType {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PaymentType> for crate::model::PaymentType {
|
|
fn into_into_dart(self) -> crate::model::PaymentType {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareBuyBitcoinRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.provider.into_into_dart().into_dart(),
|
|
self.amount_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareBuyBitcoinRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareBuyBitcoinRequest>
|
|
for crate::model::PrepareBuyBitcoinRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareBuyBitcoinRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareBuyBitcoinResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.provider.into_into_dart().into_dart(),
|
|
self.amount_sat.into_into_dart().into_dart(),
|
|
self.fees_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareBuyBitcoinResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareBuyBitcoinResponse>
|
|
for crate::model::PrepareBuyBitcoinResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareBuyBitcoinResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PreparePayOnchainRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.amount.into_into_dart().into_dart(),
|
|
self.fee_rate_sat_per_vbyte.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PreparePayOnchainRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PreparePayOnchainRequest>
|
|
for crate::model::PreparePayOnchainRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PreparePayOnchainRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PreparePayOnchainResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.receiver_amount_sat.into_into_dart().into_dart(),
|
|
self.claim_fees_sat.into_into_dart().into_dart(),
|
|
self.total_fees_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PreparePayOnchainResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PreparePayOnchainResponse>
|
|
for crate::model::PreparePayOnchainResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PreparePayOnchainResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareReceiveRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.payer_amount_sat.into_into_dart().into_dart(),
|
|
self.payment_method.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareReceiveRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareReceiveRequest>
|
|
for crate::model::PrepareReceiveRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareReceiveRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareReceiveResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.payment_method.into_into_dart().into_dart(),
|
|
self.payer_amount_sat.into_into_dart().into_dart(),
|
|
self.fees_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareReceiveResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareReceiveResponse>
|
|
for crate::model::PrepareReceiveResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareReceiveResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareRefundRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.swap_address.into_into_dart().into_dart(),
|
|
self.refund_address.into_into_dart().into_dart(),
|
|
self.fee_rate_sat_per_vbyte.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareRefundRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareRefundRequest>
|
|
for crate::model::PrepareRefundRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareRefundRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareRefundResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.tx_vsize.into_into_dart().into_dart(),
|
|
self.tx_fee_sat.into_into_dart().into_dart(),
|
|
self.refund_tx_id.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareRefundResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareRefundResponse>
|
|
for crate::model::PrepareRefundResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareRefundResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareSendRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.destination.into_into_dart().into_dart(),
|
|
self.amount_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareSendRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareSendRequest>
|
|
for crate::model::PrepareSendRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareSendRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::PrepareSendResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.destination.into_into_dart().into_dart(),
|
|
self.fees_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::PrepareSendResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::PrepareSendResponse>
|
|
for crate::model::PrepareSendResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::PrepareSendResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::Rate> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.coin.into_into_dart().into_dart(),
|
|
self.0.value.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::Rate>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::Rate>>
|
|
for crate::bindings::Rate
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::Rate> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::ReceivePaymentRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.prepare_response.into_into_dart().into_dart(),
|
|
self.description.into_into_dart().into_dart(),
|
|
self.use_description_hash.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::ReceivePaymentRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::ReceivePaymentRequest>
|
|
for crate::model::ReceivePaymentRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::ReceivePaymentRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::ReceivePaymentResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.destination.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::ReceivePaymentResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::ReceivePaymentResponse>
|
|
for crate::model::ReceivePaymentResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::ReceivePaymentResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::RecommendedFees {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.fastest_fee.into_into_dart().into_dart(),
|
|
self.half_hour_fee.into_into_dart().into_dart(),
|
|
self.hour_fee.into_into_dart().into_dart(),
|
|
self.economy_fee.into_into_dart().into_dart(),
|
|
self.minimum_fee.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::RecommendedFees {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::RecommendedFees>
|
|
for crate::model::RecommendedFees
|
|
{
|
|
fn into_into_dart(self) -> crate::model::RecommendedFees {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::RefundRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.swap_address.into_into_dart().into_dart(),
|
|
self.refund_address.into_into_dart().into_dart(),
|
|
self.fee_rate_sat_per_vbyte.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::RefundRequest {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::RefundRequest>
|
|
for crate::model::RefundRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::RefundRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::RefundResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.refund_tx_id.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::RefundResponse {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::RefundResponse>
|
|
for crate::model::RefundResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::RefundResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::RefundableSwap {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.swap_address.into_into_dart().into_dart(),
|
|
self.timestamp.into_into_dart().into_dart(),
|
|
self.amount_sat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::RefundableSwap {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::RefundableSwap>
|
|
for crate::model::RefundableSwap
|
|
{
|
|
fn into_into_dart(self) -> crate::model::RefundableSwap {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::RestoreRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.backup_path.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::RestoreRequest {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::RestoreRequest>
|
|
for crate::model::RestoreRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::RestoreRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::RouteHint> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.0.hops.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::RouteHint>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::RouteHint>>
|
|
for crate::bindings::RouteHint
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::RouteHint> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::RouteHintHop> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
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_into_dart().into_dart(),
|
|
self.0.htlc_maximum_msat.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::RouteHintHop>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::RouteHintHop>>
|
|
for crate::bindings::RouteHintHop
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::RouteHintHop> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::error::SdkError {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::error::SdkError::AlreadyStarted => [0.into_dart()].into_dart(),
|
|
crate::error::SdkError::Generic { err } => {
|
|
[1.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::error::SdkError::NotStarted => [2.into_dart()].into_dart(),
|
|
crate::error::SdkError::ServiceConnectivity { err } => {
|
|
[3.into_dart(), err.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::error::SdkError {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::error::SdkError> for crate::error::SdkError {
|
|
fn into_into_dart(self) -> crate::error::SdkError {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SdkEvent {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::model::SdkEvent::PaymentFailed { details } => {
|
|
[0.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::PaymentPending { details } => {
|
|
[1.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::PaymentRefunded { details } => {
|
|
[2.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::PaymentRefundPending { details } => {
|
|
[3.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::PaymentSucceeded { details } => {
|
|
[4.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::PaymentWaitingConfirmation { details } => {
|
|
[5.into_dart(), details.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SdkEvent::Synced => [6.into_dart()].into_dart(),
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::SdkEvent {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SdkEvent> for crate::model::SdkEvent {
|
|
fn into_into_dart(self) -> crate::model::SdkEvent {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SendDestination {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self {
|
|
crate::model::SendDestination::LiquidAddress { address_data } => {
|
|
[0.into_dart(), address_data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::model::SendDestination::Bolt11 { invoice } => {
|
|
[1.into_dart(), invoice.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive for crate::model::SendDestination {}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SendDestination>
|
|
for crate::model::SendDestination
|
|
{
|
|
fn into_into_dart(self) -> crate::model::SendDestination {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SendPaymentRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.prepare_response.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::SendPaymentRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SendPaymentRequest>
|
|
for crate::model::SendPaymentRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::SendPaymentRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SendPaymentResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.payment.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::SendPaymentResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SendPaymentResponse>
|
|
for crate::model::SendPaymentResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::SendPaymentResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SignMessageRequest {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.message.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::SignMessageRequest
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SignMessageRequest>
|
|
for crate::model::SignMessageRequest
|
|
{
|
|
fn into_into_dart(self) -> crate::model::SignMessageRequest {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for crate::model::SignMessageResponse {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[self.signature.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for crate::model::SignMessageResponse
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<crate::model::SignMessageResponse>
|
|
for crate::model::SignMessageResponse
|
|
{
|
|
fn into_into_dart(self) -> crate::model::SignMessageResponse {
|
|
self
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::SuccessActionProcessed> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
match self.0 {
|
|
crate::bindings::SuccessActionProcessed::Aes { result } => {
|
|
[0.into_dart(), result.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Message { data } => {
|
|
[1.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Url { data } => {
|
|
[2.into_dart(), data.into_into_dart().into_dart()].into_dart()
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::SuccessActionProcessed>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::SuccessActionProcessed>>
|
|
for crate::bindings::SuccessActionProcessed
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::SuccessActionProcessed> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::Symbol> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.grapheme.into_into_dart().into_dart(),
|
|
self.0.template.into_into_dart().into_dart(),
|
|
self.0.rtl.into_into_dart().into_dart(),
|
|
self.0.position.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::Symbol>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::Symbol>>
|
|
for crate::bindings::Symbol
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::Symbol> {
|
|
self.into()
|
|
}
|
|
}
|
|
// Codec=Dco (DartCObject based), see doc to use other codecs
|
|
impl flutter_rust_bridge::IntoDart for FrbWrapper<crate::bindings::UrlSuccessActionData> {
|
|
fn into_dart(self) -> flutter_rust_bridge::for_generated::DartAbi {
|
|
[
|
|
self.0.description.into_into_dart().into_dart(),
|
|
self.0.url.into_into_dart().into_dart(),
|
|
self.0.matches_callback_domain.into_into_dart().into_dart(),
|
|
]
|
|
.into_dart()
|
|
}
|
|
}
|
|
impl flutter_rust_bridge::for_generated::IntoDartExceptPrimitive
|
|
for FrbWrapper<crate::bindings::UrlSuccessActionData>
|
|
{
|
|
}
|
|
impl flutter_rust_bridge::IntoIntoDart<FrbWrapper<crate::bindings::UrlSuccessActionData>>
|
|
for crate::bindings::UrlSuccessActionData
|
|
{
|
|
fn into_into_dart(self) -> FrbWrapper<crate::bindings::UrlSuccessActionData> {
|
|
self.into()
|
|
}
|
|
}
|
|
|
|
impl SseEncode for flutter_rust_bridge::for_generated::anyhow::Error {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(format!("{:?}", self), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for BindingLiquidSdk {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>>::sse_encode(flutter_rust_bridge::for_generated::rust_auto_opaque_encode::<_, StdArc<_>>(self), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode
|
|
for RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>
|
|
{
|
|
// 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();
|
|
<usize>::sse_encode(ptr, serializer);
|
|
<i32>::sse_encode(size, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode
|
|
for StreamSink<crate::model::LogEntry, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
unimplemented!("")
|
|
}
|
|
}
|
|
|
|
impl SseEncode
|
|
for StreamSink<crate::model::SdkEvent, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
unimplemented!("")
|
|
}
|
|
}
|
|
|
|
impl SseEncode for String {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Vec<u8>>::sse_encode(self.into_bytes(), serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::AesSuccessActionDataDecrypted {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.description, serializer);
|
|
<String>::sse_encode(self.plaintext, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::AesSuccessActionDataResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::bindings::AesSuccessActionDataResult::Decrypted { data } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::bindings::AesSuccessActionDataDecrypted>::sse_encode(data, serializer);
|
|
}
|
|
crate::bindings::AesSuccessActionDataResult::ErrorStatus { reason } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(reason, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::BackupRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<String>>::sse_encode(self.backup_path, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::BindingEventListener {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<StreamSink<crate::model::SdkEvent,flutter_rust_bridge::for_generated::DcoCodec>>::sse_encode(self.stream, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::BitcoinAddressData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.address, serializer);
|
|
<crate::bindings::Network>::sse_encode(self.network, serializer);
|
|
<Option<u64>>::sse_encode(self.amount_sat, serializer);
|
|
<Option<String>>::sse_encode(self.label, serializer);
|
|
<Option<String>>::sse_encode(self.message, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for bool {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u8(self as _).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::BuyBitcoinProvider {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::model::BuyBitcoinProvider::Moonpay => 0,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::BuyBitcoinRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::PrepareBuyBitcoinResponse>::sse_encode(self.prepare_response, serializer);
|
|
<Option<String>>::sse_encode(self.redirect_url, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::CheckMessageRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.message, serializer);
|
|
<String>::sse_encode(self.pubkey, serializer);
|
|
<String>::sse_encode(self.signature, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::CheckMessageResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_valid, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::Config {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.liquid_electrum_url, serializer);
|
|
<String>::sse_encode(self.bitcoin_electrum_url, serializer);
|
|
<String>::sse_encode(self.mempoolspace_url, serializer);
|
|
<String>::sse_encode(self.working_dir, serializer);
|
|
<crate::model::LiquidNetwork>::sse_encode(self.network, serializer);
|
|
<u64>::sse_encode(self.payment_timeout_sec, serializer);
|
|
<u32>::sse_encode(self.zero_conf_min_fee_rate_msat, serializer);
|
|
<Option<u64>>::sse_encode(self.zero_conf_max_amount_sat, serializer);
|
|
<Option<String>>::sse_encode(self.breez_api_key, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::ConnectRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.mnemonic, serializer);
|
|
<crate::model::Config>::sse_encode(self.config, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::CurrencyInfo {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.name, serializer);
|
|
<u32>::sse_encode(self.fraction_size, serializer);
|
|
<Option<u32>>::sse_encode(self.spacing, serializer);
|
|
<Option<crate::bindings::Symbol>>::sse_encode(self.symbol, serializer);
|
|
<Option<crate::bindings::Symbol>>::sse_encode(self.uniq_symbol, serializer);
|
|
<Vec<crate::bindings::LocalizedName>>::sse_encode(self.localized_name, serializer);
|
|
<Vec<crate::bindings::LocaleOverrides>>::sse_encode(self.locale_overrides, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for f64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_f64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::FiatCurrency {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.id, serializer);
|
|
<crate::bindings::CurrencyInfo>::sse_encode(self.info, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::GetInfoResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u64>::sse_encode(self.balance_sat, serializer);
|
|
<u64>::sse_encode(self.pending_send_sat, serializer);
|
|
<u64>::sse_encode(self.pending_receive_sat, serializer);
|
|
<String>::sse_encode(self.pubkey, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for i32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_i32::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for i64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_i64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::InputType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::bindings::InputType::BitcoinAddress { address } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::bindings::BitcoinAddressData>::sse_encode(address, serializer);
|
|
}
|
|
crate::bindings::InputType::LiquidAddress { address } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::LiquidAddressData>::sse_encode(address, serializer);
|
|
}
|
|
crate::bindings::InputType::Bolt11 { invoice } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<crate::bindings::LNInvoice>::sse_encode(invoice, serializer);
|
|
}
|
|
crate::bindings::InputType::NodeId { node_id } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<String>::sse_encode(node_id, serializer);
|
|
}
|
|
crate::bindings::InputType::Url { url } => {
|
|
<i32>::sse_encode(4, serializer);
|
|
<String>::sse_encode(url, serializer);
|
|
}
|
|
crate::bindings::InputType::LnUrlPay { data } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<crate::bindings::LnUrlPayRequestData>::sse_encode(data, serializer);
|
|
}
|
|
crate::bindings::InputType::LnUrlWithdraw { data } => {
|
|
<i32>::sse_encode(6, serializer);
|
|
<crate::bindings::LnUrlWithdrawRequestData>::sse_encode(data, serializer);
|
|
}
|
|
crate::bindings::InputType::LnUrlAuth { data } => {
|
|
<i32>::sse_encode(7, serializer);
|
|
<crate::bindings::LnUrlAuthRequestData>::sse_encode(data, serializer);
|
|
}
|
|
crate::bindings::InputType::LnUrlError { data } => {
|
|
<i32>::sse_encode(8, serializer);
|
|
<crate::bindings::LnUrlErrorData>::sse_encode(data, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::LightningPaymentLimitsResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::Limits>::sse_encode(self.send, serializer);
|
|
<crate::model::Limits>::sse_encode(self.receive, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::Limits {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u64>::sse_encode(self.min_sat, serializer);
|
|
<u64>::sse_encode(self.max_sat, serializer);
|
|
<u64>::sse_encode(self.max_zero_conf_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LiquidAddressData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.address, serializer);
|
|
<crate::bindings::Network>::sse_encode(self.network, serializer);
|
|
<Option<String>>::sse_encode(self.asset_id, serializer);
|
|
<Option<u64>>::sse_encode(self.amount_sat, serializer);
|
|
<Option<String>>::sse_encode(self.label, serializer);
|
|
<Option<String>>::sse_encode(self.message, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::LiquidNetwork {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::model::LiquidNetwork::Mainnet => 0,
|
|
crate::model::LiquidNetwork::Testnet => 1,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::FiatCurrency> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::FiatCurrency>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::LocaleOverrides> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::LocaleOverrides>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::LocalizedName> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::LocalizedName>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::model::Payment> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::model::Payment>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::model::PaymentType> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::model::PaymentType>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::ListPaymentsRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<Vec<crate::model::PaymentType>>>::sse_encode(self.filters, serializer);
|
|
<Option<i64>>::sse_encode(self.from_timestamp, serializer);
|
|
<Option<i64>>::sse_encode(self.to_timestamp, serializer);
|
|
<Option<u32>>::sse_encode(self.offset, serializer);
|
|
<Option<u32>>::sse_encode(self.limit, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<u8> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<u8>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::Rate> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::Rate>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::model::RefundableSwap> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::model::RefundableSwap>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::RouteHint> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::RouteHint>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Vec<crate::bindings::RouteHintHop> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(self.len() as _, serializer);
|
|
for item in self {
|
|
<crate::bindings::RouteHintHop>::sse_encode(item, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LNInvoice {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.bolt11, serializer);
|
|
<crate::bindings::Network>::sse_encode(self.network, serializer);
|
|
<String>::sse_encode(self.payee_pubkey, serializer);
|
|
<String>::sse_encode(self.payment_hash, serializer);
|
|
<Option<String>>::sse_encode(self.description, serializer);
|
|
<Option<String>>::sse_encode(self.description_hash, serializer);
|
|
<Option<u64>>::sse_encode(self.amount_msat, serializer);
|
|
<u64>::sse_encode(self.timestamp, serializer);
|
|
<u64>::sse_encode(self.expiry, serializer);
|
|
<Vec<crate::bindings::RouteHint>>::sse_encode(self.routing_hints, serializer);
|
|
<Vec<u8>>::sse_encode(self.payment_secret, serializer);
|
|
<u64>::sse_encode(self.min_final_cltv_expiry_delta, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlAuthError {
|
|
// 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::bindings::duplicates::LnUrlAuthError::Generic { err } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlAuthError::InvalidUri { err } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlAuthError::ServiceConnectivity { err } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlAuthRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.k1, serializer);
|
|
<Option<String>>::sse_encode(self.action, serializer);
|
|
<String>::sse_encode(self.domain, serializer);
|
|
<String>::sse_encode(self.url, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlCallbackStatus {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlCallbackStatus::Ok => {
|
|
<i32>::sse_encode(0, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlCallbackStatus::ErrorStatus { data } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::LnUrlErrorData>::sse_encode(data, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlErrorData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.reason, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlPayError {
|
|
// 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::bindings::duplicates::LnUrlPayError::AlreadyPaid => {
|
|
<i32>::sse_encode(0, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::Generic { err } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidAmount { err } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidInvoice { err } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidNetwork { err } => {
|
|
<i32>::sse_encode(4, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidUri { err } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::InvoiceExpired { err } => {
|
|
<i32>::sse_encode(6, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentFailed { err } => {
|
|
<i32>::sse_encode(7, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentTimeout { err } => {
|
|
<i32>::sse_encode(8, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::RouteNotFound { err } => {
|
|
<i32>::sse_encode(9, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::RouteTooExpensive { err } => {
|
|
<i32>::sse_encode(10, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlPayError::ServiceConnectivity { err } => {
|
|
<i32>::sse_encode(11, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlPayErrorData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.payment_hash, serializer);
|
|
<String>::sse_encode(self.reason, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlPayRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::bindings::LnUrlPayRequestData>::sse_encode(self.data, serializer);
|
|
<u64>::sse_encode(self.amount_msat, serializer);
|
|
<Option<String>>::sse_encode(self.comment, serializer);
|
|
<Option<String>>::sse_encode(self.payment_label, serializer);
|
|
<Option<bool>>::sse_encode(self.validate_success_action_url, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlPayRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.callback, serializer);
|
|
<u64>::sse_encode(self.min_sendable, serializer);
|
|
<u64>::sse_encode(self.max_sendable, serializer);
|
|
<String>::sse_encode(self.metadata_str, serializer);
|
|
<u16>::sse_encode(self.comment_allowed, serializer);
|
|
<String>::sse_encode(self.domain, serializer);
|
|
<bool>::sse_encode(self.allows_nostr, serializer);
|
|
<Option<String>>::sse_encode(self.nostr_pubkey, serializer);
|
|
<Option<String>>::sse_encode(self.ln_address, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::LnUrlPayResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::model::LnUrlPayResult::EndpointSuccess { data } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::model::LnUrlPaySuccessData>::sse_encode(data, serializer);
|
|
}
|
|
crate::model::LnUrlPayResult::EndpointError { data } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::LnUrlErrorData>::sse_encode(data, serializer);
|
|
}
|
|
crate::model::LnUrlPayResult::PayError { data } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<crate::bindings::LnUrlPayErrorData>::sse_encode(data, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::LnUrlPaySuccessData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::Payment>::sse_encode(self.payment, serializer);
|
|
<Option<crate::bindings::SuccessActionProcessed>>::sse_encode(
|
|
self.success_action,
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlWithdrawError {
|
|
// 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::bindings::duplicates::LnUrlWithdrawError::Generic { err } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidAmount { err } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidInvoice { err } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidUri { err } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvoiceNoRoutingHints { err } => {
|
|
<i32>::sse_encode(4, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawError::ServiceConnectivity { err } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlWithdrawRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::bindings::LnUrlWithdrawRequestData>::sse_encode(self.data, serializer);
|
|
<u64>::sse_encode(self.amount_msat, serializer);
|
|
<Option<String>>::sse_encode(self.description, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LnUrlWithdrawRequestData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.callback, serializer);
|
|
<String>::sse_encode(self.k1, serializer);
|
|
<String>::sse_encode(self.default_description, serializer);
|
|
<u64>::sse_encode(self.min_withdrawable, serializer);
|
|
<u64>::sse_encode(self.max_withdrawable, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlWithdrawResult {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Ok { data } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::bindings::duplicates::LnUrlWithdrawSuccessData>::sse_encode(
|
|
data, serializer,
|
|
);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Timeout { data } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::duplicates::LnUrlWithdrawSuccessData>::sse_encode(
|
|
data, serializer,
|
|
);
|
|
}
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::ErrorStatus { data } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<crate::bindings::LnUrlErrorData>::sse_encode(data, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::bindings::LNInvoice>::sse_encode(self.invoice, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LocaleOverrides {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.locale, serializer);
|
|
<Option<u32>>::sse_encode(self.spacing, serializer);
|
|
<crate::bindings::Symbol>::sse_encode(self.symbol, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::LocalizedName {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.locale, serializer);
|
|
<String>::sse_encode(self.name, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::LogEntry {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.line, serializer);
|
|
<String>::sse_encode(self.level, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::MessageSuccessActionData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.message, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::Network {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::bindings::Network::Bitcoin => 0,
|
|
crate::bindings::Network::Testnet => 1,
|
|
crate::bindings::Network::Signet => 2,
|
|
crate::bindings::Network::Regtest => 3,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::OnchainPaymentLimitsResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::Limits>::sse_encode(self.send, serializer);
|
|
<crate::model::Limits>::sse_encode(self.receive, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<String> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<String>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<bool> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<bool>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<i64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<i64>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<crate::bindings::SuccessActionProcessed> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<crate::bindings::SuccessActionProcessed>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<crate::bindings::Symbol> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<crate::bindings::Symbol>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<u32> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<u32>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<u64> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<u64>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for Option<Vec<crate::model::PaymentType>> {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<bool>::sse_encode(self.is_some(), serializer);
|
|
if let Some(value) = self {
|
|
<Vec<crate::model::PaymentType>>::sse_encode(value, serializer);
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PayOnchainAmount {
|
|
// 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::model::PayOnchainAmount::Receiver { amount_sat } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<u64>::sse_encode(amount_sat, serializer);
|
|
}
|
|
crate::model::PayOnchainAmount::Drain => {
|
|
<i32>::sse_encode(1, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PayOnchainRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.address, serializer);
|
|
<crate::model::PreparePayOnchainResponse>::sse_encode(self.prepare_response, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::Payment {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<String>>::sse_encode(self.destination, serializer);
|
|
<Option<String>>::sse_encode(self.tx_id, serializer);
|
|
<u32>::sse_encode(self.timestamp, serializer);
|
|
<u64>::sse_encode(self.amount_sat, serializer);
|
|
<u64>::sse_encode(self.fees_sat, serializer);
|
|
<crate::model::PaymentType>::sse_encode(self.payment_type, serializer);
|
|
<crate::model::PaymentState>::sse_encode(self.status, serializer);
|
|
<crate::model::PaymentDetails>::sse_encode(self.details, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PaymentDetails {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::model::PaymentDetails::Lightning {
|
|
swap_id,
|
|
description,
|
|
preimage,
|
|
bolt11,
|
|
refund_tx_id,
|
|
refund_tx_amount_sat,
|
|
} => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<String>::sse_encode(swap_id, serializer);
|
|
<String>::sse_encode(description, serializer);
|
|
<Option<String>>::sse_encode(preimage, serializer);
|
|
<Option<String>>::sse_encode(bolt11, serializer);
|
|
<Option<String>>::sse_encode(refund_tx_id, serializer);
|
|
<Option<u64>>::sse_encode(refund_tx_amount_sat, serializer);
|
|
}
|
|
crate::model::PaymentDetails::Liquid {
|
|
destination,
|
|
description,
|
|
} => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(destination, serializer);
|
|
<String>::sse_encode(description, serializer);
|
|
}
|
|
crate::model::PaymentDetails::Bitcoin {
|
|
swap_id,
|
|
description,
|
|
refund_tx_id,
|
|
refund_tx_amount_sat,
|
|
} => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<String>::sse_encode(swap_id, serializer);
|
|
<String>::sse_encode(description, serializer);
|
|
<Option<String>>::sse_encode(refund_tx_id, serializer);
|
|
<Option<u64>>::sse_encode(refund_tx_amount_sat, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::error::PaymentError {
|
|
// 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::PaymentError::AlreadyClaimed => {
|
|
<i32>::sse_encode(0, serializer);
|
|
}
|
|
crate::error::PaymentError::AlreadyPaid => {
|
|
<i32>::sse_encode(1, serializer);
|
|
}
|
|
crate::error::PaymentError::PaymentInProgress => {
|
|
<i32>::sse_encode(2, serializer);
|
|
}
|
|
crate::error::PaymentError::AmountOutOfRange => {
|
|
<i32>::sse_encode(3, serializer);
|
|
}
|
|
crate::error::PaymentError::AmountMissing { err } => {
|
|
<i32>::sse_encode(4, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::InvalidNetwork { err } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::Generic { err } => {
|
|
<i32>::sse_encode(6, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::InvalidOrExpiredFees => {
|
|
<i32>::sse_encode(7, serializer);
|
|
}
|
|
crate::error::PaymentError::InsufficientFunds => {
|
|
<i32>::sse_encode(8, serializer);
|
|
}
|
|
crate::error::PaymentError::InvalidDescription { err } => {
|
|
<i32>::sse_encode(9, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::InvalidInvoice { err } => {
|
|
<i32>::sse_encode(10, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::InvalidPreimage => {
|
|
<i32>::sse_encode(11, serializer);
|
|
}
|
|
crate::error::PaymentError::LwkError { err } => {
|
|
<i32>::sse_encode(12, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::PairsNotFound => {
|
|
<i32>::sse_encode(13, serializer);
|
|
}
|
|
crate::error::PaymentError::PaymentTimeout => {
|
|
<i32>::sse_encode(14, serializer);
|
|
}
|
|
crate::error::PaymentError::PersistError => {
|
|
<i32>::sse_encode(15, serializer);
|
|
}
|
|
crate::error::PaymentError::ReceiveError { err } => {
|
|
<i32>::sse_encode(16, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::Refunded { err, refund_tx_id } => {
|
|
<i32>::sse_encode(17, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
<String>::sse_encode(refund_tx_id, serializer);
|
|
}
|
|
crate::error::PaymentError::SelfTransferNotSupported => {
|
|
<i32>::sse_encode(18, serializer);
|
|
}
|
|
crate::error::PaymentError::SendError { err } => {
|
|
<i32>::sse_encode(19, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::PaymentError::SignerError { err } => {
|
|
<i32>::sse_encode(20, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PaymentMethod {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::model::PaymentMethod::Lightning => 0,
|
|
crate::model::PaymentMethod::BitcoinAddress => 1,
|
|
crate::model::PaymentMethod::LiquidAddress => 2,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PaymentState {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::model::PaymentState::Created => 0,
|
|
crate::model::PaymentState::Pending => 1,
|
|
crate::model::PaymentState::Complete => 2,
|
|
crate::model::PaymentState::Failed => 3,
|
|
crate::model::PaymentState::TimedOut => 4,
|
|
crate::model::PaymentState::Refundable => 5,
|
|
crate::model::PaymentState::RefundPending => 6,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PaymentType {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<i32>::sse_encode(
|
|
match self {
|
|
crate::model::PaymentType::Receive => 0,
|
|
crate::model::PaymentType::Send => 1,
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
},
|
|
serializer,
|
|
);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareBuyBitcoinRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::BuyBitcoinProvider>::sse_encode(self.provider, serializer);
|
|
<u64>::sse_encode(self.amount_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareBuyBitcoinResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::BuyBitcoinProvider>::sse_encode(self.provider, serializer);
|
|
<u64>::sse_encode(self.amount_sat, serializer);
|
|
<u64>::sse_encode(self.fees_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PreparePayOnchainRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::PayOnchainAmount>::sse_encode(self.amount, serializer);
|
|
<Option<u32>>::sse_encode(self.fee_rate_sat_per_vbyte, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PreparePayOnchainResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u64>::sse_encode(self.receiver_amount_sat, serializer);
|
|
<u64>::sse_encode(self.claim_fees_sat, serializer);
|
|
<u64>::sse_encode(self.total_fees_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareReceiveRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<u64>>::sse_encode(self.payer_amount_sat, serializer);
|
|
<crate::model::PaymentMethod>::sse_encode(self.payment_method, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareReceiveResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::PaymentMethod>::sse_encode(self.payment_method, serializer);
|
|
<Option<u64>>::sse_encode(self.payer_amount_sat, serializer);
|
|
<u64>::sse_encode(self.fees_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareRefundRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.swap_address, serializer);
|
|
<String>::sse_encode(self.refund_address, serializer);
|
|
<u32>::sse_encode(self.fee_rate_sat_per_vbyte, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareRefundResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u32>::sse_encode(self.tx_vsize, serializer);
|
|
<u64>::sse_encode(self.tx_fee_sat, serializer);
|
|
<Option<String>>::sse_encode(self.refund_tx_id, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareSendRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.destination, serializer);
|
|
<Option<u64>>::sse_encode(self.amount_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::PrepareSendResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::SendDestination>::sse_encode(self.destination, serializer);
|
|
<u64>::sse_encode(self.fees_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::Rate {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.coin, serializer);
|
|
<f64>::sse_encode(self.value, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::ReceivePaymentRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::PrepareReceiveResponse>::sse_encode(self.prepare_response, serializer);
|
|
<Option<String>>::sse_encode(self.description, serializer);
|
|
<Option<bool>>::sse_encode(self.use_description_hash, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::ReceivePaymentResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.destination, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::RecommendedFees {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<u64>::sse_encode(self.fastest_fee, serializer);
|
|
<u64>::sse_encode(self.half_hour_fee, serializer);
|
|
<u64>::sse_encode(self.hour_fee, serializer);
|
|
<u64>::sse_encode(self.economy_fee, serializer);
|
|
<u64>::sse_encode(self.minimum_fee, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::RefundRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.swap_address, serializer);
|
|
<String>::sse_encode(self.refund_address, serializer);
|
|
<u32>::sse_encode(self.fee_rate_sat_per_vbyte, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::RefundResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.refund_tx_id, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::RefundableSwap {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.swap_address, serializer);
|
|
<u32>::sse_encode(self.timestamp, serializer);
|
|
<u64>::sse_encode(self.amount_sat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::RestoreRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<String>>::sse_encode(self.backup_path, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::RouteHint {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Vec<crate::bindings::RouteHintHop>>::sse_encode(self.hops, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::RouteHintHop {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.src_node_id, serializer);
|
|
<String>::sse_encode(self.short_channel_id, serializer);
|
|
<u32>::sse_encode(self.fees_base_msat, serializer);
|
|
<u32>::sse_encode(self.fees_proportional_millionths, serializer);
|
|
<u64>::sse_encode(self.cltv_expiry_delta, serializer);
|
|
<Option<u64>>::sse_encode(self.htlc_minimum_msat, serializer);
|
|
<Option<u64>>::sse_encode(self.htlc_maximum_msat, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::error::SdkError {
|
|
// 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::SdkError::AlreadyStarted => {
|
|
<i32>::sse_encode(0, serializer);
|
|
}
|
|
crate::error::SdkError::Generic { err } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
crate::error::SdkError::NotStarted => {
|
|
<i32>::sse_encode(2, serializer);
|
|
}
|
|
crate::error::SdkError::ServiceConnectivity { err } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<String>::sse_encode(err, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SdkEvent {
|
|
// 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::model::SdkEvent::PaymentFailed { details } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::PaymentPending { details } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::PaymentRefunded { details } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::PaymentRefundPending { details } => {
|
|
<i32>::sse_encode(3, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::PaymentSucceeded { details } => {
|
|
<i32>::sse_encode(4, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::PaymentWaitingConfirmation { details } => {
|
|
<i32>::sse_encode(5, serializer);
|
|
<crate::model::Payment>::sse_encode(details, serializer);
|
|
}
|
|
crate::model::SdkEvent::Synced => {
|
|
<i32>::sse_encode(6, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SendDestination {
|
|
// 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::model::SendDestination::LiquidAddress { address_data } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::bindings::LiquidAddressData>::sse_encode(address_data, serializer);
|
|
}
|
|
crate::model::SendDestination::Bolt11 { invoice } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::LNInvoice>::sse_encode(invoice, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SendPaymentRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::PrepareSendResponse>::sse_encode(self.prepare_response, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SendPaymentResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<crate::model::Payment>::sse_encode(self.payment, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SignMessageRequest {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.message, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::model::SignMessageResponse {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.signature, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::SuccessActionProcessed {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
match self {
|
|
crate::bindings::SuccessActionProcessed::Aes { result } => {
|
|
<i32>::sse_encode(0, serializer);
|
|
<crate::bindings::AesSuccessActionDataResult>::sse_encode(result, serializer);
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Message { data } => {
|
|
<i32>::sse_encode(1, serializer);
|
|
<crate::bindings::MessageSuccessActionData>::sse_encode(data, serializer);
|
|
}
|
|
crate::bindings::SuccessActionProcessed::Url { data } => {
|
|
<i32>::sse_encode(2, serializer);
|
|
<crate::bindings::UrlSuccessActionData>::sse_encode(data, serializer);
|
|
}
|
|
_ => {
|
|
unimplemented!("");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::Symbol {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<Option<String>>::sse_encode(self.grapheme, serializer);
|
|
<Option<String>>::sse_encode(self.template, serializer);
|
|
<Option<bool>>::sse_encode(self.rtl, serializer);
|
|
<Option<u32>>::sse_encode(self.position, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u16 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u16::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u32 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u32::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u64 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u64::<NativeEndian>(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for u8 {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer.cursor.write_u8(self).unwrap();
|
|
}
|
|
}
|
|
|
|
impl SseEncode for () {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {}
|
|
}
|
|
|
|
impl SseEncode for crate::bindings::UrlSuccessActionData {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
<String>::sse_encode(self.description, serializer);
|
|
<String>::sse_encode(self.url, serializer);
|
|
<bool>::sse_encode(self.matches_callback_domain, serializer);
|
|
}
|
|
}
|
|
|
|
impl SseEncode for usize {
|
|
// Codec=Sse (Serialization based), see doc to use other codecs
|
|
fn sse_encode(self, serializer: &mut flutter_rust_bridge::for_generated::SseSerializer) {
|
|
serializer
|
|
.cursor
|
|
.write_u64::<NativeEndian>(self as _)
|
|
.unwrap();
|
|
}
|
|
}
|
|
|
|
#[cfg(not(target_family = "wasm"))]
|
|
mod io {
|
|
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.4.0.
|
|
|
|
// Section: imports
|
|
|
|
use super::*;
|
|
use crate::bindings::*;
|
|
use crate::model::EventListener;
|
|
use flutter_rust_bridge::for_generated::byteorder::{
|
|
NativeEndian, ReadBytesExt, WriteBytesExt,
|
|
};
|
|
use flutter_rust_bridge::for_generated::{transform_result_dco, Lifetimeable, Lockable};
|
|
use flutter_rust_bridge::{Handler, IntoIntoDart};
|
|
|
|
// Section: boilerplate
|
|
|
|
flutter_rust_bridge::frb_generated_boilerplate_io!();
|
|
|
|
// Section: dart2rust
|
|
|
|
impl CstDecode<flutter_rust_bridge::for_generated::anyhow::Error>
|
|
for *mut wire_cst_list_prim_u_8_strict
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> flutter_rust_bridge::for_generated::anyhow::Error {
|
|
unimplemented!()
|
|
}
|
|
}
|
|
impl CstDecode<BindingLiquidSdk> for usize {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> BindingLiquidSdk {
|
|
flutter_rust_bridge::for_generated::rust_auto_opaque_decode_owned(CstDecode::<
|
|
RustOpaqueNom<
|
|
flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>,
|
|
>,
|
|
>::cst_decode(
|
|
self
|
|
))
|
|
}
|
|
}
|
|
impl
|
|
CstDecode<
|
|
RustOpaqueNom<
|
|
flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>,
|
|
>,
|
|
> for usize
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(
|
|
self,
|
|
) -> RustOpaqueNom<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>
|
|
{
|
|
unsafe { decode_rust_opaque_nom(self as _) }
|
|
}
|
|
}
|
|
impl CstDecode<StreamSink<crate::model::LogEntry, flutter_rust_bridge::for_generated::DcoCodec>>
|
|
for *mut wire_cst_list_prim_u_8_strict
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(
|
|
self,
|
|
) -> StreamSink<crate::model::LogEntry, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
let raw: String = self.cst_decode();
|
|
StreamSink::deserialize(raw)
|
|
}
|
|
}
|
|
impl CstDecode<StreamSink<crate::model::SdkEvent, flutter_rust_bridge::for_generated::DcoCodec>>
|
|
for *mut wire_cst_list_prim_u_8_strict
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(
|
|
self,
|
|
) -> StreamSink<crate::model::SdkEvent, flutter_rust_bridge::for_generated::DcoCodec>
|
|
{
|
|
let raw: String = self.cst_decode();
|
|
StreamSink::deserialize(raw)
|
|
}
|
|
}
|
|
impl CstDecode<String> for *mut wire_cst_list_prim_u_8_strict {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> String {
|
|
let vec: Vec<u8> = self.cst_decode();
|
|
String::from_utf8(vec).unwrap()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::AesSuccessActionDataDecrypted>
|
|
for wire_cst_aes_success_action_data_decrypted
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::AesSuccessActionDataDecrypted {
|
|
crate::bindings::AesSuccessActionDataDecrypted {
|
|
description: self.description.cst_decode(),
|
|
plaintext: self.plaintext.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::AesSuccessActionDataResult>
|
|
for wire_cst_aes_success_action_data_result
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::AesSuccessActionDataResult {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Decrypted };
|
|
crate::bindings::AesSuccessActionDataResult::Decrypted {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.ErrorStatus };
|
|
crate::bindings::AesSuccessActionDataResult::ErrorStatus {
|
|
reason: ans.reason.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::BackupRequest> for wire_cst_backup_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::BackupRequest {
|
|
crate::model::BackupRequest {
|
|
backup_path: self.backup_path.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::BindingEventListener> for wire_cst_binding_event_listener {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::BindingEventListener {
|
|
crate::bindings::BindingEventListener {
|
|
stream: self.stream.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::BitcoinAddressData> for wire_cst_bitcoin_address_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::BitcoinAddressData {
|
|
crate::bindings::BitcoinAddressData {
|
|
address: self.address.cst_decode(),
|
|
network: self.network.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
label: self.label.cst_decode(),
|
|
message: self.message.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::AesSuccessActionDataDecrypted>
|
|
for *mut wire_cst_aes_success_action_data_decrypted
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::AesSuccessActionDataDecrypted {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::AesSuccessActionDataDecrypted>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::AesSuccessActionDataResult>
|
|
for *mut wire_cst_aes_success_action_data_result
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::AesSuccessActionDataResult {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::AesSuccessActionDataResult>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::BackupRequest> for *mut wire_cst_backup_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::BackupRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::BackupRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::BindingEventListener> for *mut wire_cst_binding_event_listener {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::BindingEventListener {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::BindingEventListener>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::BitcoinAddressData> for *mut wire_cst_bitcoin_address_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::BitcoinAddressData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::BitcoinAddressData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<bool> for *mut bool {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> bool {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::BuyBitcoinRequest> for *mut wire_cst_buy_bitcoin_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::BuyBitcoinRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::BuyBitcoinRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::CheckMessageRequest> for *mut wire_cst_check_message_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::CheckMessageRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::CheckMessageRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ConnectRequest> for *mut wire_cst_connect_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ConnectRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::ConnectRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<i64> for *mut i64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> i64 {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LiquidAddressData> for *mut wire_cst_liquid_address_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LiquidAddressData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LiquidAddressData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ListPaymentsRequest> for *mut wire_cst_list_payments_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ListPaymentsRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::ListPaymentsRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LNInvoice> for *mut wire_cst_ln_invoice {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LNInvoice {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LNInvoice>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlAuthRequestData> for *mut wire_cst_ln_url_auth_request_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlAuthRequestData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlAuthRequestData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlErrorData> for *mut wire_cst_ln_url_error_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlErrorData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlErrorData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayErrorData> for *mut wire_cst_ln_url_pay_error_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayErrorData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlPayErrorData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayRequest> for *mut wire_cst_ln_url_pay_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlPayRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayRequestData> for *mut wire_cst_ln_url_pay_request_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayRequestData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlPayRequestData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LnUrlPaySuccessData> for *mut wire_cst_ln_url_pay_success_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LnUrlPaySuccessData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::LnUrlPaySuccessData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlWithdrawRequest> for *mut wire_cst_ln_url_withdraw_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlWithdrawRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlWithdrawRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlWithdrawRequestData>
|
|
for *mut wire_cst_ln_url_withdraw_request_data
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlWithdrawRequestData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::LnUrlWithdrawRequestData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlWithdrawSuccessData>
|
|
for *mut wire_cst_ln_url_withdraw_success_data
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::duplicates::LnUrlWithdrawSuccessData>::cst_decode(*wrap)
|
|
.into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::MessageSuccessActionData>
|
|
for *mut wire_cst_message_success_action_data
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::MessageSuccessActionData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::MessageSuccessActionData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PayOnchainRequest> for *mut wire_cst_pay_onchain_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PayOnchainRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PayOnchainRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::Payment> for *mut wire_cst_payment {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::Payment {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::Payment>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareBuyBitcoinRequest>
|
|
for *mut wire_cst_prepare_buy_bitcoin_request
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareBuyBitcoinRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PrepareBuyBitcoinRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PreparePayOnchainRequest>
|
|
for *mut wire_cst_prepare_pay_onchain_request
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PreparePayOnchainRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PreparePayOnchainRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareReceiveRequest> for *mut wire_cst_prepare_receive_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareReceiveRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PrepareReceiveRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareRefundRequest> for *mut wire_cst_prepare_refund_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareRefundRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PrepareRefundRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareSendRequest> for *mut wire_cst_prepare_send_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareSendRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::PrepareSendRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ReceivePaymentRequest> for *mut wire_cst_receive_payment_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ReceivePaymentRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::ReceivePaymentRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RefundRequest> for *mut wire_cst_refund_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RefundRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::RefundRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RestoreRequest> for *mut wire_cst_restore_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RestoreRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::RestoreRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SdkEvent> for *mut wire_cst_sdk_event {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SdkEvent {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::SdkEvent>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SendPaymentRequest> for *mut wire_cst_send_payment_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SendPaymentRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::SendPaymentRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SignMessageRequest> for *mut wire_cst_sign_message_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SignMessageRequest {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::model::SignMessageRequest>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::SuccessActionProcessed> for *mut wire_cst_success_action_processed {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::SuccessActionProcessed {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::SuccessActionProcessed>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::Symbol> for *mut wire_cst_symbol {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::Symbol {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::Symbol>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<u32> for *mut u32 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u32 {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<u64> for *mut u64 {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> u64 {
|
|
unsafe { *flutter_rust_bridge::for_generated::box_from_leak_ptr(self) }
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::UrlSuccessActionData> for *mut wire_cst_url_success_action_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::UrlSuccessActionData {
|
|
let wrap = unsafe { flutter_rust_bridge::for_generated::box_from_leak_ptr(self) };
|
|
CstDecode::<crate::bindings::UrlSuccessActionData>::cst_decode(*wrap).into()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::BuyBitcoinRequest> for wire_cst_buy_bitcoin_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::BuyBitcoinRequest {
|
|
crate::model::BuyBitcoinRequest {
|
|
prepare_response: self.prepare_response.cst_decode(),
|
|
redirect_url: self.redirect_url.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::CheckMessageRequest> for wire_cst_check_message_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::CheckMessageRequest {
|
|
crate::model::CheckMessageRequest {
|
|
message: self.message.cst_decode(),
|
|
pubkey: self.pubkey.cst_decode(),
|
|
signature: self.signature.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::CheckMessageResponse> for wire_cst_check_message_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::CheckMessageResponse {
|
|
crate::model::CheckMessageResponse {
|
|
is_valid: self.is_valid.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::Config> for wire_cst_config {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::Config {
|
|
crate::model::Config {
|
|
liquid_electrum_url: self.liquid_electrum_url.cst_decode(),
|
|
bitcoin_electrum_url: self.bitcoin_electrum_url.cst_decode(),
|
|
mempoolspace_url: self.mempoolspace_url.cst_decode(),
|
|
working_dir: self.working_dir.cst_decode(),
|
|
network: self.network.cst_decode(),
|
|
payment_timeout_sec: self.payment_timeout_sec.cst_decode(),
|
|
zero_conf_min_fee_rate_msat: self.zero_conf_min_fee_rate_msat.cst_decode(),
|
|
zero_conf_max_amount_sat: self.zero_conf_max_amount_sat.cst_decode(),
|
|
breez_api_key: self.breez_api_key.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ConnectRequest> for wire_cst_connect_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ConnectRequest {
|
|
crate::model::ConnectRequest {
|
|
mnemonic: self.mnemonic.cst_decode(),
|
|
config: self.config.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::CurrencyInfo> for wire_cst_currency_info {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::CurrencyInfo {
|
|
crate::bindings::CurrencyInfo {
|
|
name: self.name.cst_decode(),
|
|
fraction_size: self.fraction_size.cst_decode(),
|
|
spacing: self.spacing.cst_decode(),
|
|
symbol: self.symbol.cst_decode(),
|
|
uniq_symbol: self.uniq_symbol.cst_decode(),
|
|
localized_name: self.localized_name.cst_decode(),
|
|
locale_overrides: self.locale_overrides.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::FiatCurrency> for wire_cst_fiat_currency {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::FiatCurrency {
|
|
crate::bindings::FiatCurrency {
|
|
id: self.id.cst_decode(),
|
|
info: self.info.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::GetInfoResponse> for wire_cst_get_info_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::GetInfoResponse {
|
|
crate::model::GetInfoResponse {
|
|
balance_sat: self.balance_sat.cst_decode(),
|
|
pending_send_sat: self.pending_send_sat.cst_decode(),
|
|
pending_receive_sat: self.pending_receive_sat.cst_decode(),
|
|
pubkey: self.pubkey.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::InputType> for wire_cst_input_type {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::InputType {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.BitcoinAddress };
|
|
crate::bindings::InputType::BitcoinAddress {
|
|
address: ans.address.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.LiquidAddress };
|
|
crate::bindings::InputType::LiquidAddress {
|
|
address: ans.address.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.Bolt11 };
|
|
crate::bindings::InputType::Bolt11 {
|
|
invoice: ans.invoice.cst_decode(),
|
|
}
|
|
}
|
|
3 => {
|
|
let ans = unsafe { self.kind.NodeId };
|
|
crate::bindings::InputType::NodeId {
|
|
node_id: ans.node_id.cst_decode(),
|
|
}
|
|
}
|
|
4 => {
|
|
let ans = unsafe { self.kind.Url };
|
|
crate::bindings::InputType::Url {
|
|
url: ans.url.cst_decode(),
|
|
}
|
|
}
|
|
5 => {
|
|
let ans = unsafe { self.kind.LnUrlPay };
|
|
crate::bindings::InputType::LnUrlPay {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
6 => {
|
|
let ans = unsafe { self.kind.LnUrlWithdraw };
|
|
crate::bindings::InputType::LnUrlWithdraw {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
7 => {
|
|
let ans = unsafe { self.kind.LnUrlAuth };
|
|
crate::bindings::InputType::LnUrlAuth {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
8 => {
|
|
let ans = unsafe { self.kind.LnUrlError };
|
|
crate::bindings::InputType::LnUrlError {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LightningPaymentLimitsResponse>
|
|
for wire_cst_lightning_payment_limits_response
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LightningPaymentLimitsResponse {
|
|
crate::model::LightningPaymentLimitsResponse {
|
|
send: self.send.cst_decode(),
|
|
receive: self.receive.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::Limits> for wire_cst_limits {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::Limits {
|
|
crate::model::Limits {
|
|
min_sat: self.min_sat.cst_decode(),
|
|
max_sat: self.max_sat.cst_decode(),
|
|
max_zero_conf_sat: self.max_zero_conf_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LiquidAddressData> for wire_cst_liquid_address_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LiquidAddressData {
|
|
crate::bindings::LiquidAddressData {
|
|
address: self.address.cst_decode(),
|
|
network: self.network.cst_decode(),
|
|
asset_id: self.asset_id.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
label: self.label.cst_decode(),
|
|
message: self.message.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::FiatCurrency>> for *mut wire_cst_list_fiat_currency {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::FiatCurrency> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::LocaleOverrides>> for *mut wire_cst_list_locale_overrides {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::LocaleOverrides> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::LocalizedName>> for *mut wire_cst_list_localized_name {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::LocalizedName> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::model::Payment>> for *mut wire_cst_list_payment {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::model::Payment> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::model::PaymentType>> for *mut wire_cst_list_payment_type {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::model::PaymentType> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ListPaymentsRequest> for wire_cst_list_payments_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ListPaymentsRequest {
|
|
crate::model::ListPaymentsRequest {
|
|
filters: self.filters.cst_decode(),
|
|
from_timestamp: self.from_timestamp.cst_decode(),
|
|
to_timestamp: self.to_timestamp.cst_decode(),
|
|
offset: self.offset.cst_decode(),
|
|
limit: self.limit.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<u8>> for *mut wire_cst_list_prim_u_8_strict {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<u8> {
|
|
unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::Rate>> for *mut wire_cst_list_rate {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::Rate> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::model::RefundableSwap>> for *mut wire_cst_list_refundable_swap {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::model::RefundableSwap> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::RouteHint>> for *mut wire_cst_list_route_hint {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::RouteHint> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<Vec<crate::bindings::RouteHintHop>> for *mut wire_cst_list_route_hint_hop {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> Vec<crate::bindings::RouteHintHop> {
|
|
let vec = unsafe {
|
|
let wrap = flutter_rust_bridge::for_generated::box_from_leak_ptr(self);
|
|
flutter_rust_bridge::for_generated::vec_from_leak_ptr(wrap.ptr, wrap.len)
|
|
};
|
|
vec.into_iter().map(CstDecode::cst_decode).collect()
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LNInvoice> for wire_cst_ln_invoice {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LNInvoice {
|
|
crate::bindings::LNInvoice {
|
|
bolt11: self.bolt11.cst_decode(),
|
|
network: self.network.cst_decode(),
|
|
payee_pubkey: self.payee_pubkey.cst_decode(),
|
|
payment_hash: self.payment_hash.cst_decode(),
|
|
description: self.description.cst_decode(),
|
|
description_hash: self.description_hash.cst_decode(),
|
|
amount_msat: self.amount_msat.cst_decode(),
|
|
timestamp: self.timestamp.cst_decode(),
|
|
expiry: self.expiry.cst_decode(),
|
|
routing_hints: self.routing_hints.cst_decode(),
|
|
payment_secret: self.payment_secret.cst_decode(),
|
|
min_final_cltv_expiry_delta: self.min_final_cltv_expiry_delta.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlAuthError> for wire_cst_ln_url_auth_error {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlAuthError {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Generic };
|
|
crate::bindings::duplicates::LnUrlAuthError::Generic {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.InvalidUri };
|
|
crate::bindings::duplicates::LnUrlAuthError::InvalidUri {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.ServiceConnectivity };
|
|
crate::bindings::duplicates::LnUrlAuthError::ServiceConnectivity {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlAuthRequestData> for wire_cst_ln_url_auth_request_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlAuthRequestData {
|
|
crate::bindings::LnUrlAuthRequestData {
|
|
k1: self.k1.cst_decode(),
|
|
action: self.action.cst_decode(),
|
|
domain: self.domain.cst_decode(),
|
|
url: self.url.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlCallbackStatus>
|
|
for wire_cst_ln_url_callback_status
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlCallbackStatus {
|
|
match self.tag {
|
|
0 => crate::bindings::duplicates::LnUrlCallbackStatus::Ok,
|
|
1 => {
|
|
let ans = unsafe { self.kind.ErrorStatus };
|
|
crate::bindings::duplicates::LnUrlCallbackStatus::ErrorStatus {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlErrorData> for wire_cst_ln_url_error_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlErrorData {
|
|
crate::bindings::LnUrlErrorData {
|
|
reason: self.reason.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlPayError> for wire_cst_ln_url_pay_error {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlPayError {
|
|
match self.tag {
|
|
0 => crate::bindings::duplicates::LnUrlPayError::AlreadyPaid,
|
|
1 => {
|
|
let ans = unsafe { self.kind.Generic };
|
|
crate::bindings::duplicates::LnUrlPayError::Generic {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.InvalidAmount };
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidAmount {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
3 => {
|
|
let ans = unsafe { self.kind.InvalidInvoice };
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidInvoice {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
4 => {
|
|
let ans = unsafe { self.kind.InvalidNetwork };
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidNetwork {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
5 => {
|
|
let ans = unsafe { self.kind.InvalidUri };
|
|
crate::bindings::duplicates::LnUrlPayError::InvalidUri {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
6 => {
|
|
let ans = unsafe { self.kind.InvoiceExpired };
|
|
crate::bindings::duplicates::LnUrlPayError::InvoiceExpired {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
7 => {
|
|
let ans = unsafe { self.kind.PaymentFailed };
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentFailed {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
8 => {
|
|
let ans = unsafe { self.kind.PaymentTimeout };
|
|
crate::bindings::duplicates::LnUrlPayError::PaymentTimeout {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
9 => {
|
|
let ans = unsafe { self.kind.RouteNotFound };
|
|
crate::bindings::duplicates::LnUrlPayError::RouteNotFound {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
10 => {
|
|
let ans = unsafe { self.kind.RouteTooExpensive };
|
|
crate::bindings::duplicates::LnUrlPayError::RouteTooExpensive {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
11 => {
|
|
let ans = unsafe { self.kind.ServiceConnectivity };
|
|
crate::bindings::duplicates::LnUrlPayError::ServiceConnectivity {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayErrorData> for wire_cst_ln_url_pay_error_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayErrorData {
|
|
crate::bindings::LnUrlPayErrorData {
|
|
payment_hash: self.payment_hash.cst_decode(),
|
|
reason: self.reason.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayRequest> for wire_cst_ln_url_pay_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayRequest {
|
|
crate::bindings::LnUrlPayRequest {
|
|
data: self.data.cst_decode(),
|
|
amount_msat: self.amount_msat.cst_decode(),
|
|
comment: self.comment.cst_decode(),
|
|
payment_label: self.payment_label.cst_decode(),
|
|
validate_success_action_url: self.validate_success_action_url.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlPayRequestData> for wire_cst_ln_url_pay_request_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlPayRequestData {
|
|
crate::bindings::LnUrlPayRequestData {
|
|
callback: self.callback.cst_decode(),
|
|
min_sendable: self.min_sendable.cst_decode(),
|
|
max_sendable: self.max_sendable.cst_decode(),
|
|
metadata_str: self.metadata_str.cst_decode(),
|
|
comment_allowed: self.comment_allowed.cst_decode(),
|
|
domain: self.domain.cst_decode(),
|
|
allows_nostr: self.allows_nostr.cst_decode(),
|
|
nostr_pubkey: self.nostr_pubkey.cst_decode(),
|
|
ln_address: self.ln_address.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LnUrlPayResult> for wire_cst_ln_url_pay_result {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LnUrlPayResult {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.EndpointSuccess };
|
|
crate::model::LnUrlPayResult::EndpointSuccess {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.EndpointError };
|
|
crate::model::LnUrlPayResult::EndpointError {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.PayError };
|
|
crate::model::LnUrlPayResult::PayError {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LnUrlPaySuccessData> for wire_cst_ln_url_pay_success_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LnUrlPaySuccessData {
|
|
crate::model::LnUrlPaySuccessData {
|
|
payment: self.payment.cst_decode(),
|
|
success_action: self.success_action.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlWithdrawError> for wire_cst_ln_url_withdraw_error {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlWithdrawError {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Generic };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::Generic {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.InvalidAmount };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidAmount {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.InvalidInvoice };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidInvoice {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
3 => {
|
|
let ans = unsafe { self.kind.InvalidUri };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvalidUri {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
4 => {
|
|
let ans = unsafe { self.kind.InvoiceNoRoutingHints };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::InvoiceNoRoutingHints {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
5 => {
|
|
let ans = unsafe { self.kind.ServiceConnectivity };
|
|
crate::bindings::duplicates::LnUrlWithdrawError::ServiceConnectivity {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlWithdrawRequest> for wire_cst_ln_url_withdraw_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlWithdrawRequest {
|
|
crate::bindings::LnUrlWithdrawRequest {
|
|
data: self.data.cst_decode(),
|
|
amount_msat: self.amount_msat.cst_decode(),
|
|
description: self.description.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LnUrlWithdrawRequestData>
|
|
for wire_cst_ln_url_withdraw_request_data
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LnUrlWithdrawRequestData {
|
|
crate::bindings::LnUrlWithdrawRequestData {
|
|
callback: self.callback.cst_decode(),
|
|
k1: self.k1.cst_decode(),
|
|
default_description: self.default_description.cst_decode(),
|
|
min_withdrawable: self.min_withdrawable.cst_decode(),
|
|
max_withdrawable: self.max_withdrawable.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlWithdrawResult>
|
|
for wire_cst_ln_url_withdraw_result
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlWithdrawResult {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Ok };
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Ok {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.Timeout };
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::Timeout {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.ErrorStatus };
|
|
crate::bindings::duplicates::LnUrlWithdrawResult::ErrorStatus {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::duplicates::LnUrlWithdrawSuccessData>
|
|
for wire_cst_ln_url_withdraw_success_data
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
crate::bindings::duplicates::LnUrlWithdrawSuccessData {
|
|
invoice: self.invoice.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LocaleOverrides> for wire_cst_locale_overrides {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LocaleOverrides {
|
|
crate::bindings::LocaleOverrides {
|
|
locale: self.locale.cst_decode(),
|
|
spacing: self.spacing.cst_decode(),
|
|
symbol: self.symbol.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::LocalizedName> for wire_cst_localized_name {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::LocalizedName {
|
|
crate::bindings::LocalizedName {
|
|
locale: self.locale.cst_decode(),
|
|
name: self.name.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::LogEntry> for wire_cst_log_entry {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::LogEntry {
|
|
crate::model::LogEntry {
|
|
line: self.line.cst_decode(),
|
|
level: self.level.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::MessageSuccessActionData> for wire_cst_message_success_action_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::MessageSuccessActionData {
|
|
crate::bindings::MessageSuccessActionData {
|
|
message: self.message.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::OnchainPaymentLimitsResponse>
|
|
for wire_cst_onchain_payment_limits_response
|
|
{
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::OnchainPaymentLimitsResponse {
|
|
crate::model::OnchainPaymentLimitsResponse {
|
|
send: self.send.cst_decode(),
|
|
receive: self.receive.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PayOnchainAmount> for wire_cst_pay_onchain_amount {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PayOnchainAmount {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Receiver };
|
|
crate::model::PayOnchainAmount::Receiver {
|
|
amount_sat: ans.amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
1 => crate::model::PayOnchainAmount::Drain,
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PayOnchainRequest> for wire_cst_pay_onchain_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PayOnchainRequest {
|
|
crate::model::PayOnchainRequest {
|
|
address: self.address.cst_decode(),
|
|
prepare_response: self.prepare_response.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::Payment> for wire_cst_payment {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::Payment {
|
|
crate::model::Payment {
|
|
destination: self.destination.cst_decode(),
|
|
tx_id: self.tx_id.cst_decode(),
|
|
timestamp: self.timestamp.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
fees_sat: self.fees_sat.cst_decode(),
|
|
payment_type: self.payment_type.cst_decode(),
|
|
status: self.status.cst_decode(),
|
|
details: self.details.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PaymentDetails> for wire_cst_payment_details {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PaymentDetails {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Lightning };
|
|
crate::model::PaymentDetails::Lightning {
|
|
swap_id: ans.swap_id.cst_decode(),
|
|
description: ans.description.cst_decode(),
|
|
preimage: ans.preimage.cst_decode(),
|
|
bolt11: ans.bolt11.cst_decode(),
|
|
refund_tx_id: ans.refund_tx_id.cst_decode(),
|
|
refund_tx_amount_sat: ans.refund_tx_amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.Liquid };
|
|
crate::model::PaymentDetails::Liquid {
|
|
destination: ans.destination.cst_decode(),
|
|
description: ans.description.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.Bitcoin };
|
|
crate::model::PaymentDetails::Bitcoin {
|
|
swap_id: ans.swap_id.cst_decode(),
|
|
description: ans.description.cst_decode(),
|
|
refund_tx_id: ans.refund_tx_id.cst_decode(),
|
|
refund_tx_amount_sat: ans.refund_tx_amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::error::PaymentError> for wire_cst_payment_error {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::error::PaymentError {
|
|
match self.tag {
|
|
0 => crate::error::PaymentError::AlreadyClaimed,
|
|
1 => crate::error::PaymentError::AlreadyPaid,
|
|
2 => crate::error::PaymentError::PaymentInProgress,
|
|
3 => crate::error::PaymentError::AmountOutOfRange,
|
|
4 => {
|
|
let ans = unsafe { self.kind.AmountMissing };
|
|
crate::error::PaymentError::AmountMissing {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
5 => {
|
|
let ans = unsafe { self.kind.InvalidNetwork };
|
|
crate::error::PaymentError::InvalidNetwork {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
6 => {
|
|
let ans = unsafe { self.kind.Generic };
|
|
crate::error::PaymentError::Generic {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
7 => crate::error::PaymentError::InvalidOrExpiredFees,
|
|
8 => crate::error::PaymentError::InsufficientFunds,
|
|
9 => {
|
|
let ans = unsafe { self.kind.InvalidDescription };
|
|
crate::error::PaymentError::InvalidDescription {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
10 => {
|
|
let ans = unsafe { self.kind.InvalidInvoice };
|
|
crate::error::PaymentError::InvalidInvoice {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
11 => crate::error::PaymentError::InvalidPreimage,
|
|
12 => {
|
|
let ans = unsafe { self.kind.LwkError };
|
|
crate::error::PaymentError::LwkError {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
13 => crate::error::PaymentError::PairsNotFound,
|
|
14 => crate::error::PaymentError::PaymentTimeout,
|
|
15 => crate::error::PaymentError::PersistError,
|
|
16 => {
|
|
let ans = unsafe { self.kind.ReceiveError };
|
|
crate::error::PaymentError::ReceiveError {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
17 => {
|
|
let ans = unsafe { self.kind.Refunded };
|
|
crate::error::PaymentError::Refunded {
|
|
err: ans.err.cst_decode(),
|
|
refund_tx_id: ans.refund_tx_id.cst_decode(),
|
|
}
|
|
}
|
|
18 => crate::error::PaymentError::SelfTransferNotSupported,
|
|
19 => {
|
|
let ans = unsafe { self.kind.SendError };
|
|
crate::error::PaymentError::SendError {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
20 => {
|
|
let ans = unsafe { self.kind.SignerError };
|
|
crate::error::PaymentError::SignerError {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareBuyBitcoinRequest> for wire_cst_prepare_buy_bitcoin_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareBuyBitcoinRequest {
|
|
crate::model::PrepareBuyBitcoinRequest {
|
|
provider: self.provider.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareBuyBitcoinResponse> for wire_cst_prepare_buy_bitcoin_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareBuyBitcoinResponse {
|
|
crate::model::PrepareBuyBitcoinResponse {
|
|
provider: self.provider.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
fees_sat: self.fees_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PreparePayOnchainRequest> for wire_cst_prepare_pay_onchain_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PreparePayOnchainRequest {
|
|
crate::model::PreparePayOnchainRequest {
|
|
amount: self.amount.cst_decode(),
|
|
fee_rate_sat_per_vbyte: self.fee_rate_sat_per_vbyte.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PreparePayOnchainResponse> for wire_cst_prepare_pay_onchain_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PreparePayOnchainResponse {
|
|
crate::model::PreparePayOnchainResponse {
|
|
receiver_amount_sat: self.receiver_amount_sat.cst_decode(),
|
|
claim_fees_sat: self.claim_fees_sat.cst_decode(),
|
|
total_fees_sat: self.total_fees_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareReceiveRequest> for wire_cst_prepare_receive_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareReceiveRequest {
|
|
crate::model::PrepareReceiveRequest {
|
|
payer_amount_sat: self.payer_amount_sat.cst_decode(),
|
|
payment_method: self.payment_method.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareReceiveResponse> for wire_cst_prepare_receive_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareReceiveResponse {
|
|
crate::model::PrepareReceiveResponse {
|
|
payment_method: self.payment_method.cst_decode(),
|
|
payer_amount_sat: self.payer_amount_sat.cst_decode(),
|
|
fees_sat: self.fees_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareRefundRequest> for wire_cst_prepare_refund_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareRefundRequest {
|
|
crate::model::PrepareRefundRequest {
|
|
swap_address: self.swap_address.cst_decode(),
|
|
refund_address: self.refund_address.cst_decode(),
|
|
fee_rate_sat_per_vbyte: self.fee_rate_sat_per_vbyte.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareRefundResponse> for wire_cst_prepare_refund_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareRefundResponse {
|
|
crate::model::PrepareRefundResponse {
|
|
tx_vsize: self.tx_vsize.cst_decode(),
|
|
tx_fee_sat: self.tx_fee_sat.cst_decode(),
|
|
refund_tx_id: self.refund_tx_id.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareSendRequest> for wire_cst_prepare_send_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareSendRequest {
|
|
crate::model::PrepareSendRequest {
|
|
destination: self.destination.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::PrepareSendResponse> for wire_cst_prepare_send_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::PrepareSendResponse {
|
|
crate::model::PrepareSendResponse {
|
|
destination: self.destination.cst_decode(),
|
|
fees_sat: self.fees_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::Rate> for wire_cst_rate {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::Rate {
|
|
crate::bindings::Rate {
|
|
coin: self.coin.cst_decode(),
|
|
value: self.value.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ReceivePaymentRequest> for wire_cst_receive_payment_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ReceivePaymentRequest {
|
|
crate::model::ReceivePaymentRequest {
|
|
prepare_response: self.prepare_response.cst_decode(),
|
|
description: self.description.cst_decode(),
|
|
use_description_hash: self.use_description_hash.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::ReceivePaymentResponse> for wire_cst_receive_payment_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::ReceivePaymentResponse {
|
|
crate::model::ReceivePaymentResponse {
|
|
destination: self.destination.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RecommendedFees> for wire_cst_recommended_fees {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RecommendedFees {
|
|
crate::model::RecommendedFees {
|
|
fastest_fee: self.fastest_fee.cst_decode(),
|
|
half_hour_fee: self.half_hour_fee.cst_decode(),
|
|
hour_fee: self.hour_fee.cst_decode(),
|
|
economy_fee: self.economy_fee.cst_decode(),
|
|
minimum_fee: self.minimum_fee.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RefundRequest> for wire_cst_refund_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RefundRequest {
|
|
crate::model::RefundRequest {
|
|
swap_address: self.swap_address.cst_decode(),
|
|
refund_address: self.refund_address.cst_decode(),
|
|
fee_rate_sat_per_vbyte: self.fee_rate_sat_per_vbyte.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RefundResponse> for wire_cst_refund_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RefundResponse {
|
|
crate::model::RefundResponse {
|
|
refund_tx_id: self.refund_tx_id.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RefundableSwap> for wire_cst_refundable_swap {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RefundableSwap {
|
|
crate::model::RefundableSwap {
|
|
swap_address: self.swap_address.cst_decode(),
|
|
timestamp: self.timestamp.cst_decode(),
|
|
amount_sat: self.amount_sat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::RestoreRequest> for wire_cst_restore_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::RestoreRequest {
|
|
crate::model::RestoreRequest {
|
|
backup_path: self.backup_path.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::RouteHint> for wire_cst_route_hint {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::RouteHint {
|
|
crate::bindings::RouteHint {
|
|
hops: self.hops.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::RouteHintHop> for wire_cst_route_hint_hop {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::RouteHintHop {
|
|
crate::bindings::RouteHintHop {
|
|
src_node_id: self.src_node_id.cst_decode(),
|
|
short_channel_id: self.short_channel_id.cst_decode(),
|
|
fees_base_msat: self.fees_base_msat.cst_decode(),
|
|
fees_proportional_millionths: self.fees_proportional_millionths.cst_decode(),
|
|
cltv_expiry_delta: self.cltv_expiry_delta.cst_decode(),
|
|
htlc_minimum_msat: self.htlc_minimum_msat.cst_decode(),
|
|
htlc_maximum_msat: self.htlc_maximum_msat.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::error::SdkError> for wire_cst_sdk_error {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::error::SdkError {
|
|
match self.tag {
|
|
0 => crate::error::SdkError::AlreadyStarted,
|
|
1 => {
|
|
let ans = unsafe { self.kind.Generic };
|
|
crate::error::SdkError::Generic {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
2 => crate::error::SdkError::NotStarted,
|
|
3 => {
|
|
let ans = unsafe { self.kind.ServiceConnectivity };
|
|
crate::error::SdkError::ServiceConnectivity {
|
|
err: ans.err.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SdkEvent> for wire_cst_sdk_event {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SdkEvent {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.PaymentFailed };
|
|
crate::model::SdkEvent::PaymentFailed {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.PaymentPending };
|
|
crate::model::SdkEvent::PaymentPending {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.PaymentRefunded };
|
|
crate::model::SdkEvent::PaymentRefunded {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
3 => {
|
|
let ans = unsafe { self.kind.PaymentRefundPending };
|
|
crate::model::SdkEvent::PaymentRefundPending {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
4 => {
|
|
let ans = unsafe { self.kind.PaymentSucceeded };
|
|
crate::model::SdkEvent::PaymentSucceeded {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
5 => {
|
|
let ans = unsafe { self.kind.PaymentWaitingConfirmation };
|
|
crate::model::SdkEvent::PaymentWaitingConfirmation {
|
|
details: ans.details.cst_decode(),
|
|
}
|
|
}
|
|
6 => crate::model::SdkEvent::Synced,
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SendDestination> for wire_cst_send_destination {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SendDestination {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.LiquidAddress };
|
|
crate::model::SendDestination::LiquidAddress {
|
|
address_data: ans.address_data.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.Bolt11 };
|
|
crate::model::SendDestination::Bolt11 {
|
|
invoice: ans.invoice.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SendPaymentRequest> for wire_cst_send_payment_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SendPaymentRequest {
|
|
crate::model::SendPaymentRequest {
|
|
prepare_response: self.prepare_response.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SendPaymentResponse> for wire_cst_send_payment_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SendPaymentResponse {
|
|
crate::model::SendPaymentResponse {
|
|
payment: self.payment.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SignMessageRequest> for wire_cst_sign_message_request {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SignMessageRequest {
|
|
crate::model::SignMessageRequest {
|
|
message: self.message.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::model::SignMessageResponse> for wire_cst_sign_message_response {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::model::SignMessageResponse {
|
|
crate::model::SignMessageResponse {
|
|
signature: self.signature.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::SuccessActionProcessed> for wire_cst_success_action_processed {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::SuccessActionProcessed {
|
|
match self.tag {
|
|
0 => {
|
|
let ans = unsafe { self.kind.Aes };
|
|
crate::bindings::SuccessActionProcessed::Aes {
|
|
result: ans.result.cst_decode(),
|
|
}
|
|
}
|
|
1 => {
|
|
let ans = unsafe { self.kind.Message };
|
|
crate::bindings::SuccessActionProcessed::Message {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
2 => {
|
|
let ans = unsafe { self.kind.Url };
|
|
crate::bindings::SuccessActionProcessed::Url {
|
|
data: ans.data.cst_decode(),
|
|
}
|
|
}
|
|
_ => unreachable!(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::Symbol> for wire_cst_symbol {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::Symbol {
|
|
crate::bindings::Symbol {
|
|
grapheme: self.grapheme.cst_decode(),
|
|
template: self.template.cst_decode(),
|
|
rtl: self.rtl.cst_decode(),
|
|
position: self.position.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl CstDecode<crate::bindings::UrlSuccessActionData> for wire_cst_url_success_action_data {
|
|
// Codec=Cst (C-struct based), see doc to use other codecs
|
|
fn cst_decode(self) -> crate::bindings::UrlSuccessActionData {
|
|
crate::bindings::UrlSuccessActionData {
|
|
description: self.description.cst_decode(),
|
|
url: self.url.cst_decode(),
|
|
matches_callback_domain: self.matches_callback_domain.cst_decode(),
|
|
}
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_aes_success_action_data_decrypted {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
description: core::ptr::null_mut(),
|
|
plaintext: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_aes_success_action_data_decrypted {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_aes_success_action_data_result {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: AesSuccessActionDataResultKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_aes_success_action_data_result {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_backup_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
backup_path: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_backup_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_binding_event_listener {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
stream: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_binding_event_listener {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_bitcoin_address_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
address: core::ptr::null_mut(),
|
|
network: Default::default(),
|
|
amount_sat: core::ptr::null_mut(),
|
|
label: core::ptr::null_mut(),
|
|
message: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_bitcoin_address_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_buy_bitcoin_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
prepare_response: Default::default(),
|
|
redirect_url: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_buy_bitcoin_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_check_message_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
message: core::ptr::null_mut(),
|
|
pubkey: core::ptr::null_mut(),
|
|
signature: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_check_message_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_check_message_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
is_valid: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_check_message_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_config {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
liquid_electrum_url: core::ptr::null_mut(),
|
|
bitcoin_electrum_url: core::ptr::null_mut(),
|
|
mempoolspace_url: core::ptr::null_mut(),
|
|
working_dir: core::ptr::null_mut(),
|
|
network: Default::default(),
|
|
payment_timeout_sec: Default::default(),
|
|
zero_conf_min_fee_rate_msat: Default::default(),
|
|
zero_conf_max_amount_sat: core::ptr::null_mut(),
|
|
breez_api_key: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_config {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_connect_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
mnemonic: core::ptr::null_mut(),
|
|
config: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_connect_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_currency_info {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
name: core::ptr::null_mut(),
|
|
fraction_size: Default::default(),
|
|
spacing: core::ptr::null_mut(),
|
|
symbol: core::ptr::null_mut(),
|
|
uniq_symbol: core::ptr::null_mut(),
|
|
localized_name: core::ptr::null_mut(),
|
|
locale_overrides: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_currency_info {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_fiat_currency {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
id: core::ptr::null_mut(),
|
|
info: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_fiat_currency {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_get_info_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
balance_sat: Default::default(),
|
|
pending_send_sat: Default::default(),
|
|
pending_receive_sat: Default::default(),
|
|
pubkey: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_get_info_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_input_type {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: InputTypeKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_input_type {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_lightning_payment_limits_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
send: Default::default(),
|
|
receive: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_lightning_payment_limits_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_limits {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
min_sat: Default::default(),
|
|
max_sat: Default::default(),
|
|
max_zero_conf_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_limits {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_liquid_address_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
address: core::ptr::null_mut(),
|
|
network: Default::default(),
|
|
asset_id: core::ptr::null_mut(),
|
|
amount_sat: core::ptr::null_mut(),
|
|
label: core::ptr::null_mut(),
|
|
message: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_liquid_address_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_list_payments_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
filters: core::ptr::null_mut(),
|
|
from_timestamp: core::ptr::null_mut(),
|
|
to_timestamp: core::ptr::null_mut(),
|
|
offset: core::ptr::null_mut(),
|
|
limit: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_list_payments_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_invoice {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
bolt11: core::ptr::null_mut(),
|
|
network: Default::default(),
|
|
payee_pubkey: core::ptr::null_mut(),
|
|
payment_hash: core::ptr::null_mut(),
|
|
description: core::ptr::null_mut(),
|
|
description_hash: core::ptr::null_mut(),
|
|
amount_msat: core::ptr::null_mut(),
|
|
timestamp: Default::default(),
|
|
expiry: Default::default(),
|
|
routing_hints: core::ptr::null_mut(),
|
|
payment_secret: core::ptr::null_mut(),
|
|
min_final_cltv_expiry_delta: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_invoice {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_auth_error {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlAuthErrorKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_auth_error {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_auth_request_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
k1: core::ptr::null_mut(),
|
|
action: core::ptr::null_mut(),
|
|
domain: core::ptr::null_mut(),
|
|
url: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_auth_request_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_callback_status {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlCallbackStatusKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_callback_status {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_error_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
reason: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_error_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_error {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlPayErrorKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_error {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_error_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
payment_hash: core::ptr::null_mut(),
|
|
reason: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_error_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
data: Default::default(),
|
|
amount_msat: Default::default(),
|
|
comment: core::ptr::null_mut(),
|
|
payment_label: core::ptr::null_mut(),
|
|
validate_success_action_url: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_request_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
callback: core::ptr::null_mut(),
|
|
min_sendable: Default::default(),
|
|
max_sendable: Default::default(),
|
|
metadata_str: core::ptr::null_mut(),
|
|
comment_allowed: Default::default(),
|
|
domain: core::ptr::null_mut(),
|
|
allows_nostr: Default::default(),
|
|
nostr_pubkey: core::ptr::null_mut(),
|
|
ln_address: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_request_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_result {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlPayResultKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_result {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_pay_success_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
payment: Default::default(),
|
|
success_action: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_pay_success_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_withdraw_error {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlWithdrawErrorKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_withdraw_error {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_withdraw_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
data: Default::default(),
|
|
amount_msat: Default::default(),
|
|
description: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_withdraw_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_withdraw_request_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
callback: core::ptr::null_mut(),
|
|
k1: core::ptr::null_mut(),
|
|
default_description: core::ptr::null_mut(),
|
|
min_withdrawable: Default::default(),
|
|
max_withdrawable: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_withdraw_request_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_withdraw_result {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: LnUrlWithdrawResultKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_withdraw_result {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_ln_url_withdraw_success_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
invoice: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_ln_url_withdraw_success_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_locale_overrides {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
locale: core::ptr::null_mut(),
|
|
spacing: core::ptr::null_mut(),
|
|
symbol: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_locale_overrides {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_localized_name {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
locale: core::ptr::null_mut(),
|
|
name: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_localized_name {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_log_entry {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
line: core::ptr::null_mut(),
|
|
level: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_log_entry {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_message_success_action_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
message: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_message_success_action_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_onchain_payment_limits_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
send: Default::default(),
|
|
receive: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_onchain_payment_limits_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_pay_onchain_amount {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: PayOnchainAmountKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_pay_onchain_amount {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_pay_onchain_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
address: core::ptr::null_mut(),
|
|
prepare_response: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_pay_onchain_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_payment {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
destination: core::ptr::null_mut(),
|
|
tx_id: core::ptr::null_mut(),
|
|
timestamp: Default::default(),
|
|
amount_sat: Default::default(),
|
|
fees_sat: Default::default(),
|
|
payment_type: Default::default(),
|
|
status: Default::default(),
|
|
details: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_payment {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_payment_details {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: PaymentDetailsKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_payment_details {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_payment_error {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: PaymentErrorKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_payment_error {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_buy_bitcoin_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
provider: Default::default(),
|
|
amount_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_buy_bitcoin_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_buy_bitcoin_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
provider: Default::default(),
|
|
amount_sat: Default::default(),
|
|
fees_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_buy_bitcoin_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_pay_onchain_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
amount: Default::default(),
|
|
fee_rate_sat_per_vbyte: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_pay_onchain_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_pay_onchain_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
receiver_amount_sat: Default::default(),
|
|
claim_fees_sat: Default::default(),
|
|
total_fees_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_pay_onchain_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_receive_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
payer_amount_sat: core::ptr::null_mut(),
|
|
payment_method: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_receive_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_receive_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
payment_method: Default::default(),
|
|
payer_amount_sat: core::ptr::null_mut(),
|
|
fees_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_receive_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_refund_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
swap_address: core::ptr::null_mut(),
|
|
refund_address: core::ptr::null_mut(),
|
|
fee_rate_sat_per_vbyte: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_refund_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_refund_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tx_vsize: Default::default(),
|
|
tx_fee_sat: Default::default(),
|
|
refund_tx_id: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_refund_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_send_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
destination: core::ptr::null_mut(),
|
|
amount_sat: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_send_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_prepare_send_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
destination: Default::default(),
|
|
fees_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_prepare_send_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_rate {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
coin: core::ptr::null_mut(),
|
|
value: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_rate {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_receive_payment_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
prepare_response: Default::default(),
|
|
description: core::ptr::null_mut(),
|
|
use_description_hash: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_receive_payment_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_receive_payment_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
destination: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_receive_payment_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_recommended_fees {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
fastest_fee: Default::default(),
|
|
half_hour_fee: Default::default(),
|
|
hour_fee: Default::default(),
|
|
economy_fee: Default::default(),
|
|
minimum_fee: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_recommended_fees {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_refund_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
swap_address: core::ptr::null_mut(),
|
|
refund_address: core::ptr::null_mut(),
|
|
fee_rate_sat_per_vbyte: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_refund_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_refund_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
refund_tx_id: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_refund_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_refundable_swap {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
swap_address: core::ptr::null_mut(),
|
|
timestamp: Default::default(),
|
|
amount_sat: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_refundable_swap {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_restore_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
backup_path: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_restore_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_route_hint {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
hops: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_route_hint {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_route_hint_hop {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
src_node_id: core::ptr::null_mut(),
|
|
short_channel_id: core::ptr::null_mut(),
|
|
fees_base_msat: Default::default(),
|
|
fees_proportional_millionths: Default::default(),
|
|
cltv_expiry_delta: Default::default(),
|
|
htlc_minimum_msat: core::ptr::null_mut(),
|
|
htlc_maximum_msat: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_route_hint_hop {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_sdk_error {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: SdkErrorKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_sdk_error {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_sdk_event {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: SdkEventKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_sdk_event {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_send_destination {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: SendDestinationKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_send_destination {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_send_payment_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
prepare_response: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_send_payment_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_send_payment_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
payment: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_send_payment_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_sign_message_request {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
message: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_sign_message_request {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_sign_message_response {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
signature: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_sign_message_response {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_success_action_processed {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
tag: -1,
|
|
kind: SuccessActionProcessedKind { nil__: () },
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_success_action_processed {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_symbol {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
grapheme: core::ptr::null_mut(),
|
|
template: core::ptr::null_mut(),
|
|
rtl: core::ptr::null_mut(),
|
|
position: core::ptr::null_mut(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_symbol {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
impl NewWithNullPtr for wire_cst_url_success_action_data {
|
|
fn new_with_null_ptr() -> Self {
|
|
Self {
|
|
description: core::ptr::null_mut(),
|
|
url: core::ptr::null_mut(),
|
|
matches_callback_domain: Default::default(),
|
|
}
|
|
}
|
|
}
|
|
impl Default for wire_cst_url_success_action_data {
|
|
fn default() -> Self {
|
|
Self::new_with_null_ptr()
|
|
}
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_add_event_listener(
|
|
port_: i64,
|
|
that: usize,
|
|
listener: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_add_event_listener_impl(port_, that, listener)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_backup(
|
|
that: usize,
|
|
req: *mut wire_cst_backup_request,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__BindingLiquidSdk_backup_impl(that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_buy_bitcoin(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_buy_bitcoin_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_buy_bitcoin_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_check_message(
|
|
that: usize,
|
|
req: *mut wire_cst_check_message_request,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__BindingLiquidSdk_check_message_impl(that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_disconnect(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_disconnect_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_empty_wallet_cache(
|
|
that: usize,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__BindingLiquidSdk_empty_wallet_cache_impl(that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_fetch_fiat_rates_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_fetch_lightning_limits_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_fetch_onchain_limits_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_get_info(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_get_info_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_list_fiat_currencies_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_payments(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_list_payments_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_list_payments_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_list_refundables(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_list_refundables_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_auth(
|
|
port_: i64,
|
|
that: usize,
|
|
req_data: *mut wire_cst_ln_url_auth_request_data,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_lnurl_auth_impl(port_, that, req_data)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_pay(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_ln_url_pay_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_lnurl_pay_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_lnurl_withdraw(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_ln_url_withdraw_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_lnurl_withdraw_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_pay_onchain(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_pay_onchain_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_pay_onchain_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_buy_bitcoin(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_prepare_buy_bitcoin_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_prepare_buy_bitcoin_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_pay_onchain(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_prepare_pay_onchain_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_prepare_pay_onchain_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_receive_payment(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_prepare_receive_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_prepare_receive_payment_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_refund(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_prepare_refund_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_prepare_refund_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_prepare_send_payment(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_prepare_send_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_prepare_send_payment_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_receive_payment(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_receive_payment_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_receive_payment_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_recommended_fees(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_recommended_fees_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_refund(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_refund_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_refund_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_register_webhook(
|
|
port_: i64,
|
|
that: usize,
|
|
webhook_url: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_register_webhook_impl(port_, that, webhook_url)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_rescan_onchain_swaps(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_rescan_onchain_swaps_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_restore(
|
|
that: usize,
|
|
req: *mut wire_cst_restore_request,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__BindingLiquidSdk_restore_impl(that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_send_payment(
|
|
port_: i64,
|
|
that: usize,
|
|
req: *mut wire_cst_send_payment_request,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_send_payment_impl(port_, that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_sign_message(
|
|
that: usize,
|
|
req: *mut wire_cst_sign_message_request,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__BindingLiquidSdk_sign_message_impl(that, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_sync(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_sync_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__BindingLiquidSdk_unregister_webhook(
|
|
port_: i64,
|
|
that: usize,
|
|
) {
|
|
wire__crate__bindings__BindingLiquidSdk_unregister_webhook_impl(port_, that)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__binding_event_listener_on_event(
|
|
port_: i64,
|
|
that: *mut wire_cst_binding_event_listener,
|
|
e: *mut wire_cst_sdk_event,
|
|
) {
|
|
wire__crate__bindings__binding_event_listener_on_event_impl(port_, that, e)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__breez_log_stream(
|
|
port_: i64,
|
|
s: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__bindings__breez_log_stream_impl(port_, s)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__connect(
|
|
port_: i64,
|
|
req: *mut wire_cst_connect_request,
|
|
) {
|
|
wire__crate__bindings__connect_impl(port_, req)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__default_config(
|
|
network: i32,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__default_config_impl(network)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__parse(
|
|
port_: i64,
|
|
input: *mut wire_cst_list_prim_u_8_strict,
|
|
) {
|
|
wire__crate__bindings__parse_impl(port_, input)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_wire__crate__bindings__parse_invoice(
|
|
input: *mut wire_cst_list_prim_u_8_strict,
|
|
) -> flutter_rust_bridge::for_generated::WireSyncRust2DartDco {
|
|
wire__crate__bindings__parse_invoice_impl(input)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk(
|
|
ptr: *const std::ffi::c_void,
|
|
) {
|
|
unsafe {
|
|
StdArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>::increment_strong_count(ptr as _);
|
|
}
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBindingLiquidSdk(
|
|
ptr: *const std::ffi::c_void,
|
|
) {
|
|
unsafe {
|
|
StdArc::<flutter_rust_bridge::for_generated::RustAutoOpaqueInner<BindingLiquidSdk>>::decrement_strong_count(ptr as _);
|
|
}
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data_decrypted(
|
|
) -> *mut wire_cst_aes_success_action_data_decrypted {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_aes_success_action_data_decrypted::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_aes_success_action_data_result(
|
|
) -> *mut wire_cst_aes_success_action_data_result {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_aes_success_action_data_result::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_backup_request(
|
|
) -> *mut wire_cst_backup_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_backup_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_binding_event_listener(
|
|
) -> *mut wire_cst_binding_event_listener {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_binding_event_listener::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_bitcoin_address_data(
|
|
) -> *mut wire_cst_bitcoin_address_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_bitcoin_address_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_bool(value: bool) -> *mut bool {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_buy_bitcoin_request(
|
|
) -> *mut wire_cst_buy_bitcoin_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_buy_bitcoin_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_check_message_request(
|
|
) -> *mut wire_cst_check_message_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_check_message_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_connect_request(
|
|
) -> *mut wire_cst_connect_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_connect_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_i_64(value: i64) -> *mut i64 {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_liquid_address_data(
|
|
) -> *mut wire_cst_liquid_address_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_liquid_address_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_list_payments_request(
|
|
) -> *mut wire_cst_list_payments_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_list_payments_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_invoice(
|
|
) -> *mut wire_cst_ln_invoice {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_invoice::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_auth_request_data(
|
|
) -> *mut wire_cst_ln_url_auth_request_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_auth_request_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_error_data(
|
|
) -> *mut wire_cst_ln_url_error_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_error_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_pay_error_data(
|
|
) -> *mut wire_cst_ln_url_pay_error_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_pay_error_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_pay_request(
|
|
) -> *mut wire_cst_ln_url_pay_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_pay_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_pay_request_data(
|
|
) -> *mut wire_cst_ln_url_pay_request_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_pay_request_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_pay_success_data(
|
|
) -> *mut wire_cst_ln_url_pay_success_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_pay_success_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_withdraw_request(
|
|
) -> *mut wire_cst_ln_url_withdraw_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_withdraw_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_withdraw_request_data(
|
|
) -> *mut wire_cst_ln_url_withdraw_request_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_withdraw_request_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_ln_url_withdraw_success_data(
|
|
) -> *mut wire_cst_ln_url_withdraw_success_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_ln_url_withdraw_success_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_message_success_action_data(
|
|
) -> *mut wire_cst_message_success_action_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_message_success_action_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_pay_onchain_request(
|
|
) -> *mut wire_cst_pay_onchain_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_pay_onchain_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_payment() -> *mut wire_cst_payment {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_payment::new_with_null_ptr())
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_buy_bitcoin_request(
|
|
) -> *mut wire_cst_prepare_buy_bitcoin_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_prepare_buy_bitcoin_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_pay_onchain_request(
|
|
) -> *mut wire_cst_prepare_pay_onchain_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_prepare_pay_onchain_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_receive_request(
|
|
) -> *mut wire_cst_prepare_receive_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_prepare_receive_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_refund_request(
|
|
) -> *mut wire_cst_prepare_refund_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_prepare_refund_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_prepare_send_request(
|
|
) -> *mut wire_cst_prepare_send_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_prepare_send_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_receive_payment_request(
|
|
) -> *mut wire_cst_receive_payment_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_receive_payment_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_refund_request(
|
|
) -> *mut wire_cst_refund_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_refund_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_restore_request(
|
|
) -> *mut wire_cst_restore_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_restore_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_sdk_event() -> *mut wire_cst_sdk_event
|
|
{
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_sdk_event::new_with_null_ptr())
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_send_payment_request(
|
|
) -> *mut wire_cst_send_payment_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_send_payment_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_sign_message_request(
|
|
) -> *mut wire_cst_sign_message_request {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_sign_message_request::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_success_action_processed(
|
|
) -> *mut wire_cst_success_action_processed {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_success_action_processed::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_symbol() -> *mut wire_cst_symbol {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wire_cst_symbol::new_with_null_ptr())
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_u_32(value: u32) -> *mut u32 {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_u_64(value: u64) -> *mut u64 {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(value)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_box_autoadd_url_success_action_data(
|
|
) -> *mut wire_cst_url_success_action_data {
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(
|
|
wire_cst_url_success_action_data::new_with_null_ptr(),
|
|
)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_fiat_currency(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_fiat_currency {
|
|
let wrap = wire_cst_list_fiat_currency {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_fiat_currency>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_locale_overrides(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_locale_overrides {
|
|
let wrap = wire_cst_list_locale_overrides {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_locale_overrides>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_localized_name(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_localized_name {
|
|
let wrap = wire_cst_list_localized_name {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_localized_name>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_payment(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_payment {
|
|
let wrap = wire_cst_list_payment {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_payment>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_payment_type(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_payment_type {
|
|
let wrap = wire_cst_list_payment_type {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_prim_u_8_strict(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_prim_u_8_strict {
|
|
let ans = wire_cst_list_prim_u_8_strict {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(Default::default(), len),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(ans)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_rate(len: i32) -> *mut wire_cst_list_rate {
|
|
let wrap = wire_cst_list_rate {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_rate>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_refundable_swap(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_refundable_swap {
|
|
let wrap = wire_cst_list_refundable_swap {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_refundable_swap>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_route_hint(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_route_hint {
|
|
let wrap = wire_cst_list_route_hint {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_route_hint>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn frbgen_breez_liquid_cst_new_list_route_hint_hop(
|
|
len: i32,
|
|
) -> *mut wire_cst_list_route_hint_hop {
|
|
let wrap = wire_cst_list_route_hint_hop {
|
|
ptr: flutter_rust_bridge::for_generated::new_leak_vec_ptr(
|
|
<wire_cst_route_hint_hop>::new_with_null_ptr(),
|
|
len,
|
|
),
|
|
len,
|
|
};
|
|
flutter_rust_bridge::for_generated::new_leak_box_ptr(wrap)
|
|
}
|
|
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_aes_success_action_data_decrypted {
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
plaintext: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_aes_success_action_data_result {
|
|
tag: i32,
|
|
kind: AesSuccessActionDataResultKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union AesSuccessActionDataResultKind {
|
|
Decrypted: wire_cst_AesSuccessActionDataResult_Decrypted,
|
|
ErrorStatus: wire_cst_AesSuccessActionDataResult_ErrorStatus,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_AesSuccessActionDataResult_Decrypted {
|
|
data: *mut wire_cst_aes_success_action_data_decrypted,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_AesSuccessActionDataResult_ErrorStatus {
|
|
reason: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_backup_request {
|
|
backup_path: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_binding_event_listener {
|
|
stream: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_bitcoin_address_data {
|
|
address: *mut wire_cst_list_prim_u_8_strict,
|
|
network: i32,
|
|
amount_sat: *mut u64,
|
|
label: *mut wire_cst_list_prim_u_8_strict,
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_buy_bitcoin_request {
|
|
prepare_response: wire_cst_prepare_buy_bitcoin_response,
|
|
redirect_url: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_check_message_request {
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
pubkey: *mut wire_cst_list_prim_u_8_strict,
|
|
signature: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_check_message_response {
|
|
is_valid: bool,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_config {
|
|
liquid_electrum_url: *mut wire_cst_list_prim_u_8_strict,
|
|
bitcoin_electrum_url: *mut wire_cst_list_prim_u_8_strict,
|
|
mempoolspace_url: *mut wire_cst_list_prim_u_8_strict,
|
|
working_dir: *mut wire_cst_list_prim_u_8_strict,
|
|
network: i32,
|
|
payment_timeout_sec: u64,
|
|
zero_conf_min_fee_rate_msat: u32,
|
|
zero_conf_max_amount_sat: *mut u64,
|
|
breez_api_key: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_connect_request {
|
|
mnemonic: *mut wire_cst_list_prim_u_8_strict,
|
|
config: wire_cst_config,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_currency_info {
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
fraction_size: u32,
|
|
spacing: *mut u32,
|
|
symbol: *mut wire_cst_symbol,
|
|
uniq_symbol: *mut wire_cst_symbol,
|
|
localized_name: *mut wire_cst_list_localized_name,
|
|
locale_overrides: *mut wire_cst_list_locale_overrides,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_fiat_currency {
|
|
id: *mut wire_cst_list_prim_u_8_strict,
|
|
info: wire_cst_currency_info,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_get_info_response {
|
|
balance_sat: u64,
|
|
pending_send_sat: u64,
|
|
pending_receive_sat: u64,
|
|
pubkey: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_input_type {
|
|
tag: i32,
|
|
kind: InputTypeKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union InputTypeKind {
|
|
BitcoinAddress: wire_cst_InputType_BitcoinAddress,
|
|
LiquidAddress: wire_cst_InputType_LiquidAddress,
|
|
Bolt11: wire_cst_InputType_Bolt11,
|
|
NodeId: wire_cst_InputType_NodeId,
|
|
Url: wire_cst_InputType_Url,
|
|
LnUrlPay: wire_cst_InputType_LnUrlPay,
|
|
LnUrlWithdraw: wire_cst_InputType_LnUrlWithdraw,
|
|
LnUrlAuth: wire_cst_InputType_LnUrlAuth,
|
|
LnUrlError: wire_cst_InputType_LnUrlError,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_BitcoinAddress {
|
|
address: *mut wire_cst_bitcoin_address_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_LiquidAddress {
|
|
address: *mut wire_cst_liquid_address_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_Bolt11 {
|
|
invoice: *mut wire_cst_ln_invoice,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_NodeId {
|
|
node_id: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_Url {
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_LnUrlPay {
|
|
data: *mut wire_cst_ln_url_pay_request_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_LnUrlWithdraw {
|
|
data: *mut wire_cst_ln_url_withdraw_request_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_LnUrlAuth {
|
|
data: *mut wire_cst_ln_url_auth_request_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_InputType_LnUrlError {
|
|
data: *mut wire_cst_ln_url_error_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_lightning_payment_limits_response {
|
|
send: wire_cst_limits,
|
|
receive: wire_cst_limits,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_limits {
|
|
min_sat: u64,
|
|
max_sat: u64,
|
|
max_zero_conf_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_liquid_address_data {
|
|
address: *mut wire_cst_list_prim_u_8_strict,
|
|
network: i32,
|
|
asset_id: *mut wire_cst_list_prim_u_8_strict,
|
|
amount_sat: *mut u64,
|
|
label: *mut wire_cst_list_prim_u_8_strict,
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_fiat_currency {
|
|
ptr: *mut wire_cst_fiat_currency,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_locale_overrides {
|
|
ptr: *mut wire_cst_locale_overrides,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_localized_name {
|
|
ptr: *mut wire_cst_localized_name,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_payment {
|
|
ptr: *mut wire_cst_payment,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_payment_type {
|
|
ptr: *mut i32,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_payments_request {
|
|
filters: *mut wire_cst_list_payment_type,
|
|
from_timestamp: *mut i64,
|
|
to_timestamp: *mut i64,
|
|
offset: *mut u32,
|
|
limit: *mut u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_prim_u_8_strict {
|
|
ptr: *mut u8,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_rate {
|
|
ptr: *mut wire_cst_rate,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_refundable_swap {
|
|
ptr: *mut wire_cst_refundable_swap,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_route_hint {
|
|
ptr: *mut wire_cst_route_hint,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_list_route_hint_hop {
|
|
ptr: *mut wire_cst_route_hint_hop,
|
|
len: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_invoice {
|
|
bolt11: *mut wire_cst_list_prim_u_8_strict,
|
|
network: i32,
|
|
payee_pubkey: *mut wire_cst_list_prim_u_8_strict,
|
|
payment_hash: *mut wire_cst_list_prim_u_8_strict,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
description_hash: *mut wire_cst_list_prim_u_8_strict,
|
|
amount_msat: *mut u64,
|
|
timestamp: u64,
|
|
expiry: u64,
|
|
routing_hints: *mut wire_cst_list_route_hint,
|
|
payment_secret: *mut wire_cst_list_prim_u_8_strict,
|
|
min_final_cltv_expiry_delta: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_auth_error {
|
|
tag: i32,
|
|
kind: LnUrlAuthErrorKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlAuthErrorKind {
|
|
Generic: wire_cst_LnUrlAuthError_Generic,
|
|
InvalidUri: wire_cst_LnUrlAuthError_InvalidUri,
|
|
ServiceConnectivity: wire_cst_LnUrlAuthError_ServiceConnectivity,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlAuthError_Generic {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlAuthError_InvalidUri {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlAuthError_ServiceConnectivity {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_auth_request_data {
|
|
k1: *mut wire_cst_list_prim_u_8_strict,
|
|
action: *mut wire_cst_list_prim_u_8_strict,
|
|
domain: *mut wire_cst_list_prim_u_8_strict,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_callback_status {
|
|
tag: i32,
|
|
kind: LnUrlCallbackStatusKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlCallbackStatusKind {
|
|
ErrorStatus: wire_cst_LnUrlCallbackStatus_ErrorStatus,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlCallbackStatus_ErrorStatus {
|
|
data: *mut wire_cst_ln_url_error_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_error_data {
|
|
reason: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_error {
|
|
tag: i32,
|
|
kind: LnUrlPayErrorKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlPayErrorKind {
|
|
Generic: wire_cst_LnUrlPayError_Generic,
|
|
InvalidAmount: wire_cst_LnUrlPayError_InvalidAmount,
|
|
InvalidInvoice: wire_cst_LnUrlPayError_InvalidInvoice,
|
|
InvalidNetwork: wire_cst_LnUrlPayError_InvalidNetwork,
|
|
InvalidUri: wire_cst_LnUrlPayError_InvalidUri,
|
|
InvoiceExpired: wire_cst_LnUrlPayError_InvoiceExpired,
|
|
PaymentFailed: wire_cst_LnUrlPayError_PaymentFailed,
|
|
PaymentTimeout: wire_cst_LnUrlPayError_PaymentTimeout,
|
|
RouteNotFound: wire_cst_LnUrlPayError_RouteNotFound,
|
|
RouteTooExpensive: wire_cst_LnUrlPayError_RouteTooExpensive,
|
|
ServiceConnectivity: wire_cst_LnUrlPayError_ServiceConnectivity,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_Generic {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_InvalidAmount {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_InvalidInvoice {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_InvalidNetwork {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_InvalidUri {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_InvoiceExpired {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_PaymentFailed {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_PaymentTimeout {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_RouteNotFound {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_RouteTooExpensive {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayError_ServiceConnectivity {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_error_data {
|
|
payment_hash: *mut wire_cst_list_prim_u_8_strict,
|
|
reason: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_request {
|
|
data: wire_cst_ln_url_pay_request_data,
|
|
amount_msat: u64,
|
|
comment: *mut wire_cst_list_prim_u_8_strict,
|
|
payment_label: *mut wire_cst_list_prim_u_8_strict,
|
|
validate_success_action_url: *mut bool,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_request_data {
|
|
callback: *mut wire_cst_list_prim_u_8_strict,
|
|
min_sendable: u64,
|
|
max_sendable: u64,
|
|
metadata_str: *mut wire_cst_list_prim_u_8_strict,
|
|
comment_allowed: u16,
|
|
domain: *mut wire_cst_list_prim_u_8_strict,
|
|
allows_nostr: bool,
|
|
nostr_pubkey: *mut wire_cst_list_prim_u_8_strict,
|
|
ln_address: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_result {
|
|
tag: i32,
|
|
kind: LnUrlPayResultKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlPayResultKind {
|
|
EndpointSuccess: wire_cst_LnUrlPayResult_EndpointSuccess,
|
|
EndpointError: wire_cst_LnUrlPayResult_EndpointError,
|
|
PayError: wire_cst_LnUrlPayResult_PayError,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayResult_EndpointSuccess {
|
|
data: *mut wire_cst_ln_url_pay_success_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayResult_EndpointError {
|
|
data: *mut wire_cst_ln_url_error_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlPayResult_PayError {
|
|
data: *mut wire_cst_ln_url_pay_error_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_pay_success_data {
|
|
payment: wire_cst_payment,
|
|
success_action: *mut wire_cst_success_action_processed,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_withdraw_error {
|
|
tag: i32,
|
|
kind: LnUrlWithdrawErrorKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlWithdrawErrorKind {
|
|
Generic: wire_cst_LnUrlWithdrawError_Generic,
|
|
InvalidAmount: wire_cst_LnUrlWithdrawError_InvalidAmount,
|
|
InvalidInvoice: wire_cst_LnUrlWithdrawError_InvalidInvoice,
|
|
InvalidUri: wire_cst_LnUrlWithdrawError_InvalidUri,
|
|
InvoiceNoRoutingHints: wire_cst_LnUrlWithdrawError_InvoiceNoRoutingHints,
|
|
ServiceConnectivity: wire_cst_LnUrlWithdrawError_ServiceConnectivity,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_Generic {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_InvalidAmount {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_InvalidInvoice {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_InvalidUri {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_InvoiceNoRoutingHints {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawError_ServiceConnectivity {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_withdraw_request {
|
|
data: wire_cst_ln_url_withdraw_request_data,
|
|
amount_msat: u64,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_withdraw_request_data {
|
|
callback: *mut wire_cst_list_prim_u_8_strict,
|
|
k1: *mut wire_cst_list_prim_u_8_strict,
|
|
default_description: *mut wire_cst_list_prim_u_8_strict,
|
|
min_withdrawable: u64,
|
|
max_withdrawable: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_withdraw_result {
|
|
tag: i32,
|
|
kind: LnUrlWithdrawResultKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union LnUrlWithdrawResultKind {
|
|
Ok: wire_cst_LnUrlWithdrawResult_Ok,
|
|
Timeout: wire_cst_LnUrlWithdrawResult_Timeout,
|
|
ErrorStatus: wire_cst_LnUrlWithdrawResult_ErrorStatus,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawResult_Ok {
|
|
data: *mut wire_cst_ln_url_withdraw_success_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawResult_Timeout {
|
|
data: *mut wire_cst_ln_url_withdraw_success_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_LnUrlWithdrawResult_ErrorStatus {
|
|
data: *mut wire_cst_ln_url_error_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_ln_url_withdraw_success_data {
|
|
invoice: wire_cst_ln_invoice,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_locale_overrides {
|
|
locale: *mut wire_cst_list_prim_u_8_strict,
|
|
spacing: *mut u32,
|
|
symbol: wire_cst_symbol,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_localized_name {
|
|
locale: *mut wire_cst_list_prim_u_8_strict,
|
|
name: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_log_entry {
|
|
line: *mut wire_cst_list_prim_u_8_strict,
|
|
level: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_message_success_action_data {
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_onchain_payment_limits_response {
|
|
send: wire_cst_limits,
|
|
receive: wire_cst_limits,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_pay_onchain_amount {
|
|
tag: i32,
|
|
kind: PayOnchainAmountKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union PayOnchainAmountKind {
|
|
Receiver: wire_cst_PayOnchainAmount_Receiver,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PayOnchainAmount_Receiver {
|
|
amount_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_pay_onchain_request {
|
|
address: *mut wire_cst_list_prim_u_8_strict,
|
|
prepare_response: wire_cst_prepare_pay_onchain_response,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_payment {
|
|
destination: *mut wire_cst_list_prim_u_8_strict,
|
|
tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
timestamp: u32,
|
|
amount_sat: u64,
|
|
fees_sat: u64,
|
|
payment_type: i32,
|
|
status: i32,
|
|
details: wire_cst_payment_details,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_payment_details {
|
|
tag: i32,
|
|
kind: PaymentDetailsKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union PaymentDetailsKind {
|
|
Lightning: wire_cst_PaymentDetails_Lightning,
|
|
Liquid: wire_cst_PaymentDetails_Liquid,
|
|
Bitcoin: wire_cst_PaymentDetails_Bitcoin,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentDetails_Lightning {
|
|
swap_id: *mut wire_cst_list_prim_u_8_strict,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
preimage: *mut wire_cst_list_prim_u_8_strict,
|
|
bolt11: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_tx_amount_sat: *mut u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentDetails_Liquid {
|
|
destination: *mut wire_cst_list_prim_u_8_strict,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentDetails_Bitcoin {
|
|
swap_id: *mut wire_cst_list_prim_u_8_strict,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_tx_amount_sat: *mut u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_payment_error {
|
|
tag: i32,
|
|
kind: PaymentErrorKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union PaymentErrorKind {
|
|
AmountMissing: wire_cst_PaymentError_AmountMissing,
|
|
InvalidNetwork: wire_cst_PaymentError_InvalidNetwork,
|
|
Generic: wire_cst_PaymentError_Generic,
|
|
InvalidDescription: wire_cst_PaymentError_InvalidDescription,
|
|
InvalidInvoice: wire_cst_PaymentError_InvalidInvoice,
|
|
LwkError: wire_cst_PaymentError_LwkError,
|
|
ReceiveError: wire_cst_PaymentError_ReceiveError,
|
|
Refunded: wire_cst_PaymentError_Refunded,
|
|
SendError: wire_cst_PaymentError_SendError,
|
|
SignerError: wire_cst_PaymentError_SignerError,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_AmountMissing {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_InvalidNetwork {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_Generic {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_InvalidDescription {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_InvalidInvoice {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_LwkError {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_ReceiveError {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_Refunded {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_SendError {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_PaymentError_SignerError {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_buy_bitcoin_request {
|
|
provider: i32,
|
|
amount_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_buy_bitcoin_response {
|
|
provider: i32,
|
|
amount_sat: u64,
|
|
fees_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_pay_onchain_request {
|
|
amount: wire_cst_pay_onchain_amount,
|
|
fee_rate_sat_per_vbyte: *mut u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_pay_onchain_response {
|
|
receiver_amount_sat: u64,
|
|
claim_fees_sat: u64,
|
|
total_fees_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_receive_request {
|
|
payer_amount_sat: *mut u64,
|
|
payment_method: i32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_receive_response {
|
|
payment_method: i32,
|
|
payer_amount_sat: *mut u64,
|
|
fees_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_refund_request {
|
|
swap_address: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_address: *mut wire_cst_list_prim_u_8_strict,
|
|
fee_rate_sat_per_vbyte: u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_refund_response {
|
|
tx_vsize: u32,
|
|
tx_fee_sat: u64,
|
|
refund_tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_send_request {
|
|
destination: *mut wire_cst_list_prim_u_8_strict,
|
|
amount_sat: *mut u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_prepare_send_response {
|
|
destination: wire_cst_send_destination,
|
|
fees_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_rate {
|
|
coin: *mut wire_cst_list_prim_u_8_strict,
|
|
value: f64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_receive_payment_request {
|
|
prepare_response: wire_cst_prepare_receive_response,
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
use_description_hash: *mut bool,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_receive_payment_response {
|
|
destination: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_recommended_fees {
|
|
fastest_fee: u64,
|
|
half_hour_fee: u64,
|
|
hour_fee: u64,
|
|
economy_fee: u64,
|
|
minimum_fee: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_refund_request {
|
|
swap_address: *mut wire_cst_list_prim_u_8_strict,
|
|
refund_address: *mut wire_cst_list_prim_u_8_strict,
|
|
fee_rate_sat_per_vbyte: u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_refund_response {
|
|
refund_tx_id: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_refundable_swap {
|
|
swap_address: *mut wire_cst_list_prim_u_8_strict,
|
|
timestamp: u32,
|
|
amount_sat: u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_restore_request {
|
|
backup_path: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_route_hint {
|
|
hops: *mut wire_cst_list_route_hint_hop,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_route_hint_hop {
|
|
src_node_id: *mut wire_cst_list_prim_u_8_strict,
|
|
short_channel_id: *mut wire_cst_list_prim_u_8_strict,
|
|
fees_base_msat: u32,
|
|
fees_proportional_millionths: u32,
|
|
cltv_expiry_delta: u64,
|
|
htlc_minimum_msat: *mut u64,
|
|
htlc_maximum_msat: *mut u64,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_sdk_error {
|
|
tag: i32,
|
|
kind: SdkErrorKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union SdkErrorKind {
|
|
Generic: wire_cst_SdkError_Generic,
|
|
ServiceConnectivity: wire_cst_SdkError_ServiceConnectivity,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkError_Generic {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkError_ServiceConnectivity {
|
|
err: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_sdk_event {
|
|
tag: i32,
|
|
kind: SdkEventKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union SdkEventKind {
|
|
PaymentFailed: wire_cst_SdkEvent_PaymentFailed,
|
|
PaymentPending: wire_cst_SdkEvent_PaymentPending,
|
|
PaymentRefunded: wire_cst_SdkEvent_PaymentRefunded,
|
|
PaymentRefundPending: wire_cst_SdkEvent_PaymentRefundPending,
|
|
PaymentSucceeded: wire_cst_SdkEvent_PaymentSucceeded,
|
|
PaymentWaitingConfirmation: wire_cst_SdkEvent_PaymentWaitingConfirmation,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentFailed {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentPending {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentRefunded {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentRefundPending {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentSucceeded {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SdkEvent_PaymentWaitingConfirmation {
|
|
details: *mut wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_send_destination {
|
|
tag: i32,
|
|
kind: SendDestinationKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union SendDestinationKind {
|
|
LiquidAddress: wire_cst_SendDestination_LiquidAddress,
|
|
Bolt11: wire_cst_SendDestination_Bolt11,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SendDestination_LiquidAddress {
|
|
address_data: *mut wire_cst_liquid_address_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SendDestination_Bolt11 {
|
|
invoice: *mut wire_cst_ln_invoice,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_send_payment_request {
|
|
prepare_response: wire_cst_prepare_send_response,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_send_payment_response {
|
|
payment: wire_cst_payment,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_sign_message_request {
|
|
message: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_sign_message_response {
|
|
signature: *mut wire_cst_list_prim_u_8_strict,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_success_action_processed {
|
|
tag: i32,
|
|
kind: SuccessActionProcessedKind,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub union SuccessActionProcessedKind {
|
|
Aes: wire_cst_SuccessActionProcessed_Aes,
|
|
Message: wire_cst_SuccessActionProcessed_Message,
|
|
Url: wire_cst_SuccessActionProcessed_Url,
|
|
nil__: (),
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SuccessActionProcessed_Aes {
|
|
result: *mut wire_cst_aes_success_action_data_result,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SuccessActionProcessed_Message {
|
|
data: *mut wire_cst_message_success_action_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_SuccessActionProcessed_Url {
|
|
data: *mut wire_cst_url_success_action_data,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_symbol {
|
|
grapheme: *mut wire_cst_list_prim_u_8_strict,
|
|
template: *mut wire_cst_list_prim_u_8_strict,
|
|
rtl: *mut bool,
|
|
position: *mut u32,
|
|
}
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy)]
|
|
pub struct wire_cst_url_success_action_data {
|
|
description: *mut wire_cst_list_prim_u_8_strict,
|
|
url: *mut wire_cst_list_prim_u_8_strict,
|
|
matches_callback_domain: bool,
|
|
}
|
|
}
|
|
#[cfg(not(target_family = "wasm"))]
|
|
pub use io::*;
|