+/// Processes [`SpendableOutputs`] events produced from each [`ChannelMonitor`] upon maturity.
+///
+/// For channels featuring anchor outputs, this method will also process [`BumpTransaction`]
+/// events produced from each [`ChannelMonitor`] while there is a balance to claim onchain
+/// within each channel. As the confirmation of a commitment transaction may be critical to the
+/// safety of funds, we recommend invoking this every 30 seconds, or lower if running in an
+/// environment with spotty connections, like on mobile.
+///
+/// An [`EventHandler`] may safely call back to the provider, though this shouldn't be needed in
+/// order to handle these events.
+///
+/// [`SpendableOutputs`]: crate::events::Event::SpendableOutputs
+/// [`BumpTransaction`]: crate::events::Event::BumpTransaction
+#[no_mangle]
+pub extern "C" fn ChannelMonitor_process_pending_events(this_arg: &crate::lightning::chain::channelmonitor::ChannelMonitor, handler: &crate::lightning::events::EventHandler) {
+ unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.process_pending_events(handler)
+}
+
+/// Gets the counterparty's initial commitment transaction. The returned commitment
+/// transaction is unsigned. This is intended to be called during the initial persistence of
+/// the monitor (inside an implementation of [`Persist::persist_new_channel`]), to allow for
+/// watchtowers in the persistence pipeline to have enough data to form justice transactions.
+///
+/// This is similar to [`Self::counterparty_commitment_txs_from_update`], except
+/// that for the initial commitment transaction, we don't have a corresponding update.
+///
+/// This will only return `Some` for channel monitors that have been created after upgrading
+/// to LDK 0.0.117+.
+///
+/// [`Persist::persist_new_channel`]: crate::chain::chainmonitor::Persist::persist_new_channel
+///
+/// Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+#[must_use]
+#[no_mangle]
+pub extern "C" fn ChannelMonitor_initial_counterparty_commitment_tx(this_arg: &crate::lightning::chain::channelmonitor::ChannelMonitor) -> crate::lightning::ln::chan_utils::CommitmentTransaction {
+ let mut ret = unsafe { &*ObjOps::untweak_ptr(this_arg.inner) }.initial_counterparty_commitment_tx();
+ let mut local_ret = crate::lightning::ln::chan_utils::CommitmentTransaction { inner: if ret.is_none() { core::ptr::null_mut() } else { { ObjOps::heap_alloc((ret.unwrap())) } }, is_owned: true };
+ local_ret
+}
+
+/// Gets all of the counterparty commitment transactions provided by the given update. This
+/// may be empty if the update doesn't include any new counterparty commitments. Returned
+/// commitment transactions are unsigned.