bool is_owned;
} LDKDataLossProtect;
+typedef union LDKCResultPtr_NetAddress__u8 {
+ struct LDKNetAddress *result;
+ uint8_t *err;
+} LDKCResultPtr_NetAddress__u8;
+
+typedef struct LDKCResultTempl_NetAddress__u8 {
+ union LDKCResultPtr_NetAddress__u8 contents;
+ bool result_ok;
+} LDKCResultTempl_NetAddress__u8;
+
+typedef union LDKCResultPtr_CResultTempl_NetAddress__u8_____DecodeError {
+ struct LDKCResultTempl_NetAddress__u8 *result;
+ struct LDKDecodeError *err;
+} LDKCResultPtr_CResultTempl_NetAddress__u8_____DecodeError;
+
+typedef struct LDKCResultTempl_CResultTempl_NetAddress__u8_____DecodeError {
+ union LDKCResultPtr_CResultTempl_NetAddress__u8_____DecodeError contents;
+ bool result_ok;
+} LDKCResultTempl_CResultTempl_NetAddress__u8_____DecodeError;
+
+typedef struct LDKCResultTempl_CResultTempl_NetAddress__u8_____DecodeError LDKCResult_CResult_NetAddressu8ZDecodeErrorZ;
+
/**
typedef struct LDKCResultTempl_NetworkGraph__DecodeError LDKCResult_NetworkGraphDecodeErrorZ;
+typedef struct LDKCResultTempl_NetAddress__u8 LDKCResult_NetAddressu8Z;
+
typedef struct LDKCVecTempl_RouteHop LDKCVec_RouteHopZ;
extern const void (*CVec_SpendableOutputDescriptorZ_free)(LDKCVec_SpendableOutputDescriptorZ);
extern const LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ (*CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err)(struct LDKDecodeError);
+extern const void (*CResult_NetAddressu8Z_free)(LDKCResult_NetAddressu8Z);
+
+extern const LDKCResult_NetAddressu8Z (*CResult_NetAddressu8Z_ok)(struct LDKNetAddress);
+
+extern const LDKCResult_NetAddressu8Z (*CResult_NetAddressu8Z_err)(uint8_t);
+
+extern const void (*CResult_CResult_NetAddressu8ZDecodeErrorZ_free)(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ);
+
+extern const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ (*CResult_CResult_NetAddressu8ZDecodeErrorZ_ok)(LDKCResult_NetAddressu8Z);
+
+extern const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ (*CResult_CResult_NetAddressu8ZDecodeErrorZ_err)(struct LDKDecodeError);
+
extern const void (*CVec_u64Z_free)(LDKCVec_u64Z);
extern const void (*CVec_UpdateAddHTLCZ_free)(LDKCVec_UpdateAddHTLCZ);
void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
+LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *obj);
+
/**
* Updates a ChannelMonitor on the basis of some new information provided by the Channel
* itself.
struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *this_arg);
+LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *obj);
+
void ChannelManagerReadArgs_free(struct LDKChannelManagerReadArgs this_ptr);
/**
LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *obj);
+LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser);
+
void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *orig);
const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator &() const { return &self; }
const LDKCResult_SpendableOutputDescriptorDecodeErrorZ* operator ->() const { return &self; }
};
+class CResult_NetAddressu8Z {
+private:
+ LDKCResult_NetAddressu8Z self;
+public:
+ CResult_NetAddressu8Z(const CResult_NetAddressu8Z&) = delete;
+ ~CResult_NetAddressu8Z() { CResult_NetAddressu8Z_free(self); }
+ CResult_NetAddressu8Z(CResult_NetAddressu8Z&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_NetAddressu8Z)); }
+ CResult_NetAddressu8Z(LDKCResult_NetAddressu8Z&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_NetAddressu8Z)); }
+ operator LDKCResult_NetAddressu8Z() { LDKCResult_NetAddressu8Z res = self; memset(&self, 0, sizeof(LDKCResult_NetAddressu8Z)); return res; }
+ LDKCResult_NetAddressu8Z* operator &() { return &self; }
+ LDKCResult_NetAddressu8Z* operator ->() { return &self; }
+ const LDKCResult_NetAddressu8Z* operator &() const { return &self; }
+ const LDKCResult_NetAddressu8Z* operator ->() const { return &self; }
+};
class CVec_UpdateFailMalformedHTLCZ {
private:
LDKCVec_UpdateFailMalformedHTLCZ self;
const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator &() const { return &self; }
const LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* operator ->() const { return &self; }
};
+class CResult_CResult_NetAddressu8ZDecodeErrorZ {
+private:
+ LDKCResult_CResult_NetAddressu8ZDecodeErrorZ self;
+public:
+ CResult_CResult_NetAddressu8ZDecodeErrorZ(const CResult_CResult_NetAddressu8ZDecodeErrorZ&) = delete;
+ ~CResult_CResult_NetAddressu8ZDecodeErrorZ() { CResult_CResult_NetAddressu8ZDecodeErrorZ_free(self); }
+ CResult_CResult_NetAddressu8ZDecodeErrorZ(CResult_CResult_NetAddressu8ZDecodeErrorZ&& o) : self(o.self) { memset(&o, 0, sizeof(CResult_CResult_NetAddressu8ZDecodeErrorZ)); }
+ CResult_CResult_NetAddressu8ZDecodeErrorZ(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ&& m_self) : self(m_self) { memset(&m_self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); }
+ operator LDKCResult_CResult_NetAddressu8ZDecodeErrorZ() { LDKCResult_CResult_NetAddressu8ZDecodeErrorZ res = self; memset(&self, 0, sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ)); return res; }
+ LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() { return &self; }
+ LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() { return &self; }
+ const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator &() const { return &self; }
+ const LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* operator ->() const { return &self; }
+};
class CVec_ChannelDetailsZ {
private:
LDKCVec_ChannelDetailsZ self;
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>;
ret
}
}
+#[no_mangle]
+pub extern "C" fn ChannelMonitor_write(obj: *const 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.
///
local_ret.into()
}
+#[no_mangle]
+pub extern "C" fn ChannelManager_write(obj: *const 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>;
pub extern "C" fn NetAddress_write(obj: *const 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;