mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Auto-generated bindings updates
This commit is contained in:
parent
e57c225e0f
commit
64aa8baf98
15 changed files with 3384 additions and 2028 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,13 +1,15 @@
|
|||
#if defined(__GNUC__)
|
||||
#define MUST_USE_STRUCT __attribute__((warn_unused))
|
||||
#else
|
||||
#define MUST_USE_STRUCT
|
||||
#endif
|
||||
#if defined(__GNUC__)
|
||||
#define MUST_USE_RES __attribute__((warn_unused_result))
|
||||
#else
|
||||
#define MUST_USE_STRUCT
|
||||
#define MUST_USE_RES
|
||||
#endif
|
||||
#if defined(__clang__)
|
||||
#define NONNULL_PTR _Nonnull
|
||||
#else
|
||||
#define NONNULL_PTR
|
||||
#endif
|
||||
struct nativeChannelHandshakeConfigOpaque;
|
||||
typedef struct nativeChannelHandshakeConfigOpaque LDKnativeChannelHandshakeConfig;
|
||||
struct nativeChannelHandshakeLimitsOpaque;
|
||||
|
|
|
@ -38,6 +38,17 @@ pub type CVec_MonitorEventZ = crate::c_types::CVecTempl<crate::chain::channelmon
|
|||
#[no_mangle]
|
||||
pub static CVec_MonitorEventZ_free: extern "C" fn(CVec_MonitorEventZ) = crate::c_types::CVecTempl_free::<crate::chain::channelmonitor::MonitorEvent>;
|
||||
|
||||
pub type CResult_ChannelMonitorUpdateDecodeErrorZ = crate::c_types::CResultTempl<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelMonitorUpdateDecodeErrorZ_free: extern "C" fn(CResult_ChannelMonitorUpdateDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelMonitorUpdateDecodeErrorZ_ok: extern "C" fn (crate::chain::channelmonitor::ChannelMonitorUpdate) -> CResult_ChannelMonitorUpdateDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelMonitorUpdateDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChannelMonitorUpdateDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::channelmonitor::ChannelMonitorUpdate, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_NoneMonitorUpdateErrorZ = crate::c_types::CResultTempl<u8, crate::chain::channelmonitor::MonitorUpdateError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NoneMonitorUpdateErrorZ_free: extern "C" fn(CResult_NoneMonitorUpdateErrorZ) = crate::c_types::CResultTempl_free::<u8, crate::chain::channelmonitor::MonitorUpdateError>;
|
||||
|
@ -86,6 +97,25 @@ pub type CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ = crate::c_types::CVecTempl<
|
|||
#[no_mangle]
|
||||
pub static CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free: extern "C" fn(CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ) = crate::c_types::CVecTempl_free::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::c_types::CVecTempl<crate::c_types::C2TupleTempl<u32, crate::c_types::TxOut>>>>;
|
||||
|
||||
pub type C2Tuple_BlockHashChannelMonitorZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
|
||||
#[no_mangle]
|
||||
pub static C2Tuple_BlockHashChannelMonitorZ_free: extern "C" fn(C2Tuple_BlockHashChannelMonitorZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>;
|
||||
#[no_mangle]
|
||||
pub extern "C" fn C2Tuple_BlockHashChannelMonitorZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::chain::channelmonitor::ChannelMonitor) -> C2Tuple_BlockHashChannelMonitorZ {
|
||||
C2Tuple_BlockHashChannelMonitorZ { a, b, }
|
||||
}
|
||||
|
||||
pub type CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ = crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free: extern "C" fn(CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok: extern "C" fn (C2Tuple_BlockHashChannelMonitorZ) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::chain::channelmonitor::ChannelMonitor>, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type C2Tuple_u64u64Z = crate::c_types::C2TupleTempl<u64, u64>;
|
||||
#[no_mangle]
|
||||
pub static C2Tuple_u64u64Z_free: extern "C" fn(C2Tuple_u64u64Z) = crate::c_types::C2TupleTempl_free::<u64, u64>;
|
||||
|
@ -94,6 +124,17 @@ pub extern "C" fn C2Tuple_u64u64Z_new(a: u64, b: u64) -> C2Tuple_u64u64Z {
|
|||
C2Tuple_u64u64Z { a, b, }
|
||||
}
|
||||
|
||||
pub type CResult_SpendableOutputDescriptorDecodeErrorZ = crate::c_types::CResultTempl<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_SpendableOutputDescriptorDecodeErrorZ_free: extern "C" fn(CResult_SpendableOutputDescriptorDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_SpendableOutputDescriptorDecodeErrorZ_ok: extern "C" fn (crate::chain::keysinterface::SpendableOutputDescriptor) -> CResult_SpendableOutputDescriptorDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_SpendableOutputDescriptorDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_SpendableOutputDescriptorDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::keysinterface::SpendableOutputDescriptor, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CVec_SignatureZ = crate::c_types::CVecTempl<crate::c_types::Signature>;
|
||||
#[no_mangle]
|
||||
pub static CVec_SignatureZ_free: extern "C" fn(CVec_SignatureZ) = crate::c_types::CVecTempl_free::<crate::c_types::Signature>;
|
||||
|
@ -141,6 +182,17 @@ pub static CResult_ChanKeySignerDecodeErrorZ_ok: extern "C" fn (crate::chain::ke
|
|||
pub static CResult_ChanKeySignerDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChanKeySignerDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::keysinterface::ChannelKeys, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_InMemoryChannelKeysDecodeErrorZ = crate::c_types::CResultTempl<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_InMemoryChannelKeysDecodeErrorZ_free: extern "C" fn(CResult_InMemoryChannelKeysDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_InMemoryChannelKeysDecodeErrorZ_ok: extern "C" fn (crate::chain::keysinterface::InMemoryChannelKeys) -> CResult_InMemoryChannelKeysDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_InMemoryChannelKeysDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_InMemoryChannelKeysDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::chain::keysinterface::InMemoryChannelKeys, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_TxOutAccessErrorZ = crate::c_types::CResultTempl<crate::c_types::TxOut, crate::chain::AccessError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_TxOutAccessErrorZ_free: extern "C" fn(CResult_TxOutAccessErrorZ) = crate::c_types::CResultTempl_free::<crate::c_types::TxOut, crate::chain::AccessError>;
|
||||
|
@ -188,6 +240,47 @@ pub type CVec_ChannelMonitorZ = crate::c_types::CVecTempl<crate::chain::channelm
|
|||
#[no_mangle]
|
||||
pub static CVec_ChannelMonitorZ_free: extern "C" fn(CVec_ChannelMonitorZ) = crate::c_types::CVecTempl_free::<crate::chain::channelmonitor::ChannelMonitor>;
|
||||
|
||||
pub type C2Tuple_BlockHashChannelManagerZ = crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
|
||||
#[no_mangle]
|
||||
pub static C2Tuple_BlockHashChannelManagerZ_free: extern "C" fn(C2Tuple_BlockHashChannelManagerZ) = crate::c_types::C2TupleTempl_free::<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>;
|
||||
#[no_mangle]
|
||||
pub extern "C" fn C2Tuple_BlockHashChannelManagerZ_new(a: crate::c_types::ThirtyTwoBytes, b: crate::ln::channelmanager::ChannelManager) -> C2Tuple_BlockHashChannelManagerZ {
|
||||
C2Tuple_BlockHashChannelManagerZ { a, b, }
|
||||
}
|
||||
|
||||
pub type CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ = crate::c_types::CResultTempl<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free: extern "C" fn(CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok: extern "C" fn (C2Tuple_BlockHashChannelManagerZ) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::C2TupleTempl<crate::c_types::ThirtyTwoBytes, crate::ln::channelmanager::ChannelManager>, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_NetAddressu8Z = crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NetAddressu8Z_free: extern "C" fn(CResult_NetAddressu8Z) = crate::c_types::CResultTempl_free::<crate::ln::msgs::NetAddress, u8>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NetAddressu8Z_ok: extern "C" fn (crate::ln::msgs::NetAddress) -> CResult_NetAddressu8Z =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::NetAddress, u8>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_NetAddressu8Z_err: extern "C" fn (u8) -> CResult_NetAddressu8Z =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::NetAddress, u8>::err;
|
||||
|
||||
pub type CResult_CResult_NetAddressu8ZDecodeErrorZ = crate::c_types::CResultTempl<crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_CResult_NetAddressu8ZDecodeErrorZ_free: extern "C" fn(CResult_CResult_NetAddressu8ZDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_CResult_NetAddressu8ZDecodeErrorZ_ok: extern "C" fn (CResult_NetAddressu8Z) -> CResult_CResult_NetAddressu8ZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_CResult_NetAddressu8ZDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_CResult_NetAddressu8ZDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::c_types::CResultTempl<crate::ln::msgs::NetAddress, u8>, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CVec_u64Z = crate::c_types::CVecTempl<u64>;
|
||||
#[no_mangle]
|
||||
pub static CVec_u64Z_free: extern "C" fn(CVec_u64Z) = crate::c_types::CVecTempl_free::<u64>;
|
||||
|
@ -247,6 +340,149 @@ pub extern "C" fn CResult_NoneLightningErrorZ_ok() -> CResult_NoneLightningError
|
|||
pub static CResult_NoneLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_NoneLightningErrorZ =
|
||||
crate::c_types::CResultTempl::<u8, crate::ln::msgs::LightningError>::err;
|
||||
|
||||
pub type CResult_ChannelReestablishDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelReestablishDecodeErrorZ_free: extern "C" fn(CResult_ChannelReestablishDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelReestablishDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ChannelReestablish) -> CResult_ChannelReestablishDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_ChannelReestablishDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ChannelReestablishDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ChannelReestablish, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_InitDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_InitDecodeErrorZ_free: extern "C" fn(CResult_InitDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_InitDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Init) -> CResult_InitDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_InitDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_InitDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Init, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_PingDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_PingDecodeErrorZ_free: extern "C" fn(CResult_PingDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_PingDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Ping) -> CResult_PingDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_PingDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_PingDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Ping, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_PongDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_PongDecodeErrorZ_free: extern "C" fn(CResult_PongDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_PongDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::Pong) -> CResult_PongDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_PongDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_PongDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::Pong, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_UnsignedChannelAnnouncementDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_free: extern "C" fn(CResult_UnsignedChannelAnnouncementDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedChannelAnnouncement) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelAnnouncementDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelAnnouncementDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedChannelAnnouncement, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_UnsignedChannelUpdateDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelUpdateDecodeErrorZ_free: extern "C" fn(CResult_UnsignedChannelUpdateDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelUpdateDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedChannelUpdate) -> CResult_UnsignedChannelUpdateDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedChannelUpdateDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedChannelUpdateDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedChannelUpdate, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_ErrorMessageDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ErrorMessageDecodeErrorZ_free: extern "C" fn(CResult_ErrorMessageDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ErrorMessageDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ErrorMessage) -> CResult_ErrorMessageDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_ErrorMessageDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ErrorMessageDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ErrorMessage, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_UnsignedNodeAnnouncementDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_free: extern "C" fn(CResult_UnsignedNodeAnnouncementDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::UnsignedNodeAnnouncement) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_UnsignedNodeAnnouncementDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_UnsignedNodeAnnouncementDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::UnsignedNodeAnnouncement, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_QueryShortChannelIdsDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryShortChannelIdsDecodeErrorZ_free: extern "C" fn(CResult_QueryShortChannelIdsDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryShortChannelIdsDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::QueryShortChannelIds) -> CResult_QueryShortChannelIdsDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryShortChannelIdsDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_QueryShortChannelIdsDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::QueryShortChannelIds, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_ReplyShortChannelIdsEndDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_free: extern "C" fn(CResult_ReplyShortChannelIdsEndDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ReplyShortChannelIdsEnd) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyShortChannelIdsEndDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ReplyShortChannelIdsEndDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ReplyShortChannelIdsEnd, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_QueryChannelRangeDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryChannelRangeDecodeErrorZ_free: extern "C" fn(CResult_QueryChannelRangeDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryChannelRangeDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::QueryChannelRange) -> CResult_QueryChannelRangeDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_QueryChannelRangeDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_QueryChannelRangeDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::QueryChannelRange, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_ReplyChannelRangeDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyChannelRangeDecodeErrorZ_free: extern "C" fn(CResult_ReplyChannelRangeDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyChannelRangeDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::ReplyChannelRange) -> CResult_ReplyChannelRangeDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_ReplyChannelRangeDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_ReplyChannelRangeDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::ReplyChannelRange, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_GossipTimestampFilterDecodeErrorZ = crate::c_types::CResultTempl<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_GossipTimestampFilterDecodeErrorZ_free: extern "C" fn(CResult_GossipTimestampFilterDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_GossipTimestampFilterDecodeErrorZ_ok: extern "C" fn (crate::ln::msgs::GossipTimestampFilter) -> CResult_GossipTimestampFilterDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_GossipTimestampFilterDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_GossipTimestampFilterDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::ln::msgs::GossipTimestampFilter, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CVec_PublicKeyZ = crate::c_types::CVecTempl<crate::c_types::PublicKey>;
|
||||
#[no_mangle]
|
||||
pub static CVec_PublicKeyZ_free: extern "C" fn(CVec_PublicKeyZ) = crate::c_types::CVecTempl_free::<crate::c_types::PublicKey>;
|
||||
|
@ -354,6 +590,17 @@ pub type CVec_CVec_RouteHopZZ = crate::c_types::CVecTempl<crate::c_types::CVecTe
|
|||
#[no_mangle]
|
||||
pub static CVec_CVec_RouteHopZZ_free: extern "C" fn(CVec_CVec_RouteHopZZ) = crate::c_types::CVecTempl_free::<crate::c_types::CVecTempl<crate::routing::router::RouteHop>>;
|
||||
|
||||
pub type CResult_RouteDecodeErrorZ = crate::c_types::CResultTempl<crate::routing::router::Route, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_RouteDecodeErrorZ_free: extern "C" fn(CResult_RouteDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::routing::router::Route, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_RouteDecodeErrorZ_ok: extern "C" fn (crate::routing::router::Route) -> CResult_RouteDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::router::Route, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_RouteDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_RouteDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::router::Route, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CVec_RouteHintZ = crate::c_types::CVecTempl<crate::routing::router::RouteHint>;
|
||||
#[no_mangle]
|
||||
pub static CVec_RouteHintZ_free: extern "C" fn(CVec_RouteHintZ) = crate::c_types::CVecTempl_free::<crate::routing::router::RouteHint>;
|
||||
|
@ -369,3 +616,47 @@ pub static CResult_RouteLightningErrorZ_ok: extern "C" fn (crate::routing::route
|
|||
pub static CResult_RouteLightningErrorZ_err: extern "C" fn (crate::ln::msgs::LightningError) -> CResult_RouteLightningErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::router::Route, crate::ln::msgs::LightningError>::err;
|
||||
|
||||
pub type CResult_RoutingFeesDecodeErrorZ = crate::c_types::CResultTempl<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_RoutingFeesDecodeErrorZ_free: extern "C" fn(CResult_RoutingFeesDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_RoutingFeesDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::RoutingFees) -> CResult_RoutingFeesDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_RoutingFeesDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_RoutingFeesDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::RoutingFees, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_NodeAnnouncementInfoDecodeErrorZ = crate::c_types::CResultTempl<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeAnnouncementInfoDecodeErrorZ_free: extern "C" fn(CResult_NodeAnnouncementInfoDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeAnnouncementInfoDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NodeAnnouncementInfo) -> CResult_NodeAnnouncementInfoDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeAnnouncementInfoDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NodeAnnouncementInfoDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NodeAnnouncementInfo, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_NodeInfoDecodeErrorZ = crate::c_types::CResultTempl<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeInfoDecodeErrorZ_free: extern "C" fn(CResult_NodeInfoDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeInfoDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NodeInfo) -> CResult_NodeInfoDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_NodeInfoDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NodeInfoDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NodeInfo, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
pub type CResult_NetworkGraphDecodeErrorZ = crate::c_types::CResultTempl<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NetworkGraphDecodeErrorZ_free: extern "C" fn(CResult_NetworkGraphDecodeErrorZ) = crate::c_types::CResultTempl_free::<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>;
|
||||
#[no_mangle]
|
||||
pub static CResult_NetworkGraphDecodeErrorZ_ok: extern "C" fn (crate::routing::network_graph::NetworkGraph) -> CResult_NetworkGraphDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>::ok;
|
||||
|
||||
#[no_mangle]
|
||||
pub static CResult_NetworkGraphDecodeErrorZ_err: extern "C" fn (crate::ln::msgs::DecodeError) -> CResult_NetworkGraphDecodeErrorZ =
|
||||
crate::c_types::CResultTempl::<crate::routing::network_graph::NetworkGraph, crate::ln::msgs::DecodeError>::err;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ impl From<nativeChainMonitor> for crate::chain::Watch {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChainMonitor_as_Watch(this_arg: *const ChainMonitor) -> crate::chain::Watch {
|
||||
pub extern "C" fn ChainMonitor_as_Watch(this_arg: &ChainMonitor) -> crate::chain::Watch {
|
||||
crate::chain::Watch {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -168,7 +168,7 @@ impl From<nativeChainMonitor> for crate::util::events::EventsProvider {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChainMonitor_as_EventsProvider(this_arg: *const ChainMonitor) -> crate::util::events::EventsProvider {
|
||||
pub extern "C" fn ChainMonitor_as_EventsProvider(this_arg: &ChainMonitor) -> crate::util::events::EventsProvider {
|
||||
crate::util::events::EventsProvider {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
|
|
@ -112,20 +112,18 @@ pub extern "C" fn ChannelMonitorUpdate_set_update_id(this_ptr: &mut ChannelMonit
|
|||
#[no_mangle]
|
||||
pub static CLOSED_CHANNEL_UPDATE_ID: u64 = lightning::chain::channelmonitor::CLOSED_CHANNEL_UPDATE_ID;
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelMonitorUpdate_write(obj: *const ChannelMonitorUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn ChannelMonitorUpdate_write(obj: &ChannelMonitorUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ChannelMonitorUpdate_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelMonitorUpdate) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelMonitorUpdate_read(ser: crate::c_types::u8slice) -> ChannelMonitorUpdate {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
ChannelMonitorUpdate { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
ChannelMonitorUpdate { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn ChannelMonitorUpdate_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelMonitorUpdateDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::chain::channelmonitor::ChannelMonitorUpdate { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
/// An error enum representing a failure to persist a channel monitor update.
|
||||
#[must_use]
|
||||
|
@ -381,7 +379,7 @@ pub extern "C" fn HTLCUpdate_clone(orig: &HTLCUpdate) -> HTLCUpdate {
|
|||
HTLCUpdate { inner: Box::into_raw(Box::new(unsafe { &*orig.inner }.clone())), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn HTLCUpdate_write(obj: *const HTLCUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn HTLCUpdate_write(obj: &HTLCUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -449,6 +447,14 @@ impl ChannelMonitor {
|
|||
ret
|
||||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelMonitor_write(obj: &ChannelMonitor) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ChannelMonitor_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelMonitor) })
|
||||
}
|
||||
/// Updates a ChannelMonitor on the basis of some new information provided by the Channel
|
||||
/// itself.
|
||||
///
|
||||
|
@ -642,3 +648,10 @@ impl Drop for Persist {
|
|||
}
|
||||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn C2Tuple_BlockHashChannelMonitorZ_read(ser: crate::c_types::u8slice, arg: &crate::chain::keysinterface::KeysInterface) -> crate::c_types::derived::CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
|
||||
let arg_conv = arg;
|
||||
let res: Result<(bitcoin::hash_types::BlockHash, lightning::chain::channelmonitor::ChannelMonitor<crate::chain::keysinterface::ChannelKeys>), lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj_arg(ser, arg_conv);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_res_0_0, mut orig_res_0_1) = o; let mut local_res_0 = (crate::c_types::ThirtyTwoBytes { data: orig_res_0_0.into_inner() }, crate::chain::channelmonitor::ChannelMonitor { inner: Box::into_raw(Box::new(orig_res_0_1)), is_owned: true }).into(); local_res_0 }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
|
|
@ -224,6 +224,16 @@ pub extern "C" fn SpendableOutputDescriptor_free(this_ptr: SpendableOutputDescri
|
|||
pub extern "C" fn SpendableOutputDescriptor_clone(orig: &SpendableOutputDescriptor) -> SpendableOutputDescriptor {
|
||||
orig.clone()
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn SpendableOutputDescriptor_write(obj: &SpendableOutputDescriptor) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(&unsafe { &*obj }.to_native())
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn SpendableOutputDescriptor_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_SpendableOutputDescriptorDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::chain::keysinterface::SpendableOutputDescriptor::native_into(o) }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
/// Set of lightning keys needed to operate a channel as described in BOLT 3.
|
||||
///
|
||||
/// Signing services could be implemented on a hardware wallet. In this case,
|
||||
|
@ -762,7 +772,7 @@ impl From<nativeInMemoryChannelKeys> for crate::chain::keysinterface::ChannelKey
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: *const InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
|
||||
pub extern "C" fn InMemoryChannelKeys_as_ChannelKeys(this_arg: &InMemoryChannelKeys) -> crate::chain::keysinterface::ChannelKeys {
|
||||
crate::chain::keysinterface::ChannelKeys {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -854,20 +864,18 @@ extern "C" fn InMemoryChannelKeys_ChannelKeys_ready_channel(this_arg: *mut c_voi
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn InMemoryChannelKeys_write(obj: *const InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn InMemoryChannelKeys_write(obj: &InMemoryChannelKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn InMemoryChannelKeys_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInMemoryChannelKeys) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn InMemoryChannelKeys_read(ser: crate::c_types::u8slice) -> InMemoryChannelKeys {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
InMemoryChannelKeys { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
InMemoryChannelKeys { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn InMemoryChannelKeys_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_InMemoryChannelKeysDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::chain::keysinterface::InMemoryChannelKeys { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
||||
use lightning::chain::keysinterface::KeysManager as nativeKeysManagerImport;
|
||||
|
@ -962,7 +970,7 @@ impl From<nativeKeysManager> for crate::chain::keysinterface::KeysInterface {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: *const KeysManager) -> crate::chain::keysinterface::KeysInterface {
|
||||
pub extern "C" fn KeysManager_as_KeysInterface(this_arg: &KeysManager) -> crate::chain::keysinterface::KeysInterface {
|
||||
crate::chain::keysinterface::KeysInterface {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
|
|
@ -101,7 +101,7 @@ pub extern "C" fn OutPoint_to_channel_id(this_arg: &OutPoint) -> crate::c_types:
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn OutPoint_write(obj: *const OutPoint) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn OutPoint_write(obj: &OutPoint) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
|
|
@ -208,7 +208,7 @@ pub extern "C" fn TxCreationKeys_new(mut per_commitment_point_arg: crate::c_type
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn TxCreationKeys_write(obj: *const TxCreationKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn TxCreationKeys_write(obj: &TxCreationKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -363,7 +363,7 @@ pub extern "C" fn ChannelPublicKeys_new(mut funding_pubkey_arg: crate::c_types::
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelPublicKeys_write(obj: *const ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelPublicKeys_write(obj: &ChannelPublicKeys) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -515,7 +515,7 @@ pub extern "C" fn HTLCOutputInCommitment_set_payment_hash(this_ptr: &mut HTLCOut
|
|||
unsafe { &mut *this_ptr.inner }.payment_hash = ::lightning::ln::channelmanager::PaymentHash(val.data);
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn HTLCOutputInCommitment_write(obj: *const HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn HTLCOutputInCommitment_write(obj: &HTLCOutputInCommitment) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -805,7 +805,7 @@ pub extern "C" fn ChannelTransactionParameters_as_counterparty_broadcastable(thi
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn CounterpartyChannelTransactionParameters_write(obj: *const CounterpartyChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn CounterpartyChannelTransactionParameters_write(obj: &CounterpartyChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -821,7 +821,7 @@ pub extern "C" fn CounterpartyChannelTransactionParameters_read(ser: crate::c_ty
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelTransactionParameters_write(obj: *const ChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelTransactionParameters_write(obj: &ChannelTransactionParameters) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -997,7 +997,7 @@ pub extern "C" fn HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_pt
|
|||
unsafe { &mut *this_ptr.inner }.counterparty_htlc_sigs = local_val;
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn HolderCommitmentTransaction_write(obj: *const HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn HolderCommitmentTransaction_write(obj: &HolderCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -1115,7 +1115,7 @@ pub extern "C" fn BuiltCommitmentTransaction_new(mut transaction_arg: crate::c_t
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn BuiltCommitmentTransaction_write(obj: *const BuiltCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn BuiltCommitmentTransaction_write(obj: &BuiltCommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -1210,7 +1210,7 @@ pub extern "C" fn CommitmentTransaction_clone(orig: &CommitmentTransaction) -> C
|
|||
CommitmentTransaction { inner: Box::into_raw(Box::new(unsafe { &*orig.inner }.clone())), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn CommitmentTransaction_write(obj: *const CommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn CommitmentTransaction_write(obj: &CommitmentTransaction) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
|
|
@ -570,7 +570,7 @@ impl From<nativeChannelManager> for crate::util::events::MessageSendEventsProvid
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: *const ChannelManager) -> crate::util::events::MessageSendEventsProvider {
|
||||
pub extern "C" fn ChannelManager_as_MessageSendEventsProvider(this_arg: &ChannelManager) -> crate::util::events::MessageSendEventsProvider {
|
||||
crate::util::events::MessageSendEventsProvider {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -596,7 +596,7 @@ impl From<nativeChannelManager> for crate::util::events::EventsProvider {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: *const ChannelManager) -> crate::util::events::EventsProvider {
|
||||
pub extern "C" fn ChannelManager_as_EventsProvider(this_arg: &ChannelManager) -> crate::util::events::EventsProvider {
|
||||
crate::util::events::EventsProvider {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -638,7 +638,7 @@ impl From<nativeChannelManager> for crate::ln::msgs::ChannelMessageHandler {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: *const ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
|
||||
pub extern "C" fn ChannelManager_as_ChannelMessageHandler(this_arg: &ChannelManager) -> crate::ln::msgs::ChannelMessageHandler {
|
||||
crate::ln::msgs::ChannelMessageHandler {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -734,6 +734,14 @@ extern "C" fn ChannelManager_ChannelMessageHandler_get_and_clear_pending_msg_eve
|
|||
local_ret.into()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelManager_write(obj: &ChannelManager) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ChannelManager_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelManager) })
|
||||
}
|
||||
|
||||
use lightning::ln::channelmanager::ChannelManagerReadArgs as nativeChannelManagerReadArgsImport;
|
||||
type nativeChannelManagerReadArgs = nativeChannelManagerReadArgsImport<'static, crate::chain::keysinterface::ChannelKeys, crate::chain::Watch, crate::chain::chaininterface::BroadcasterInterface, crate::chain::keysinterface::KeysInterface, crate::chain::chaininterface::FeeEstimator, crate::util::logger::Logger>;
|
||||
|
@ -886,3 +894,10 @@ pub extern "C" fn ChannelManagerReadArgs_new(mut keys_manager: crate::chain::key
|
|||
ChannelManagerReadArgs { inner: Box::into_raw(Box::new(ret)), is_owned: true }
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn C2Tuple_BlockHashChannelManagerZ_read(ser: crate::c_types::u8slice, arg: crate::ln::channelmanager::ChannelManagerReadArgs) -> crate::c_types::derived::CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
|
||||
let arg_conv = *unsafe { Box::from_raw(arg.take_inner()) };
|
||||
let res: Result<(bitcoin::hash_types::BlockHash, lightning::ln::channelmanager::ChannelManager<crate::chain::keysinterface::ChannelKeys, crate::chain::Watch, crate::chain::chaininterface::BroadcasterInterface, crate::chain::keysinterface::KeysInterface, crate::chain::chaininterface::FeeEstimator, crate::util::logger::Logger>), lightning::ln::msgs::DecodeError> = crate::c_types::deserialize_obj_arg(ser, arg_conv);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { let (mut orig_res_0_0, mut orig_res_0_1) = o; let mut local_res_0 = (crate::c_types::ThirtyTwoBytes { data: orig_res_0_0.into_inner() }, crate::ln::channelmanager::ChannelManager { inner: Box::into_raw(Box::new(orig_res_0_1)), is_owned: true }).into(); local_res_0 }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
|
|
@ -2407,6 +2407,16 @@ pub extern "C" fn NetAddress_free(this_ptr: NetAddress) { }
|
|||
pub extern "C" fn NetAddress_clone(orig: &NetAddress) -> NetAddress {
|
||||
orig.clone()
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NetAddress_write(obj: &NetAddress) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(&unsafe { &*obj }.to_native())
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Result_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_CResult_NetAddressu8ZDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { let mut local_res_0 = match o { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::NetAddress::native_into(o) }), Err(mut e) => crate::c_types::CResultTempl::err( { e }) }; local_res_0 }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
||||
use lightning::ln::msgs::UnsignedNodeAnnouncement as nativeUnsignedNodeAnnouncementImport;
|
||||
type nativeUnsignedNodeAnnouncement = nativeUnsignedNodeAnnouncementImport;
|
||||
|
@ -4292,7 +4302,7 @@ impl Drop for RoutingMessageHandler {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn AcceptChannel_write(obj: *const AcceptChannel) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn AcceptChannel_write(obj: &AcceptChannel) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4308,7 +4318,7 @@ pub extern "C" fn AcceptChannel_read(ser: crate::c_types::u8slice) -> AcceptChan
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn AnnouncementSignatures_write(obj: *const AnnouncementSignatures) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn AnnouncementSignatures_write(obj: &AnnouncementSignatures) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4324,23 +4334,21 @@ pub extern "C" fn AnnouncementSignatures_read(ser: crate::c_types::u8slice) -> A
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelReestablish_write(obj: *const ChannelReestablish) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn ChannelReestablish_write(obj: &ChannelReestablish) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ChannelReestablish_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeChannelReestablish) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelReestablish_read(ser: crate::c_types::u8slice) -> ChannelReestablish {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
ChannelReestablish { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
ChannelReestablish { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn ChannelReestablish_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ChannelReestablishDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ChannelReestablish { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ClosingSigned_write(obj: *const ClosingSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ClosingSigned_write(obj: &ClosingSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4356,7 +4364,7 @@ pub extern "C" fn ClosingSigned_read(ser: crate::c_types::u8slice) -> ClosingSig
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn CommitmentSigned_write(obj: *const CommitmentSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn CommitmentSigned_write(obj: &CommitmentSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4372,7 +4380,7 @@ pub extern "C" fn CommitmentSigned_read(ser: crate::c_types::u8slice) -> Commitm
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn FundingCreated_write(obj: *const FundingCreated) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn FundingCreated_write(obj: &FundingCreated) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4388,7 +4396,7 @@ pub extern "C" fn FundingCreated_read(ser: crate::c_types::u8slice) -> FundingCr
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn FundingSigned_write(obj: *const FundingSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn FundingSigned_write(obj: &FundingSigned) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4404,7 +4412,7 @@ pub extern "C" fn FundingSigned_read(ser: crate::c_types::u8slice) -> FundingSig
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn FundingLocked_write(obj: *const FundingLocked) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn FundingLocked_write(obj: &FundingLocked) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4420,23 +4428,21 @@ pub extern "C" fn FundingLocked_read(ser: crate::c_types::u8slice) -> FundingLoc
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Init_write(obj: *const Init) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn Init_write(obj: &Init) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn Init_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeInit) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Init_read(ser: crate::c_types::u8slice) -> Init {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
Init { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
Init { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn Init_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_InitDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Init { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn OpenChannel_write(obj: *const OpenChannel) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn OpenChannel_write(obj: &OpenChannel) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4452,7 +4458,7 @@ pub extern "C" fn OpenChannel_read(ser: crate::c_types::u8slice) -> OpenChannel
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn RevokeAndACK_write(obj: *const RevokeAndACK) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn RevokeAndACK_write(obj: &RevokeAndACK) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4468,7 +4474,7 @@ pub extern "C" fn RevokeAndACK_read(ser: crate::c_types::u8slice) -> RevokeAndAC
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Shutdown_write(obj: *const Shutdown) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn Shutdown_write(obj: &Shutdown) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4484,7 +4490,7 @@ pub extern "C" fn Shutdown_read(ser: crate::c_types::u8slice) -> Shutdown {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UpdateFailHTLC_write(obj: *const UpdateFailHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn UpdateFailHTLC_write(obj: &UpdateFailHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4500,7 +4506,7 @@ pub extern "C" fn UpdateFailHTLC_read(ser: crate::c_types::u8slice) -> UpdateFai
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UpdateFailMalformedHTLC_write(obj: *const UpdateFailMalformedHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn UpdateFailMalformedHTLC_write(obj: &UpdateFailMalformedHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4516,7 +4522,7 @@ pub extern "C" fn UpdateFailMalformedHTLC_read(ser: crate::c_types::u8slice) ->
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UpdateFee_write(obj: *const UpdateFee) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn UpdateFee_write(obj: &UpdateFee) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4532,7 +4538,7 @@ pub extern "C" fn UpdateFee_read(ser: crate::c_types::u8slice) -> UpdateFee {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UpdateFulfillHTLC_write(obj: *const UpdateFulfillHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn UpdateFulfillHTLC_write(obj: &UpdateFulfillHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4548,7 +4554,7 @@ pub extern "C" fn UpdateFulfillHTLC_read(ser: crate::c_types::u8slice) -> Update
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UpdateAddHTLC_write(obj: *const UpdateAddHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn UpdateAddHTLC_write(obj: &UpdateAddHTLC) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4564,55 +4570,49 @@ pub extern "C" fn UpdateAddHTLC_read(ser: crate::c_types::u8slice) -> UpdateAddH
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Ping_write(obj: *const Ping) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn Ping_write(obj: &Ping) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn Ping_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativePing) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Ping_read(ser: crate::c_types::u8slice) -> Ping {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
Ping { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
Ping { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn Ping_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_PingDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Ping { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Pong_write(obj: *const Pong) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn Pong_write(obj: &Pong) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn Pong_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativePong) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Pong_read(ser: crate::c_types::u8slice) -> Pong {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
Pong { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
Pong { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn Pong_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_PongDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::Pong { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedChannelAnnouncement_write(obj: *const UnsignedChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn UnsignedChannelAnnouncement_write(obj: &UnsignedChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn UnsignedChannelAnnouncement_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedChannelAnnouncement) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedChannelAnnouncement_read(ser: crate::c_types::u8slice) -> UnsignedChannelAnnouncement {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
UnsignedChannelAnnouncement { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
UnsignedChannelAnnouncement { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn UnsignedChannelAnnouncement_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedChannelAnnouncementDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedChannelAnnouncement { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelAnnouncement_write(obj: *const ChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelAnnouncement_write(obj: &ChannelAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4628,23 +4628,21 @@ pub extern "C" fn ChannelAnnouncement_read(ser: crate::c_types::u8slice) -> Chan
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedChannelUpdate_write(obj: *const UnsignedChannelUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn UnsignedChannelUpdate_write(obj: &UnsignedChannelUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn UnsignedChannelUpdate_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedChannelUpdate) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedChannelUpdate_read(ser: crate::c_types::u8slice) -> UnsignedChannelUpdate {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
UnsignedChannelUpdate { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
UnsignedChannelUpdate { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn UnsignedChannelUpdate_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedChannelUpdateDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedChannelUpdate { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelUpdate_write(obj: *const ChannelUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelUpdate_write(obj: &ChannelUpdate) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4660,39 +4658,35 @@ pub extern "C" fn ChannelUpdate_read(ser: crate::c_types::u8slice) -> ChannelUpd
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ErrorMessage_write(obj: *const ErrorMessage) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn ErrorMessage_write(obj: &ErrorMessage) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ErrorMessage_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeErrorMessage) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ErrorMessage_read(ser: crate::c_types::u8slice) -> ErrorMessage {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
ErrorMessage { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
ErrorMessage { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn ErrorMessage_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ErrorMessageDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ErrorMessage { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedNodeAnnouncement_write(obj: *const UnsignedNodeAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn UnsignedNodeAnnouncement_write(obj: &UnsignedNodeAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn UnsignedNodeAnnouncement_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeUnsignedNodeAnnouncement) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn UnsignedNodeAnnouncement_read(ser: crate::c_types::u8slice) -> UnsignedNodeAnnouncement {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
UnsignedNodeAnnouncement { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
UnsignedNodeAnnouncement { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn UnsignedNodeAnnouncement_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_UnsignedNodeAnnouncementDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::UnsignedNodeAnnouncement { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NodeAnnouncement_write(obj: *const NodeAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn NodeAnnouncement_write(obj: &NodeAnnouncement) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -4708,80 +4702,70 @@ pub extern "C" fn NodeAnnouncement_read(ser: crate::c_types::u8slice) -> NodeAnn
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn QueryShortChannelIds_read(ser: crate::c_types::u8slice) -> QueryShortChannelIds {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
QueryShortChannelIds { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
QueryShortChannelIds { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn QueryShortChannelIds_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_QueryShortChannelIdsDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::QueryShortChannelIds { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn QueryShortChannelIds_write(obj: *const QueryShortChannelIds) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn QueryShortChannelIds_write(obj: &QueryShortChannelIds) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn QueryShortChannelIds_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeQueryShortChannelIds) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ReplyShortChannelIdsEnd_read(ser: crate::c_types::u8slice) -> ReplyShortChannelIdsEnd {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
ReplyShortChannelIdsEnd { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
ReplyShortChannelIdsEnd { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn ReplyShortChannelIdsEnd_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ReplyShortChannelIdsEndDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ReplyShortChannelIdsEnd { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ReplyShortChannelIdsEnd_write(obj: *const ReplyShortChannelIdsEnd) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn ReplyShortChannelIdsEnd_write(obj: &ReplyShortChannelIdsEnd) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ReplyShortChannelIdsEnd_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeReplyShortChannelIdsEnd) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn QueryChannelRange_read(ser: crate::c_types::u8slice) -> QueryChannelRange {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
QueryChannelRange { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
QueryChannelRange { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn QueryChannelRange_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_QueryChannelRangeDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::QueryChannelRange { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn QueryChannelRange_write(obj: *const QueryChannelRange) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn QueryChannelRange_write(obj: &QueryChannelRange) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn QueryChannelRange_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeQueryChannelRange) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ReplyChannelRange_read(ser: crate::c_types::u8slice) -> ReplyChannelRange {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
ReplyChannelRange { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
ReplyChannelRange { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn ReplyChannelRange_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_ReplyChannelRangeDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::ReplyChannelRange { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ReplyChannelRange_write(obj: *const ReplyChannelRange) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn ReplyChannelRange_write(obj: &ReplyChannelRange) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn ReplyChannelRange_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeReplyChannelRange) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GossipTimestampFilter_read(ser: crate::c_types::u8slice) -> GossipTimestampFilter {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
GossipTimestampFilter { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
GossipTimestampFilter { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn GossipTimestampFilter_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_GossipTimestampFilterDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::ln::msgs::GossipTimestampFilter { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn GossipTimestampFilter_write(obj: *const GossipTimestampFilter) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn GossipTimestampFilter_write(obj: &GossipTimestampFilter) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn GossipTimestampFilter_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
|
|
|
@ -177,7 +177,7 @@ impl From<nativeNetGraphMsgHandler> for crate::ln::msgs::RoutingMessageHandler {
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: *const NetGraphMsgHandler) -> crate::ln::msgs::RoutingMessageHandler {
|
||||
pub extern "C" fn NetGraphMsgHandler_as_RoutingMessageHandler(this_arg: &NetGraphMsgHandler) -> crate::ln::msgs::RoutingMessageHandler {
|
||||
crate::ln::msgs::RoutingMessageHandler {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -280,7 +280,7 @@ impl From<nativeNetGraphMsgHandler> for crate::util::events::MessageSendEventsPr
|
|||
}
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: *const NetGraphMsgHandler) -> crate::util::events::MessageSendEventsProvider {
|
||||
pub extern "C" fn NetGraphMsgHandler_as_MessageSendEventsProvider(this_arg: &NetGraphMsgHandler) -> crate::util::events::MessageSendEventsProvider {
|
||||
crate::util::events::MessageSendEventsProvider {
|
||||
this_arg: unsafe { (*this_arg).inner as *mut c_void },
|
||||
free: None,
|
||||
|
@ -411,7 +411,7 @@ pub extern "C" fn DirectionalChannelInfo_set_last_update_message(this_ptr: &mut
|
|||
unsafe { &mut *this_ptr.inner }.last_update_message = local_val;
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn DirectionalChannelInfo_write(obj: *const DirectionalChannelInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn DirectionalChannelInfo_write(obj: &DirectionalChannelInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -544,7 +544,7 @@ pub extern "C" fn ChannelInfo_set_announcement_message(this_ptr: &mut ChannelInf
|
|||
unsafe { &mut *this_ptr.inner }.announcement_message = local_val;
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelInfo_write(obj: *const ChannelInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelInfo_write(obj: &ChannelInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
@ -647,16 +647,14 @@ pub extern "C" fn RoutingFees_new(mut base_msat_arg: u32, mut proportional_milli
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn RoutingFees_read(ser: crate::c_types::u8slice) -> RoutingFees {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
RoutingFees { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
RoutingFees { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn RoutingFees_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_RoutingFeesDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::RoutingFees { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn RoutingFees_write(obj: *const RoutingFees) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn RoutingFees_write(obj: &RoutingFees) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn RoutingFees_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
|
@ -790,20 +788,18 @@ pub extern "C" fn NodeAnnouncementInfo_new(mut features_arg: crate::ln::features
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NodeAnnouncementInfo_write(obj: *const NodeAnnouncementInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn NodeAnnouncementInfo_write(obj: &NodeAnnouncementInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn NodeAnnouncementInfo_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNodeAnnouncementInfo) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NodeAnnouncementInfo_read(ser: crate::c_types::u8slice) -> NodeAnnouncementInfo {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
NodeAnnouncementInfo { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
NodeAnnouncementInfo { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn NodeAnnouncementInfo_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NodeAnnouncementInfoDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NodeAnnouncementInfo { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
||||
use lightning::routing::network_graph::NodeInfo as nativeNodeInfoImport;
|
||||
|
@ -896,36 +892,32 @@ pub extern "C" fn NodeInfo_new(mut channels_arg: crate::c_types::derived::CVec_u
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NodeInfo_write(obj: *const NodeInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn NodeInfo_write(obj: &NodeInfo) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn NodeInfo_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNodeInfo) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NodeInfo_read(ser: crate::c_types::u8slice) -> NodeInfo {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
NodeInfo { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
NodeInfo { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn NodeInfo_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NodeInfoDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NodeInfo { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NetworkGraph_write(obj: *const NetworkGraph) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn NetworkGraph_write(obj: &NetworkGraph) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn NetworkGraph_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeNetworkGraph) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn NetworkGraph_read(ser: crate::c_types::u8slice) -> NetworkGraph {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
NetworkGraph { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
NetworkGraph { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn NetworkGraph_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_NetworkGraphDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::network_graph::NetworkGraph { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
/// Creates a new, empty, network graph.
|
||||
#[must_use]
|
||||
|
|
|
@ -222,20 +222,18 @@ pub extern "C" fn Route_new(mut paths_arg: crate::c_types::derived::CVec_CVec_Ro
|
|||
})), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Route_write(obj: *const Route) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
pub extern "C" fn Route_write(obj: &Route) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*unsafe { &*obj }.inner })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub(crate) extern "C" fn Route_write_void(obj: *const c_void) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &*(obj as *const nativeRoute) })
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Route_read(ser: crate::c_types::u8slice) -> Route {
|
||||
if let Ok(res) = crate::c_types::deserialize_obj(ser) {
|
||||
Route { inner: Box::into_raw(Box::new(res)), is_owned: true }
|
||||
} else {
|
||||
Route { inner: std::ptr::null_mut(), is_owned: true }
|
||||
}
|
||||
pub extern "C" fn Route_read(ser: crate::c_types::u8slice) -> crate::c_types::derived::CResult_RouteDecodeErrorZ {
|
||||
let res = crate::c_types::deserialize_obj(ser);
|
||||
let mut local_res = match res { Ok(mut o) => crate::c_types::CResultTempl::ok( { crate::routing::router::Route { inner: Box::into_raw(Box::new(o)), is_owned: true } }), Err(mut e) => crate::c_types::CResultTempl::err( { crate::ln::msgs::DecodeError { inner: Box::into_raw(Box::new(e)), is_owned: true } }) };
|
||||
local_res
|
||||
}
|
||||
|
||||
use lightning::routing::router::RouteHint as nativeRouteHintImport;
|
||||
|
|
|
@ -585,7 +585,7 @@ pub extern "C" fn ChannelConfig_default() -> ChannelConfig {
|
|||
ChannelConfig { inner: Box::into_raw(Box::new(Default::default())), is_owned: true }
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn ChannelConfig_write(obj: *const ChannelConfig) -> crate::c_types::derived::CVec_u8Z {
|
||||
pub extern "C" fn ChannelConfig_write(obj: &ChannelConfig) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(unsafe { &(*(*obj).inner) })
|
||||
}
|
||||
#[no_mangle]
|
||||
|
|
|
@ -312,6 +312,10 @@ pub extern "C" fn Event_free(this_ptr: Event) { }
|
|||
pub extern "C" fn Event_clone(orig: &Event) -> Event {
|
||||
orig.clone()
|
||||
}
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Event_write(obj: &Event) -> crate::c_types::derived::CVec_u8Z {
|
||||
crate::c_types::serialize_obj(&unsafe { &*obj }.to_native())
|
||||
}
|
||||
/// An event generated by ChannelManager which indicates a message should be sent to a peer (or
|
||||
/// broadcast to most peers).
|
||||
/// These events are handled by PeerManager::process_events if you are using a PeerManager.
|
||||
|
|
Loading…
Add table
Reference in a new issue