+ /**
+ * A monitor event containing an HTLCUpdate.
+ */
+ public final static class HTLCEvent extends MonitorEvent {
+ public final org.ldk.structs.HTLCUpdate htlc_event;
+ private HTLCEvent(long ptr, bindings.LDKMonitorEvent.HTLCEvent obj) {
+ super(null, ptr);
+ long htlc_event = obj.htlc_event;
+ org.ldk.structs.HTLCUpdate htlc_event_hu_conv = null; if (htlc_event < 0 || htlc_event > 4096) { htlc_event_hu_conv = new org.ldk.structs.HTLCUpdate(null, htlc_event); }
+ if (htlc_event_hu_conv != null) { htlc_event_hu_conv.ptrs_to.add(this); };
+ this.htlc_event = htlc_event_hu_conv;
+ }
+ }
+ /**
+ * Indicates we broadcasted the channel's latest commitment transaction and thus closed the
+ * channel.
+ */
+ public final static class HolderForceClosed extends MonitorEvent {
+ public final org.ldk.structs.OutPoint holder_force_closed;
+ private HolderForceClosed(long ptr, bindings.LDKMonitorEvent.HolderForceClosed obj) {
+ super(null, ptr);
+ long holder_force_closed = obj.holder_force_closed;
+ org.ldk.structs.OutPoint holder_force_closed_hu_conv = null; if (holder_force_closed < 0 || holder_force_closed > 4096) { holder_force_closed_hu_conv = new org.ldk.structs.OutPoint(null, holder_force_closed); }
+ if (holder_force_closed_hu_conv != null) { holder_force_closed_hu_conv.ptrs_to.add(this); };
+ this.holder_force_closed = holder_force_closed_hu_conv;
+ }
+ }
+ /**
+ * Indicates a [`ChannelMonitor`] update has completed. See
+ * [`ChannelMonitorUpdateStatus::InProgress`] for more information on how this is used.
+ *
+ * [`ChannelMonitorUpdateStatus::InProgress`]: super::ChannelMonitorUpdateStatus::InProgress
+ */
+ public final static class Completed extends MonitorEvent {
+ /**
+ * The funding outpoint of the [`ChannelMonitor`] that was updated
+ */
+ public final org.ldk.structs.OutPoint 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.
+ */
+ public final long monitor_update_id;
+ private Completed(long ptr, bindings.LDKMonitorEvent.Completed obj) {
+ super(null, ptr);
+ long funding_txo = obj.funding_txo;
+ org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
+ if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
+ this.funding_txo = funding_txo_hu_conv;
+ this.monitor_update_id = obj.monitor_update_id;
+ }
+ }
+ long clone_ptr() {
+ long ret = bindings.MonitorEvent_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
+ return ret;
+ }
+
+ /**
+ * Creates a copy of the MonitorEvent
+ */