+ * Indicates a [`ChannelMonitor`] update has completed. See
+ * [`ChannelMonitorUpdateErr::TemporaryFailure`] for more information on how this is used.
+ *
+ * [`ChannelMonitorUpdateErr::TemporaryFailure`]: super::ChannelMonitorUpdateErr::TemporaryFailure
+ */
+ LDKMonitorEvent_UpdateCompleted,
+ /**
+ * Indicates a [`ChannelMonitor`] update has failed. See
+ * [`ChannelMonitorUpdateErr::PermanentFailure`] for more information on how this is used.
+ *
+ * [`ChannelMonitorUpdateErr::PermanentFailure`]: super::ChannelMonitorUpdateErr::PermanentFailure
+ */
+ LDKMonitorEvent_UpdateFailed,
+ /**
+ * Must be last for serialization purposes
+ */
+ LDKMonitorEvent_Sentinel,
+} LDKMonitorEvent_Tag;
+
+typedef struct LDKMonitorEvent_LDKUpdateCompleted_Body {
+ /**
+ * The funding outpoint of the [`ChannelMonitor`] that was updated
+ */
+ struct LDKOutPoint funding_txo;
+ /**
+ * The Update ID from [`ChannelMonitorUpdate::update_id`] which was applied or
+ * [`ChannelMonitor::get_latest_update_id`].
+ *
+ * Note that this should only be set to a given update's ID if all previous updates for the
+ * same [`ChannelMonitor`] have been applied and persisted.
+ */
+ uint64_t monitor_update_id;
+} LDKMonitorEvent_LDKUpdateCompleted_Body;
+
+typedef struct MUST_USE_STRUCT LDKMonitorEvent {
+ LDKMonitorEvent_Tag tag;
+ union {
+ struct {
+ struct LDKHTLCUpdate htlc_event;
+ };
+ struct {
+ struct LDKOutPoint commitment_tx_confirmed;
+ };
+ LDKMonitorEvent_LDKUpdateCompleted_Body update_completed;
+ struct {
+ struct LDKOutPoint update_failed;
+ };
+ };
+} LDKMonitorEvent;
+
+/**
+ * A dynamically-allocated array of crate::lightning::chain::channelmonitor::MonitorEvents of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_MonitorEventZ {
+ /**
+ * The elements in the array.
+ * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ */
+ struct LDKMonitorEvent *data;
+ /**
+ * The number of elements pointed to by `data`.
+ */
+ uintptr_t datalen;
+} LDKCVec_MonitorEventZ;
+
+/**
+ * A tuple of 2 elements. See the individual fields for the types contained.
+ */
+typedef struct LDKC2Tuple_OutPointCVec_MonitorEventZZ {
+ /**
+ * The element at position 0
+ */
+ struct LDKOutPoint a;
+ /**
+ * The element at position 1
+ */
+ struct LDKCVec_MonitorEventZ b;
+} LDKC2Tuple_OutPointCVec_MonitorEventZZ;
+
+/**
+ * A dynamically-allocated array of crate::c_types::derived::C2Tuple_OutPointCVec_MonitorEventZZs of arbitrary size.
+ * This corresponds to std::vector in C++
+ */
+typedef struct LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ {
+ /**
+ * The elements in the array.
+ * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc().
+ */
+ struct LDKC2Tuple_OutPointCVec_MonitorEventZZ *data;
+ /**
+ * The number of elements pointed to by `data`.
+ */
+ uintptr_t datalen;
+} LDKCVec_C2Tuple_OutPointCVec_MonitorEventZZZ;
+
+/**
+ * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not
+ */
+typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag {
+ /**
+ * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ
+ */
+ LDKCOption_C2Tuple_usizeTransactionZZ_Some,
+ /**
+ * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing
+ */
+ LDKCOption_C2Tuple_usizeTransactionZZ_None,
+ /**
+ * Must be last for serialization purposes
+ */
+ LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel,
+} LDKCOption_C2Tuple_usizeTransactionZZ_Tag;
+
+typedef struct LDKCOption_C2Tuple_usizeTransactionZZ {
+ LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag;
+ union {
+ struct {
+ struct LDKC2Tuple_usizeTransactionZ some;
+ };
+ };
+} LDKCOption_C2Tuple_usizeTransactionZZ;
+
+
+
+/**
+ * [`Score`] implementation that uses a fixed penalty.
+ */
+typedef struct MUST_USE_STRUCT LDKFixedPenaltyScorer {
+ /**
+ * A pointer to the opaque Rust object.
+ * Nearly everywhere, inner must be non-null, however in places where
+ * the Rust equivalent takes an Option, it may be set to null to indicate None.
+ */
+ LDKnativeFixedPenaltyScorer *inner;
+ /**
+ * Indicates that this is the only struct which contains the same pointer.
+ * Rust functions which take ownership of an object provided via an argument require
+ * this to be true and invalidate the object pointed to by inner.
+ */
+ bool is_owned;
+} LDKFixedPenaltyScorer;
+
+/**
+ * The contents of CResult_FixedPenaltyScorerDecodeErrorZ
+ */
+typedef union LDKCResult_FixedPenaltyScorerDecodeErrorZPtr {
+ /**
+ * A pointer to the contents in the success state.
+ * Reading from this pointer when `result_ok` is not set is undefined.
+ */
+ struct LDKFixedPenaltyScorer *result;
+ /**
+ * A pointer to the contents in the error state.
+ * Reading from this pointer when `result_ok` is set is undefined.
+ */
+ struct LDKDecodeError *err;
+} LDKCResult_FixedPenaltyScorerDecodeErrorZPtr;
+
+/**
+ * A CResult_FixedPenaltyScorerDecodeErrorZ represents the result of a fallible operation,
+ * containing a crate::lightning::routing::scoring::FixedPenaltyScorer on success and a crate::lightning::ln::msgs::DecodeError on failure.
+ * `result_ok` indicates the overall state, and the contents are provided via `contents`.
+ */
+typedef struct LDKCResult_FixedPenaltyScorerDecodeErrorZ {
+ /**
+ * The contents of this CResult_FixedPenaltyScorerDecodeErrorZ, accessible via either